From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Sat, 8 Jun 2024 18:43:21 +0000 (+1000) Subject: Don't use invalid defaults for loadouts (#28729) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=1fdbf9403a6d28ffefc867aeb21db3db017a6404;p=space-station-14.git Don't use invalid defaults for loadouts (#28729) At the time it made more sense but now with species specific stuff it's better to have nothing. --- diff --git a/Content.Shared/Preferences/Loadouts/RoleLoadout.cs b/Content.Shared/Preferences/Loadouts/RoleLoadout.cs index b9d3a88338..18c3501ea6 100644 --- a/Content.Shared/Preferences/Loadouts/RoleLoadout.cs +++ b/Content.Shared/Preferences/Loadouts/RoleLoadout.cs @@ -127,7 +127,10 @@ public sealed partial class RoleLoadout : IEquatable if (loadouts.Contains(defaultLoadout)) continue; - // Still need to apply the effects even if validation is ignored. + // Not valid so don't default to it anyway. + if (!IsValid(profile, session, defaultLoadout.Prototype, collection, out _)) + continue; + loadouts.Add(defaultLoadout); Apply(loadoutProto); }