diff --git a/Gamemode Mods/Starcore_Sharetrack/Data/Scripts/ShipPoints/ShipTracking/GridStats.cs b/Gamemode Mods/Starcore_Sharetrack/Data/Scripts/ShipPoints/ShipTracking/GridStats.cs index f0dc41672..205cde8be 100644 --- a/Gamemode Mods/Starcore_Sharetrack/Data/Scripts/ShipPoints/ShipTracking/GridStats.cs +++ b/Gamemode Mods/Starcore_Sharetrack/Data/Scripts/ShipPoints/ShipTracking/GridStats.cs @@ -13,6 +13,11 @@ namespace StarCore.ShareTrack.ShipTracking { internal class GridStats // TODO convert this to be event-driven. OnBlockPlace, etc. Keep a queue. { + private readonly string[] _ignoredIntegrityBlocks = new[] + { + "SC_SRB" + }; + private readonly HashSet _fatBlocks = new HashSet(); private readonly HashSet _slimBlocks; @@ -38,7 +43,7 @@ public GridStats(IMyCubeGrid grid) foreach (var block in _slimBlocks) { - if (block?.FatBlock != null) + if (block?.FatBlock != null && !_ignoredIntegrityBlocks.Contains(block.BlockDefinition.Id.SubtypeName)) { _fatBlocks.Add(block.FatBlock); GridIntegrity += block.Integrity; @@ -72,11 +77,11 @@ public void UpdateAfterSim() { float tempGridInteg = 0; - foreach (var block in _slimBlocks) + foreach (var block in _fatBlocks) { - if (block.FatBlock != null) // Remove To Count All Blocks + if (block != null && !_ignoredIntegrityBlocks.Contains(block.BlockDefinition.SubtypeName)) // Remove To Count All Blocks { - tempGridInteg += block.Integrity; + tempGridInteg += block.SlimBlock.Integrity; } }