From 735ed9ea25467dd2551626e0a23464328083ca0a Mon Sep 17 00:00:00 2001 From: sleepyyapril Date: Sat, 4 Jul 2026 07:42:50 -0300 Subject: [PATCH 01/14] feat: loadout rework start --- .../Lobby/UI/HumanoidProfileEditor.xaml | 4 + .../_DEN/Lobby/UI/DenCategoryContainer.xaml | 13 ++ .../Lobby/UI/DenCategoryContainer.xaml.cs | 16 ++ .../_DEN/Lobby/UI/DenLoadoutButtons.xaml | 28 +++ .../_DEN/Lobby/UI/DenLoadoutButtons.xaml.cs | 18 ++ .../_DEN/Lobby/UI/DenLoadoutTab.xaml | 20 ++ .../_DEN/Lobby/UI/DenLoadoutTab.xaml.cs | 16 ++ Content.Server/Antag/AntagSelectionSystem.cs | 2 +- .../Station/Systems/StationSpawningSystem.cs | 2 +- .../Systems/StationSpawningSystem.DEN.cs | 51 +++++ Content.Shared/Clothing/LoadoutSystem.cs | 2 + Content.Shared/_DEN/Loadout/DenLoadout.cs | 24 ++ .../_DEN/Loadout/EntityLoadoutPrototype.cs | 106 +++++++++ .../_DEN/Loadout/LoadoutCategoryPrototype.cs | 29 +++ .../SharedStationSpawningSystem.DEN.cs | 213 ++++++++++++++++++ .../en-US/_DEN/loadout/test/loadout_test.ftl | 4 + .../_DEN/Loadouts/Test/loadout_test.yml | 6 + 17 files changed, 552 insertions(+), 2 deletions(-) create mode 100644 Content.Client/_DEN/Lobby/UI/DenCategoryContainer.xaml create mode 100644 Content.Client/_DEN/Lobby/UI/DenCategoryContainer.xaml.cs create mode 100644 Content.Client/_DEN/Lobby/UI/DenLoadoutButtons.xaml create mode 100644 Content.Client/_DEN/Lobby/UI/DenLoadoutButtons.xaml.cs create mode 100644 Content.Client/_DEN/Lobby/UI/DenLoadoutTab.xaml create mode 100644 Content.Client/_DEN/Lobby/UI/DenLoadoutTab.xaml.cs create mode 100644 Content.Server/_DEN/Station/Systems/StationSpawningSystem.DEN.cs create mode 100644 Content.Shared/_DEN/Loadout/DenLoadout.cs create mode 100644 Content.Shared/_DEN/Loadout/EntityLoadoutPrototype.cs create mode 100644 Content.Shared/_DEN/Loadout/LoadoutCategoryPrototype.cs create mode 100644 Content.Shared/_DEN/Station/Systems/SharedStationSpawningSystem.DEN.cs create mode 100644 Resources/Locale/en-US/_DEN/loadout/test/loadout_test.ftl create mode 100644 Resources/Prototypes/_DEN/Loadouts/Test/loadout_test.yml diff --git a/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml b/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml index 84c5b75d1cb..e4679d4c84f 100644 --- a/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml +++ b/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml @@ -4,6 +4,7 @@ xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls" xmlns:ui="clr-namespace:Content.Client.Lobby.UI" xmlns:profile="clr-namespace:Content.Client.Lobby.UI.ProfileEditorControls" + xmlns:den="clr-namespace:Content.Client._DEN.Lobby.UI" HorizontalExpand="True"> @@ -130,6 +131,9 @@ + + + diff --git a/Content.Client/_DEN/Lobby/UI/DenCategoryContainer.xaml b/Content.Client/_DEN/Lobby/UI/DenCategoryContainer.xaml new file mode 100644 index 00000000000..df667dc310c --- /dev/null +++ b/Content.Client/_DEN/Lobby/UI/DenCategoryContainer.xaml @@ -0,0 +1,13 @@ + + + + + + + diff --git a/Content.Client/_DEN/Lobby/UI/DenCategoryContainer.xaml.cs b/Content.Client/_DEN/Lobby/UI/DenCategoryContainer.xaml.cs new file mode 100644 index 00000000000..f83b467f245 --- /dev/null +++ b/Content.Client/_DEN/Lobby/UI/DenCategoryContainer.xaml.cs @@ -0,0 +1,16 @@ +using Robust.Client.AutoGenerated; +using Robust.Client.UserInterface.Controls; +using Robust.Client.UserInterface.XAML; + +namespace Content.Client._DEN.Lobby.UI; + +[GenerateTypedNameReferences] +public sealed partial class DenCategoryContainer : ContainerButton +{ + public DenCategoryContainer() + { + RobustXamlLoader.Load(this); + + + } +} diff --git a/Content.Client/_DEN/Lobby/UI/DenLoadoutButtons.xaml b/Content.Client/_DEN/Lobby/UI/DenLoadoutButtons.xaml new file mode 100644 index 00000000000..94e01dcf85a --- /dev/null +++ b/Content.Client/_DEN/Lobby/UI/DenLoadoutButtons.xaml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Content.Client/_DEN/Lobby/UI/DenCategoryContainer.xaml.cs b/Content.Client/_DEN/Lobby/UI/DenCategoryContainer.xaml.cs index f83b467f245..5895849ae85 100644 --- a/Content.Client/_DEN/Lobby/UI/DenCategoryContainer.xaml.cs +++ b/Content.Client/_DEN/Lobby/UI/DenCategoryContainer.xaml.cs @@ -5,12 +5,27 @@ namespace Content.Client._DEN.Lobby.UI; [GenerateTypedNameReferences] -public sealed partial class DenCategoryContainer : ContainerButton +public sealed partial class DenCategoryContainer : PanelContainer { + private bool _isExpanded; + public DenCategoryContainer() { RobustXamlLoader.Load(this); + HeaderButton.OnPressed += _ => ToggleExpanded(); + UpdateExpandedState(); + } + + private void ToggleExpanded() + { + _isExpanded = !_isExpanded; + UpdateExpandedState(); + } + private void UpdateExpandedState() + { + LoadoutContainer.Visible = _isExpanded; + ExpandIcon.Text = _isExpanded ? "▼" : "▶"; } } diff --git a/Content.Client/_DEN/Lobby/UI/DenLoadoutButtons.xaml b/Content.Client/_DEN/Lobby/UI/DenLoadoutButtons.xaml index 94e01dcf85a..2ea9e161c87 100644 --- a/Content.Client/_DEN/Lobby/UI/DenLoadoutButtons.xaml +++ b/Content.Client/_DEN/Lobby/UI/DenLoadoutButtons.xaml @@ -1,8 +1,11 @@ - + xmlns:ui="clr-namespace:Content.Client._DEN.Lobby.UI" + xmlns:graphics="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"> + + + + diff --git a/Content.Client/_DEN/Lobby/UI/DenLoadoutTab.xaml b/Content.Client/_DEN/Lobby/UI/DenLoadoutTab.xaml index cece372781f..866cf50c72e 100644 --- a/Content.Client/_DEN/Lobby/UI/DenLoadoutTab.xaml +++ b/Content.Client/_DEN/Lobby/UI/DenLoadoutTab.xaml @@ -1,20 +1,60 @@ - + + SeparationOverride="0"> + + +