From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Sat, 8 Jun 2024 10:03:54 +0000 (+1000) Subject: Add loadout group check for role proto (#28731) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=45015188cd5d6c0df9da9b63c7d54de48ec2009c;p=space-station-14.git Add loadout group check for role proto (#28731) MFW same bug twice at 2 layers because I'm stupid. --- diff --git a/Content.Shared/Preferences/Loadouts/RoleLoadout.cs b/Content.Shared/Preferences/Loadouts/RoleLoadout.cs index 479974893c..b9d3a88338 100644 --- a/Content.Shared/Preferences/Loadouts/RoleLoadout.cs +++ b/Content.Shared/Preferences/Loadouts/RoleLoadout.cs @@ -64,6 +64,13 @@ public sealed partial class RoleLoadout : IEquatable foreach (var (group, groupLoadouts) in SelectedLoadouts) { + // Check the group is even valid for this role. + if (!roleProto.Groups.Contains(group)) + { + groupRemove.Add(group); + continue; + } + // Dump if Group doesn't exist if (!protoManager.TryIndex(group, out var groupProto)) {