]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Hidden loadout groups (#29170)
authorErrant <35878406+Errant-4@users.noreply.github.com>
Wed, 19 Jun 2024 00:26:46 +0000 (02:26 +0200)
committerGitHub <noreply@github.com>
Wed, 19 Jun 2024 00:26:46 +0000 (10:26 +1000)
* loadout hiding

* department of redundancy department

Content.Client/Lobby/UI/Loadouts/LoadoutWindow.xaml.cs
Content.Shared/Preferences/Loadouts/LoadoutGroupPrototype.cs

index 2737eef1f1ab02eb76296377003025b40fdca2b3..d029eb1223d8df4ed8289aba86158f05670aa957 100644 (file)
@@ -29,6 +29,9 @@ public sealed partial class LoadoutWindow : FancyWindow
             if (!protoManager.TryIndex(group, out var groupProto))
                 continue;
 
+            if (groupProto.Hidden)
+                continue;
+
             var container = new LoadoutGroupContainer(profile, loadout, protoManager.Index(group), session, collection);
             LoadoutGroupsContainer.AddTab(container, Loc.GetString(groupProto.Name));
             _groups.Add(container);
index 1d41f8dd7f9b53817a051f1317f69197a55979c8..0c787e965f1bd4f02ff9f1c79b28fb79f5ecc37b 100644 (file)
@@ -29,6 +29,12 @@ public sealed partial class LoadoutGroupPrototype : IPrototype
     [DataField]
     public int MaxLimit = 1;
 
+    /// <summary>
+    /// Hides the loadout group from the player.
+    /// </summary>
+    [DataField]
+    public bool Hidden;
+
     [DataField(required: true)]
     public List<ProtoId<LoadoutPrototype>> Loadouts = new();
 }