From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Sun, 7 Jan 2024 03:23:44 +0000 (+1100) Subject: Fix salvage magnet determinism (#23655) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=fb24f9accf5ed5c92fdc18378df511295079cab2;p=space-station-14.git Fix salvage magnet determinism (#23655) Machine-specific moment, you'd think I'd remember from expeditions. --- diff --git a/Content.Shared/Salvage/SharedSalvageSystem.Magnet.cs b/Content.Shared/Salvage/SharedSalvageSystem.Magnet.cs index f1fff0bbc5..4847b34793 100644 --- a/Content.Shared/Salvage/SharedSalvageSystem.Magnet.cs +++ b/Content.Shared/Salvage/SharedSalvageSystem.Magnet.cs @@ -2,6 +2,7 @@ using Content.Shared.Procedural; using Content.Shared.Procedural.PostGeneration; using Content.Shared.Random.Helpers; using Content.Shared.Salvage.Magnet; +using Content.Shared.Store; using Robust.Shared.Prototypes; using Robust.Shared.Utility; @@ -58,6 +59,7 @@ public abstract partial class SharedSalvageSystem // Salvage map seed _salvageMaps.Clear(); _salvageMaps.AddRange(_proto.EnumeratePrototypes()); + _salvageMaps.Sort((x, y) => string.Compare(x.ID, y.ID, StringComparison.Ordinal)); var mapIndex = rand.Next(_salvageMaps.Count); var map = _salvageMaps[mapIndex];