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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user