diff --git a/ThermalDynamics/Data/CubeBlocks/Gauge_LG_CoolantPipe_Straight_Sink.sbc b/ThermalDynamics/Data/CubeBlocks/Gauge_LG_CoolantPipe_Straight_SingleSink.sbc similarity index 90% rename from ThermalDynamics/Data/CubeBlocks/Gauge_LG_CoolantPipe_Straight_Sink.sbc rename to ThermalDynamics/Data/CubeBlocks/Gauge_LG_CoolantPipe_Straight_SingleSink.sbc index 8ef6154..4467ede 100644 --- a/ThermalDynamics/Data/CubeBlocks/Gauge_LG_CoolantPipe_Straight_Sink.sbc +++ b/ThermalDynamics/Data/CubeBlocks/Gauge_LG_CoolantPipe_Straight_SingleSink.sbc @@ -4,9 +4,9 @@ CubeBlock - Gauge_LG_CoolantPipe_Straight_Sink + Gauge_LG_CoolantPipe_Straight_SingleSink - {LOC:DisplayName_Gauge_LG_CoolantPipe_Straight} + {LOC:DisplayName_Gauge_LG_CoolantPipe_Straight_SingleSink} {LOC:Description_Gauge_CoolantPipe} Textures\GUI\Icons\Gauge\LG_CoolantPipeStraight_OneSink.dds Large diff --git a/ThermalDynamics/Data/Scripts/Thermodynamics/Session.cs b/ThermalDynamics/Data/Scripts/Thermodynamics/Session.cs index 683e2f4..63dad6f 100644 --- a/ThermalDynamics/Data/Scripts/Thermodynamics/Session.cs +++ b/ThermalDynamics/Data/Scripts/Thermodynamics/Session.cs @@ -29,7 +29,6 @@ public class Session : MySessionComponentBase private static StringBuilder ToolText = new StringBuilder($""); private static StringBuilder GridText = new StringBuilder($""); - private static Color GridTempColor = Color.Blue; public Session() { @@ -207,16 +206,21 @@ private void DrawGridHud() { GridText.Clear(); IMyCubeBlock controlledBlock = MyAPIGateway.Session?.Player?.Controller?.ControlledEntity as IMyCubeBlock; - if (controlledBlock == null) return; MyCubeGrid grid = controlledBlock.CubeGrid as MyCubeGrid; + if (grid == null) return; ThermalGrid tg = grid.GameLogic.GetAs(); + if (tg == null) return; - hudStatusGrid.InitialColor = ColorExtensions.HSVtoColor(Tools.GetTemperatureColor(tg.HottestBlock.Temperature)); + GridText.Append($"Ambient: {Tools.KelvinToCelsiusString(tg.FrameAmbientTemprature)}\n"); if (tg.HottestBlock != null) { + if (hudStatusGrid != null) + { + hudStatusGrid.InitialColor = ColorExtensions.HSVtoColor(Tools.GetTemperatureColor(tg.HottestBlock.Temperature)); + } GridText.Append($"Peak Temp: {Tools.KelvinToCelsiusString(tg.HottestBlock.Temperature)}\n"); } diff --git a/ThermalDynamics/Data/Scripts/Thermodynamics/ThermalGridLoop.cs b/ThermalDynamics/Data/Scripts/Thermodynamics/ThermalGridLoop.cs index 9a7a2f5..257d0a9 100644 --- a/ThermalDynamics/Data/Scripts/Thermodynamics/ThermalGridLoop.cs +++ b/ThermalDynamics/Data/Scripts/Thermodynamics/ThermalGridLoop.cs @@ -13,7 +13,7 @@ public partial class ThermalGrid : MyGameLogicComponent { { "Gauge_LG_CoolantPipe_Straight", new Vector3I[0] }, { "Gauge_LG_CoolantPipe_Straight_DoubleSink", new Vector3I[] { Vector3I.Left, Vector3I.Right } }, - { "Gauge_LG_CoolantPipe_Straight_Sink", new Vector3I[] { Vector3I.Right } }, + { "Gauge_LG_CoolantPipe_Straight_SingleSink", new Vector3I[] { Vector3I.Right } }, { "Gauge_LG_CoolantPipe_Corner", new Vector3I[0] }, { "Gauge_LG_CoolantPipe_Corner_DoubleSink", new Vector3I[] { Vector3I.Backward, Vector3I.Right } }, { "Gauge_LG_CoolantPipe_Corner_SingleSink", new Vector3I[] { Vector3I.Up } }, @@ -21,7 +21,7 @@ public partial class ThermalGrid : MyGameLogicComponent { "Gauge_SG_CoolantPipe_Straight", new Vector3I[0] }, { "Gauge_SG_CoolantPipe_Straight_DoubleSink", new Vector3I[] { Vector3I.Left, Vector3I.Right } }, - { "Gauge_SG_CoolantPipe_Straight_Sink", new Vector3I[] { Vector3I.Right } }, + { "Gauge_SG_CoolantPipe_Straight_SingleSink", new Vector3I[] { Vector3I.Right } }, { "Gauge_SG_CoolantPipe_Corner", new Vector3I[0] }, { "Gauge_SG_CoolantPipe_Corner_DoubleSink", new Vector3I[] { Vector3I.Backward, Vector3I.Right } }, { "Gauge_SG_CoolantPipe_Corner_SingleSink", new Vector3I[] { Vector3I.Up } }, @@ -32,19 +32,19 @@ public partial class ThermalGrid : MyGameLogicComponent { { "Gauge_LG_CoolantPipe_Straight", new Vector3I[] { Vector3I.Forward, Vector3I.Backward } }, { "Gauge_LG_CoolantPipe_Straight_DoubleSink", new Vector3I[] { Vector3I.Forward, Vector3I.Backward } }, - { "Gauge_LG_CoolantPipe_Straight_Sink", new Vector3I[] { Vector3I.Forward, Vector3I.Backward } }, + { "Gauge_LG_CoolantPipe_Straight_SingleSink", new Vector3I[] { Vector3I.Forward, Vector3I.Backward } }, { "Gauge_LG_CoolantPipe_Corner", new Vector3I[] { Vector3I.Forward, Vector3I.Left } }, { "Gauge_LG_CoolantPipe_Corner_DoubleSink", new Vector3I[] { Vector3I.Forward, Vector3I.Left } }, { "Gauge_LG_CoolantPipe_Corner_SingleSink", new Vector3I[] { Vector3I.Forward, Vector3I.Left } }, - { "Gauge_LG_CoolantPump", new Vector3I[] { Vector3I.Forward, Vector3I.Backward } }, + { "Gauge_LG_CoolantPump", new Vector3I[] { Vector3I.Forward, Vector3I.Backward } }, { "Gauge_SG_CoolantPipe_Straight", new Vector3I[] { Vector3I.Forward, Vector3I.Backward } }, { "Gauge_SG_CoolantPipe_Straight_DoubleSink", new Vector3I[] { Vector3I.Forward, Vector3I.Backward } }, - { "Gauge_SG_CoolantPipe_Straight_Sink", new Vector3I[] { Vector3I.Forward, Vector3I.Backward } }, + { "Gauge_SG_CoolantPipe_Straight_SingleSink", new Vector3I[] { Vector3I.Forward, Vector3I.Backward } }, { "Gauge_SG_CoolantPipe_Corner", new Vector3I[] { Vector3I.Forward, Vector3I.Left } }, { "Gauge_SG_CoolantPipe_Corner_DoubleSink", new Vector3I[] { Vector3I.Forward, Vector3I.Left } }, { "Gauge_SG_CoolantPipe_Corner_SingleSink", new Vector3I[] { Vector3I.Forward, Vector3I.Left } }, - { "Gauge_SG_CoolantPump", new Vector3I[] { Vector3I.Forward, Vector3I.Backward } }, + { "Gauge_SG_CoolantPump", new Vector3I[] { Vector3I.Forward, Vector3I.Backward } }, }; @@ -145,7 +145,7 @@ private bool CoolantCrawl(Vector3I last, IMySlimBlock b, ref List l Vector3I next = b.Min + dir; - //MyLog.Default.Info($"{b.BlockDefinition.Id.SubtypeId.ToString()} | last: {last} --- next: {next} --- min: {b.Min + dir} --- max: {b.Max + dir}"); + MyLog.Default.Info($"{b.BlockDefinition.Id.SubtypeId} [{next == last}] ({loop.Count}) | last: {last} --- next: {next} --- min: {b.Min + dir} --- max: {b.Max + dir}"); if (next == last) continue;