File tree Expand file tree Collapse file tree
Gamemode Mods/Starcore_Sharetrack/Data/Scripts/ShipPoints/ShipTracking Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,11 @@ namespace StarCore.ShareTrack.ShipTracking
1313{
1414 internal class GridStats // TODO convert this to be event-driven. OnBlockPlace, etc. Keep a queue.
1515 {
16+ private readonly string [ ] _ignoredIntegrityBlocks = new [ ]
17+ {
18+ "SC_SRB"
19+ } ;
20+
1621 private readonly HashSet < IMyCubeBlock > _fatBlocks = new HashSet < IMyCubeBlock > ( ) ;
1722
1823 private readonly HashSet < IMySlimBlock > _slimBlocks ;
@@ -38,7 +43,7 @@ public GridStats(IMyCubeGrid grid)
3843
3944 foreach ( var block in _slimBlocks )
4045 {
41- if ( block ? . FatBlock != null )
46+ if ( block ? . FatBlock != null && ! _ignoredIntegrityBlocks . Contains ( block . BlockDefinition . Id . SubtypeName ) )
4247 {
4348 _fatBlocks . Add ( block . FatBlock ) ;
4449 GridIntegrity += block . Integrity ;
@@ -72,11 +77,11 @@ public void UpdateAfterSim()
7277 {
7378 float tempGridInteg = 0 ;
7479
75- foreach ( var block in _slimBlocks )
80+ foreach ( var block in _fatBlocks )
7681 {
77- if ( block . FatBlock != null ) // Remove To Count All Blocks
82+ if ( block != null && ! _ignoredIntegrityBlocks . Contains ( block . BlockDefinition . SubtypeName ) ) // Remove To Count All Blocks
7883 {
79- tempGridInteg += block . Integrity ;
84+ tempGridInteg += block . SlimBlock . Integrity ;
8085 }
8186 }
8287
You can’t perform that action at this time.
0 commit comments