Added OpenStorage trigger on ActivateItemInWorld

When ActivateItemInWorld is pressed when hovering over a InventoryButton and the InventorySlot contains a storage item, it will open the StorageGUI.
This commit is contained in:
ShadowCommander
2019-08-07 15:56:22 -07:00
parent 8c59d2e3b9
commit 7753ae7c3a
10 changed files with 90 additions and 42 deletions

View File

@@ -1,4 +1,4 @@
using Content.Client.UserInterface;
using Content.Client.UserInterface;
using Robust.Client.Console;
using Robust.Client.Interfaces.Input;
using Robust.Client.Interfaces.Placement;
@@ -49,9 +49,8 @@ namespace Content.Client
_escapeMenu.OnClose += () => _gameHud.EscapeButtonDown = false;
var escapeMenuCommand = InputCmdHandler.FromDelegate(Enabled);
_inputManager.SetInputCommand(EngineKeyFunctions.EscapeMenu, escapeMenuCommand);
_inputManager.SetInputCommand(EngineKeyFunctions.EscapeMenu,
InputCmdHandler.FromDelegate(s => Enabled()));
}
else if (obj.OldState is GameScreen)
{
@@ -63,7 +62,7 @@ namespace Content.Client
}
}
private void Enabled(ICommonSession session)
private void Enabled()
{
if (_escapeMenu.IsOpen)
{