This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void VerticalLabel(Rect rect, Vector2 clipSize, string text) | |
{ | |
// the issue: | |
// while we transforming gui, whe clip area rotates with it | |
// so, if we want to draw somewhere on untrasformed screen, we have invalid clip area to deal with. | |
// the best idea I have is to draw on (0,0) of current clip area and move label to desized position using gui matrix intead of label coordinates | |
// limitations: | |
// we need to apply clip effect to transformed label manually, we need to know clip area size for that, but I see no way to obrain it | |
// original clip is still applied, and width and height is now inverted. So, original clip have no space to render the label *horizontaly*, the vertical label will not be rendered correctly either. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// PBDiagnostics | |
// Simple tool to manipulate programmable block's Storage variable. | |
ParamsRouter paramsRouter; | |
public Program() | |
{ | |
IsolatedRun(() => | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using VRage.Game.ModAPI.Ingame; | |
namespace Script | |
{ | |
#region ingame script start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using HarmonyLib; | |
using RimWorld; | |
using RWLayout.alpha2; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using UnityEngine; | |
using Verse; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static bool RecacheColumnWidths_prefix(PawnTable __instance) | |
{ | |
ClSimplexSolver solver = new ClSimplexSolver(); | |
solver.AutoSolve = false; | |
var cachedColumnWidths = (List<float>)typeof(PawnTable) | |
.GetField("cachedColumnWidths", BindingFlags.NonPublic | BindingFlags.Instance) | |
.GetValue(__instance); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
namespace Publish | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Drawing; | |
using System.Drawing.Imaging; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using System.Threading.Tasks; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<IMyProgrammableBlock> pbs = new List<IMyProgrammableBlock>(); | |
IMyTextPanel status = null; | |
public Program() { | |
} | |
public void Main(string argument) { | |
this.GridTerminalSystem.GetBlocksOfType<IMyProgrammableBlock>(pbs); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Harmony; | |
using Havok; | |
using Sandbox.Engine.Physics; | |
using Sandbox.Game.Entities.Cube; | |
using System; | |
using System.Reflection; | |
using VRage.Plugins; | |
namespace SpeedLimitFix | |
{ |
NewerOlder