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

@@ -33,10 +33,9 @@ namespace Content.Shared.Atmos
public bool Immutable { get; private set; }
[ViewVariables]
public readonly Dictionary<GasReaction, float> ReactionResults = new()
public readonly float[] ReactionResults =
{
// We initialize the dictionary here.
{ GasReaction.Fire, 0f }
0f,
};
[ViewVariables]