Add Alt-click functionality (#4497)
* Fix ItemSlot Bug * Add Alt-use Key * Fix TransferAmount window bug * Alt-click functionality * Added AltInteract verbs * Add new verbs * verb icons * Changed Comments * Change Comments * Fix disposal verbs * Changed Get...() to Get...OrNull() * Changed alt-interact combat behaviour * Update verb icons * Inventory interact event * Add Alt+E secondary binding * Add alt-z keybinding * Rename AltUse -> AltActivateItemInWorld
This commit is contained in:
@@ -674,12 +674,12 @@ namespace Content.Shared.Hands.Components
|
||||
DoInteraction(activeHeldEntity, heldEntity);
|
||||
}
|
||||
|
||||
public void UseActiveHeldEntity()
|
||||
public void UseActiveHeldEntity(bool altInteract = false)
|
||||
{
|
||||
if (!TryGetActiveHeldEntity(out var heldEntity))
|
||||
return;
|
||||
|
||||
DoUse(heldEntity);
|
||||
DoUse(heldEntity, altInteract);
|
||||
}
|
||||
|
||||
public void ActivateHeldEntity(string handName)
|
||||
@@ -783,7 +783,7 @@ namespace Content.Shared.Hands.Components
|
||||
|
||||
protected virtual void DoInteraction(IEntity activeHeldEntity, IEntity heldEntity) { }
|
||||
|
||||
protected virtual void DoUse(IEntity heldEntity) { }
|
||||
protected virtual void DoUse(IEntity heldEntity, bool altInteract = false) { }
|
||||
|
||||
protected virtual void DoActivate(IEntity heldEntity) { }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user