New belt controls (#1298)

* Work for a madman

* God, that's a lot of hardcoding

* Fixed belt2 smartequip and cleaned up

* Continued clean up

* No scope creep!

* Replaced belt1 for upstream default belt

* Moved CP14OpenSkillMenu to CP14ContentContexts

* Changed naming of belt1 textures to just belt

* Updated new belt1 refrences

* I forgot to edit the RSI meta

* fix all BELT1 Texture instance

---------

Co-authored-by: Red <96445749+TheShuEd@users.noreply.github.com>
This commit is contained in:
TheKittehJesus
2025-06-03 06:39:39 -05:00
committed by GitHub
parent 0558da566a
commit 4c7b035c9c
84 changed files with 145 additions and 93 deletions

View File

@@ -40,7 +40,7 @@ public sealed class ClientClothingSystem : ClothingSystem
{Jumpsuit, "INNERCLOTHING"},
{"neck", "NECK"},
{"back", "BACKPACK"},
{"belt1", "BELT1"},
{"belt", "BELT"},
{"belt2", "BELT2"},
{"gloves", "HAND"},
{"shoes", "FEET"},

View File

@@ -1,5 +1,6 @@
using Content.Client._CP14.Discord;
using Content.Client._CP14.JoinQueue;
using Content.Client._CP14.Input;
using Content.Client.Administration.Managers;
using Content.Client.Changelog;
using Content.Client.Chat.Managers;
@@ -171,6 +172,7 @@ namespace Content.Client.Entry
_parallaxManager.LoadDefaultParallax();
//CP14
CP14ContentContexts.SetupContexts(_inputManager.Contexts);
_overlayManager.AddOverlay(new CP14BasePostProcessOverlay());
_discordAuth.Initialize();
_joinQueueManager.Initialize();

View File

@@ -85,9 +85,6 @@ namespace Content.Client.Input
human.AddFunction(ContentKeyFunctions.Arcade1);
human.AddFunction(ContentKeyFunctions.Arcade2);
human.AddFunction(ContentKeyFunctions.Arcade3);
//CP14 Keys
human.AddFunction(ContentKeyFunctions.CP14OpenSkillMenu);
//CP14 Keys end
// actions should be common (for ghosts, mobs, etc)
common.AddFunction(ContentKeyFunctions.OpenActionsMenu);

View File

@@ -1,3 +1,4 @@
using Content.Shared._CP14.Input;
using System.Numerics;
using Content.Client.Stylesheets;
using Content.Shared.CCVar;
@@ -313,7 +314,9 @@ namespace Content.Client.Options.UI.Tabs
//CP14
AddHeader("ui-options-header-cp14");
AddButton(ContentKeyFunctions.CP14OpenSkillMenu);
AddButton(CP14ContentKeyFunctions.CP14OpenSkillMenu);
AddButton(CP14ContentKeyFunctions.OpenBelt2);
AddButton(CP14ContentKeyFunctions.SmartEquipBelt2);
//CP14 end
foreach (var control in _keyControls.Values)

View File

@@ -3,6 +3,7 @@
xmlns:style="clr-namespace:Content.Client.Stylesheets"
xmlns:ic="clr-namespace:Robust.Shared.Input;assembly=Robust.Shared"
xmlns:is="clr-namespace:Content.Shared.Input;assembly=Content.Shared"
xmlns:isc="clr-namespace:Content.Shared._CP14.Input;assembly=Content.Shared"
xmlns:xe="clr-namespace:Content.Client.UserInterface.XamlExtensions"
xmlns:ui="clr-namespace:Content.Client.UserInterface.Controls"
xmlns:widgets="clr-namespace:Content.Client.UserInterface.Systems.MenuBar.Widgets"
@@ -39,7 +40,7 @@
Access="Internal"
Icon="{xe:Tex '/Textures/Interface/students-cap.svg.192dpi.png'}"
ToolTip="{Loc 'cp14-game-hud-open-skill-menu-button-tooltip'}"
BoundKey = "{x:Static is:ContentKeyFunctions.CP14OpenSkillMenu}"
BoundKey = "{x:Static isc:CP14ContentKeyFunctions.CP14OpenSkillMenu}"
MinSize="42 64"
HorizontalExpand="True"
AppendStyleClass="{x:Static style:StyleBase.ButtonSquare}"

View File

@@ -0,0 +1,16 @@
using Content.Shared._CP14.Input;
using Robust.Shared.Input;
namespace Content.Client._CP14.Input
{
public static class CP14ContentContexts
{
public static void SetupContexts(IInputContextContainer contexts)
{
var human = contexts.GetContext("human");
human.AddFunction(CP14ContentKeyFunctions.OpenBelt2);
human.AddFunction(CP14ContentKeyFunctions.SmartEquipBelt2);
human.AddFunction(CP14ContentKeyFunctions.CP14OpenSkillMenu);
}
}
}

View File

@@ -11,6 +11,7 @@ using Content.Shared._CP14.Skill.Components;
using Content.Shared._CP14.Skill.Prototypes;
using Content.Shared._CP14.Skill.Restrictions;
using Content.Shared.Input;
using Content.Shared._CP14.Input;
using JetBrains.Annotations;
using Robust.Client.Player;
using Robust.Client.UserInterface;
@@ -53,7 +54,7 @@ public sealed class CP14SkillUIController : UIController, IOnStateEntered<Gamepl
LayoutContainer.SetAnchorPreset(_window, LayoutContainer.LayoutPreset.CenterTop);
CommandBinds.Builder
.Bind(ContentKeyFunctions.CP14OpenSkillMenu,
.Bind(CP14ContentKeyFunctions.CP14OpenSkillMenu,
InputCmdHandler.FromDelegate(_ => ToggleWindow()))
.Register<CP14SkillUIController>();