Enable verbs for items in storage and prevent orphaned nested UIs (#5512)

This commit is contained in:
Leon Friedrich
2021-11-29 12:25:22 +13:00
committed by GitHub
parent 3601416f72
commit 22ee9f5e83
9 changed files with 190 additions and 86 deletions

View File

@@ -6,8 +6,6 @@ using Content.Client.Verbs;
using Content.Client.Viewport;
using Content.Shared.CCVar;
using Content.Shared.Input;
using Content.Shared.Interaction.Helpers;
using Content.Shared.Verbs;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.Input;
@@ -121,8 +119,12 @@ namespace Content.Client.ContextMenu.UI
}
// do some other server-side interaction?
if (args.Function == EngineKeyFunctions.Use || args.Function == ContentKeyFunctions.AltActivateItemInWorld || args.Function == ContentKeyFunctions.Point ||
args.Function == ContentKeyFunctions.TryPullObject || args.Function == ContentKeyFunctions.MovePulledObject)
if (args.Function == EngineKeyFunctions.Use ||
args.Function == ContentKeyFunctions.ActivateItemInWorld ||
args.Function == ContentKeyFunctions.AltActivateItemInWorld ||
args.Function == ContentKeyFunctions.Point ||
args.Function == ContentKeyFunctions.TryPullObject ||
args.Function == ContentKeyFunctions.MovePulledObject)
{
var inputSys = _systemManager.GetEntitySystem<InputSystem>();
@@ -142,11 +144,6 @@ namespace Content.Client.ContextMenu.UI
args.Handle();
return;
}
if (_itemSlotManager.OnButtonPressed(args, entity))
{
_verbSystem.CloseAllMenus();
}
}
private bool HandleOpenEntityMenu(in PointerInputCmdHandler.PointerInputCmdArgs args)