Files
tbd-station-14/Content.Client/GameObjects/EntitySystems/ClientInventorySystem.cs
ike709 1d052d0410 Improves the HUD (#3655)
* All good except the combat doll

* Makes the HUD inventory less terrible

* Cleanup, nuke the Combat Mode button

* Harm icon

* Switch the icon

* Basic goon hud

* Toggleable

* Nuke the popup, properly centers it

* Fix clicking the button

* Nuke some old code

* missed a comment

* Remove defaults

* Localization

* Nuke some old yaml

* New sprites

Co-authored-by: ike709 <sparebytes@protonmail.com>
2021-03-27 02:23:12 +11:00

41 lines
1.2 KiB
C#

using Content.Client.GameObjects.Components.HUD.Inventory;
using Content.Client.UserInterface;
using Content.Shared.Input;
using JetBrains.Annotations;
using Robust.Client.Player;
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.GameObjects;
using Robust.Shared.Input.Binding;
using Robust.Shared.IoC;
namespace Content.Client.GameObjects.EntitySystems
{
[UsedImplicitly]
public sealed class ClientInventorySystem : EntitySystem
{
[Dependency] private readonly IGameHud _gameHud = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
public override void Initialize()
{
base.Initialize();
CommandBinds.Builder
.Bind(ContentKeyFunctions.OpenInventoryMenu,
InputCmdHandler.FromDelegate(_ => HandleOpenInventoryMenu()))
.Register<ClientInventorySystem>();
}
public override void Shutdown()
{
CommandBinds.Unregister<ClientInventorySystem>();
base.Shutdown();
}
private void HandleOpenInventoryMenu()
{
_gameHud.InventoryButtonDown = !_gameHud.InventoryButtonDown;
}
}
}