Advertisement
drabont

Space Engineers - QUALYSer v0.1

May 25th, 2020
2,258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.86 KB | None | 0 0
  1. IMyTextSurface m; List<IMyGasGenerator> gg = new List<IMyGasGenerator>();
  2.  
  3. public Program() { m = Me.GetSurface(0); m.ContentType = ContentType.TEXT_AND_IMAGE; m.FontSize = 26.4f/20;
  4.   m.TextPadding = 0; m.Font = "Monospace"; m.FontColor = Color.DarkSlateGray; m.BackgroundColor = Color.Black;
  5.   Runtime.UpdateFrequency = UpdateFrequency.Update1;
  6. }
  7.  
  8. public void Main(){
  9.   GridTerminalSystem.GetBlocksOfType(gg, b => b.CustomName.Contains("quant"));
  10.   m.WriteText($"QUALYSer v0.2 by SWG\n{"".PadRight(20,'≡')}\nblk:{gg.Count,3} synchronized \nquantum electrolyser");
  11.   foreach (var g in gg) {
  12.     var n = g.GetInventory(0).GetItemAmount(MyItemType.MakeOre("Ice")).ToString();
  13.     g.Enabled = !g.Enabled; if (g.CustomData!=n) {g.Enabled = !g.Enabled; g.CustomData = n;}
  14.   }
  15.   var і=Runtime; Echo($"{System.DateTime.Now}\nCode runtime:{і.LastRunTimeMs:F2} ms");
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement