Add alt click to hands (#12330)
This commit is contained in:
@@ -17,6 +17,7 @@ public abstract partial class SharedHandsSystem : EntitySystem
|
||||
SubscribeAllEvent<RequestHandInteractUsingEvent>(HandleInteractUsingInHand);
|
||||
SubscribeAllEvent<RequestUseInHandEvent>(HandleUseInHand);
|
||||
SubscribeAllEvent<RequestMoveHandItemEvent>(HandleMoveItemFromHand);
|
||||
SubscribeAllEvent<RequestHandAltInteractEvent>(HandleHandAltInteract);
|
||||
|
||||
SubscribeLocalEvent<SharedHandsComponent, ExaminedEvent>(HandleExamined);
|
||||
|
||||
@@ -65,6 +66,12 @@ public abstract partial class SharedHandsSystem : EntitySystem
|
||||
TryInteractHandWithActiveHand(args.SenderSession.AttachedEntity.Value, msg.HandName);
|
||||
}
|
||||
|
||||
private void HandleHandAltInteract(RequestHandAltInteractEvent msg, EntitySessionEventArgs args)
|
||||
{
|
||||
if (args.SenderSession.AttachedEntity != null)
|
||||
TryUseItemInHand(args.SenderSession.AttachedEntity.Value, true);
|
||||
}
|
||||
|
||||
private void SwapHandsPressed(ICommonSession? session)
|
||||
{
|
||||
if (!TryComp(session?.AttachedEntity, out SharedHandsComponent? component))
|
||||
|
||||
Reference in New Issue
Block a user