From: Errant <35878406+Errant-4@users.noreply.github.com> Date: Wed, 19 Jun 2024 00:26:46 +0000 (+0200) Subject: Hidden loadout groups (#29170) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=9b2f9ce05f7efc5ad57c45b8dd4295902ff08c72;p=space-station-14.git Hidden loadout groups (#29170) * loadout hiding * department of redundancy department --- diff --git a/Content.Client/Lobby/UI/Loadouts/LoadoutWindow.xaml.cs b/Content.Client/Lobby/UI/Loadouts/LoadoutWindow.xaml.cs index 2737eef1f1..d029eb1223 100644 --- a/Content.Client/Lobby/UI/Loadouts/LoadoutWindow.xaml.cs +++ b/Content.Client/Lobby/UI/Loadouts/LoadoutWindow.xaml.cs @@ -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); diff --git a/Content.Shared/Preferences/Loadouts/LoadoutGroupPrototype.cs b/Content.Shared/Preferences/Loadouts/LoadoutGroupPrototype.cs index 1d41f8dd7f..0c787e965f 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(); }