From 4b722e5387afc7d1e03302e786e810dcb88a0a99 Mon Sep 17 00:00:00 2001 From: Tornado Tech <54727692+Tornado-Technology@users.noreply.github.com> Date: Mon, 9 Dec 2024 19:58:01 +1000 Subject: [PATCH] Update BluespaceHarvesterSystem.cs --- .../BluespaceHarvester/BluespaceHarvesterSystem.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs b/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs index 4af8f65fa03..a9c9013b5f8 100644 --- a/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs +++ b/Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs @@ -11,6 +11,7 @@ using Robust.Shared.Audio.Systems; using Robust.Shared.Map; using Robust.Shared.Timing; +using Robust.Shared.Utility; namespace Content.Server._CorvaxNext.BluespaceHarvester; @@ -73,12 +74,7 @@ private void UpdateCount() while (query.MoveNext(out var entityUid, out _)) { var mapId = Transform(entityUid).MapID; - if (!dictionary.TryGetValue(mapId, out var list)) - { - dictionary[mapId] = []; - list = dictionary[mapId]; - } - + var list = dictionary.GetOrNew(mapId); list.Add(entityUid); }