Fix salvage magnet determinism (#23655)

Machine-specific moment, you'd think I'd remember from expeditions.
This commit is contained in:
metalgearsloth
2024-01-07 14:23:44 +11:00
committed by GitHub
parent fed15b0330
commit fb24f9accf

View File

@@ -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<SalvageMapPrototype>());
_salvageMaps.Sort((x, y) => string.Compare(x.ID, y.ID, StringComparison.Ordinal));
var mapIndex = rand.Next(_salvageMaps.Count);
var map = _salvageMaps[mapIndex];