Add alt click to hands (#12330)
This commit is contained in:
@@ -242,6 +242,16 @@ namespace Content.Client.Hands.Systems
|
||||
|
||||
_verbs.VerbMenu.OpenVerbMenu(entity);
|
||||
}
|
||||
|
||||
public void UIHandAltActivateItem(string handName)
|
||||
{
|
||||
if (!TryGetPlayerHands(out var hands)
|
||||
|| !hands.Hands.TryGetValue(handName, out var hand)
|
||||
|| hand.HeldEntity is not { Valid: true } entity)
|
||||
return;
|
||||
|
||||
EntityManager.RaisePredictiveEvent(new RequestHandAltInteractEvent(entity));
|
||||
}
|
||||
|
||||
#region visuals
|
||||
|
||||
|
||||
@@ -69,17 +69,25 @@ public sealed class HandsUIController : UIController, IOnStateEntered<GameplaySt
|
||||
return;
|
||||
}
|
||||
|
||||
if (args.Function == ContentKeyFunctions.ExamineEntity)
|
||||
if (args.Function == EngineKeyFunctions.UIClick)
|
||||
{
|
||||
_handsSystem.UIInventoryExamine(hand.SlotName);
|
||||
_handsSystem.UIHandClick(_playerHandsComponent, hand.SlotName);
|
||||
}
|
||||
else if (args.Function == EngineKeyFunctions.UseSecondary)
|
||||
{
|
||||
_handsSystem.UIHandOpenContextMenu(hand.SlotName);
|
||||
}
|
||||
else if (args.Function == EngineKeyFunctions.UIClick)
|
||||
else if (args.Function == ContentKeyFunctions.ActivateItemInWorld)
|
||||
{
|
||||
_handsSystem.UIHandClick(_playerHandsComponent, hand.SlotName);
|
||||
_handsSystem.UIHandActivate(hand.SlotName);
|
||||
}
|
||||
else if (args.Function == ContentKeyFunctions.AltActivateItemInWorld)
|
||||
{
|
||||
_handsSystem.UIHandAltActivateItem(hand.SlotName);
|
||||
}
|
||||
else if (args.Function == ContentKeyFunctions.ExamineEntity)
|
||||
{
|
||||
_handsSystem.UIInventoryExamine(hand.SlotName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user