From 8e77faf71ec2e8b67ed3dfb896fafb4574919106 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Wed, 11 Oct 2023 08:33:17 +1100 Subject: [PATCH] Fix salvage faction non-determinism (#20886) --- Content.Shared/Salvage/SharedSalvageSystem.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Content.Shared/Salvage/SharedSalvageSystem.cs b/Content.Shared/Salvage/SharedSalvageSystem.cs index 918b18f8df..e5124ab4d0 100644 --- a/Content.Shared/Salvage/SharedSalvageSystem.cs +++ b/Content.Shared/Salvage/SharedSalvageSystem.cs @@ -48,6 +48,7 @@ public abstract class SharedSalvageSystem : EntitySystem var air = GetBiomeMod(biome.ID, rand, ref modifierBudget); var dungeon = GetBiomeMod(biome.ID, rand, ref modifierBudget); var factionProtos = _proto.EnumeratePrototypes().ToList(); + factionProtos.Sort((x, y) => string.Compare(x.ID, y.ID, StringComparison.Ordinal)); var faction = factionProtos[rand.Next(factionProtos.Count)]; var mods = new List(); -- 2.51.2