From 45015188cd5d6c0df9da9b63c7d54de48ec2009c Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Sat, 8 Jun 2024 20:03:54 +1000 Subject: [PATCH] Add loadout group check for role proto (#28731) MFW same bug twice at 2 layers because I'm stupid. --- Content.Shared/Preferences/Loadouts/RoleLoadout.cs | 7 +++++++ 1 file changed, 7 insertions(+) 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)) {