From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Tue, 10 Oct 2023 21:33:17 +0000 (+1100) Subject: Fix salvage faction non-determinism (#20886) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=8e77faf71ec2e8b67ed3dfb896fafb4574919106;p=space-station-14.git Fix salvage faction non-determinism (#20886) --- 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();