From 9b2f9ce05f7efc5ad57c45b8dd4295902ff08c72 Mon Sep 17 00:00:00 2001 From: Errant <35878406+Errant-4@users.noreply.github.com> Date: Wed, 19 Jun 2024 02:26:46 +0200 Subject: [PATCH] Hidden loadout groups (#29170) * loadout hiding * department of redundancy department --- Content.Client/Lobby/UI/Loadouts/LoadoutWindow.xaml.cs | 3 +++ .../Preferences/Loadouts/LoadoutGroupPrototype.cs | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/Content.Client/Lobby/UI/Loadouts/LoadoutWindow.xaml.cs b/Content.Client/Lobby/UI/Loadouts/LoadoutWindow.xaml.cs index 2737eef1f1a..d029eb1223d 100644 --- a/Content.Client/Lobby/UI/Loadouts/LoadoutWindow.xaml.cs +++ b/Content.Client/Lobby/UI/Loadouts/LoadoutWindow.xaml.cs @@ -29,6 +29,9 @@ public LoadoutWindow(HumanoidCharacterProfile profile, RoleLoadout loadout, Role 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); diff --git a/Content.Shared/Preferences/Loadouts/LoadoutGroupPrototype.cs b/Content.Shared/Preferences/Loadouts/LoadoutGroupPrototype.cs index 1d41f8dd7f9..0c787e965f1 100644 --- a/Content.Shared/Preferences/Loadouts/LoadoutGroupPrototype.cs +++ b/Content.Shared/Preferences/Loadouts/LoadoutGroupPrototype.cs @@ -29,6 +29,12 @@ public sealed partial class LoadoutGroupPrototype : IPrototype [DataField] public int MaxLimit = 1; + /// + /// Hides the loadout group from the player. + /// + [DataField] + public bool Hidden; + [DataField(required: true)] public List> Loadouts = new(); }