Equipment verbs & admin inventory access. (#14315)
This commit is contained in:
@@ -5,12 +5,15 @@ using Content.Client.Strip;
|
||||
using Content.Client.Stylesheets;
|
||||
using Content.Client.UserInterface.Controls;
|
||||
using Content.Client.UserInterface.Systems.Hands.Controls;
|
||||
using Content.Client.Verbs;
|
||||
using Content.Client.Verbs.UI;
|
||||
using Content.Shared.Ensnaring.Components;
|
||||
using Content.Shared.Hands.Components;
|
||||
using Content.Shared.IdentityManagement;
|
||||
using Content.Shared.Input;
|
||||
using Content.Shared.Inventory;
|
||||
using Content.Shared.Strip.Components;
|
||||
using Content.Shared.Verbs;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.ResourceManagement;
|
||||
@@ -19,6 +22,7 @@ using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Shared.Input;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Utility;
|
||||
using static Content.Client.Inventory.ClientInventorySystem;
|
||||
using static Robust.Client.UserInterface.Control;
|
||||
|
||||
@@ -31,6 +35,7 @@ namespace Content.Client.Inventory
|
||||
|
||||
[Dependency] private readonly IPrototypeManager _protoMan = default!;
|
||||
[Dependency] private readonly IEntityManager _entMan = default!;
|
||||
[Dependency] private readonly IUserInterfaceManager _ui = default!;
|
||||
private ExamineSystem _examine = default!;
|
||||
private InventorySystem _inv = default!;
|
||||
|
||||
@@ -170,15 +175,16 @@ namespace Content.Client.Inventory
|
||||
if (ev.Function == EngineKeyFunctions.Use)
|
||||
{
|
||||
SendMessage(new StrippingSlotButtonPressed(slot.SlotName, slot is HandButton));
|
||||
}
|
||||
else if (ev.Function == ContentKeyFunctions.ExamineEntity && slot.Entity != null)
|
||||
{
|
||||
_examine.DoExamine(slot.Entity.Value);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ev.Function != EngineKeyFunctions.Use)
|
||||
if (slot.Entity == null)
|
||||
return;
|
||||
|
||||
if (ev.Function == ContentKeyFunctions.ExamineEntity)
|
||||
_examine.DoExamine(slot.Entity.Value);
|
||||
else if (ev.Function == EngineKeyFunctions.UseSecondary)
|
||||
_ui.GetUIController<VerbMenuUIController>().OpenVerbMenu(slot.Entity.Value);
|
||||
}
|
||||
|
||||
private void AddInventoryButton(string slotId, InventoryTemplatePrototype template, InventoryComponent inv)
|
||||
|
||||
Reference in New Issue
Block a user