Make some prototypes use frozen collections (#22576)

* Make some prototypes use frozen collections

* poke tests

* Remove frozen dictionary enumeration
This commit is contained in:
Leon Friedrich
2023-12-24 23:12:22 -05:00
committed by GitHub
parent 78354052ea
commit 8587c3778a
5 changed files with 8 additions and 9 deletions

View File

@@ -1,4 +1,5 @@
using System.Linq;
using System.Collections.Frozen;
using System.Linq;
using System.Text.Json.Serialization;
using Content.Shared.Administration.Logs;
using Content.Shared.Body.Prototypes;
@@ -14,7 +15,6 @@ using Robust.Shared.Random;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Array;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary;
using Robust.Shared.Utility;
namespace Content.Shared.Chemistry.Reagent
@@ -103,7 +103,7 @@ namespace Content.Shared.Chemistry.Reagent
public float Viscosity;
[DataField(serverOnly: true)]
public Dictionary<ProtoId<MetabolismGroupPrototype>, ReagentEffectsEntry>? Metabolisms;
public FrozenDictionary<ProtoId<MetabolismGroupPrototype>, ReagentEffectsEntry>? Metabolisms;
[DataField(serverOnly: true)]
public Dictionary<ProtoId<ReactiveGroupPrototype>, ReactiveReagentEffectEntry>? ReactiveEffects;