]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Don't use invalid defaults for loadouts (#28729)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Sat, 8 Jun 2024 18:43:21 +0000 (04:43 +1000)
committerGitHub <noreply@github.com>
Sat, 8 Jun 2024 18:43:21 +0000 (14:43 -0400)
At the time it made more sense but now with species specific stuff it's better to have nothing.

Content.Shared/Preferences/Loadouts/RoleLoadout.cs

index b9d3a88338e8d9337074e731a6b3508baf687166..18c3501ea61e1d25a3d80572d1514ef648fe9a21 100644 (file)
@@ -127,7 +127,10 @@ public sealed partial class RoleLoadout : IEquatable<RoleLoadout>
                     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);
                 }