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

@@ -156,10 +156,9 @@ namespace Content.Server.Body.Systems
foreach (var group in meta.MetabolismGroups)
{
if (!proto.Metabolisms.ContainsKey(group.Id))
if (!proto.Metabolisms.TryGetValue(group.Id, out var entry))
continue;
var entry = proto.Metabolisms[group.Id];
var rate = entry.MetabolismRate * group.MetabolismRateModifier;
// Remove $rate, as long as there's enough reagent there to actually remove that much