Make ReactionResults an array (#34967)

* Make ReactionResults an array

We're making the dictionaries fixed-size anyway.
Alternatively could use a frozendictionary but not sure on the perf difference. Worst case whoever adds another reactionresult makes a minor adjustment

* apply conventions

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
metalgearsloth
2025-02-09 13:13:47 +11:00
committed by GitHub
parent 01cbe31872
commit ba1fd6c5f3
4 changed files with 10 additions and 11 deletions

View File

@@ -178,7 +178,7 @@ namespace Content.Server.Atmos.EntitySystems
if (tile.Hotspot.Bypassing)
{
tile.Hotspot.Volume = tile.Air.ReactionResults[GasReaction.Fire] * Atmospherics.FireGrowthRate;
tile.Hotspot.Volume = tile.Air.ReactionResults[(byte)GasReaction.Fire] * Atmospherics.FireGrowthRate;
tile.Hotspot.Temperature = tile.Air.Temperature;
}
else
@@ -187,7 +187,7 @@ namespace Content.Server.Atmos.EntitySystems
affected.Temperature = tile.Hotspot.Temperature;
React(affected, tile);
tile.Hotspot.Temperature = affected.Temperature;
tile.Hotspot.Volume = affected.ReactionResults[GasReaction.Fire] * Atmospherics.FireGrowthRate;
tile.Hotspot.Volume = affected.ReactionResults[(byte)GasReaction.Fire] * Atmospherics.FireGrowthRate;
Merge(tile.Air, affected);
}