diff --git a/Space Engineers/iceMonitoringScript.cs b/Space Engineers/iceMonitoringScript.cs index d5f3e99..eaefd6e 100644 --- a/Space Engineers/iceMonitoringScript.cs +++ b/Space Engineers/iceMonitoringScript.cs @@ -22,9 +22,16 @@ public void Main(string args) { collectorGroup.GetBlocksOfType(collectors); int iceamount = getCurrentIceAmount(); collectorState = collectors[0].Enabled ? "Active" : "Inactive"; - Echo($"Current Ice Amount: {iceamount}"); - Echo($"Collectors are {collectorState}"); + var msg = string.Format("\n\nIce Manager by Firq\n----------------------------\nCurrent Time: {0}\n----------------------------\nCollectors are {1}\nIce Amount: {2}M", + DateTime.UtcNow.ToLocalTime().ToLongTimeString(), collectorState, Math.Round((iceamount / 1000000.0), 2)); + var screen = Me.GetSurface(0); + screen.ContentType = ContentType.TEXT_AND_IMAGE; + screen.Alignment = TextAlignment.CENTER; + + screen.WriteText(msg, false); + Echo(msg); + if(iceamount > upperThreshold) { toggleCollectors(false); Echo($"Collectors are OFF"); @@ -32,13 +39,6 @@ public void Main(string args) { toggleCollectors(true); Echo($"Collectors are ON"); } - - var msg = string.Format("\n\nIce Manager by Firq\n----------------------------\nCurrent Time: {0}\n----------------------------\nCollectors are {1}\nIce Amount: {2}M", - DateTime.UtcNow.ToLocalTime().ToLongTimeString(), collectorState, Math.Round((iceamount / 1000000.0), 2)); - var screen = Me.GetSurface(0); - screen.ContentType = ContentType.TEXT_AND_IMAGE; - screen.Alignment = TextAlignment.CENTER; - screen.WriteText(msg, false); } public int getCurrentIceAmount() {