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:
Leon Friedrich
2021-08-22 03:20:18 +10:00
committed by GitHub
parent ad5f7bb71b
commit 486dc6ca62
51 changed files with 748 additions and 53 deletions

View File

@@ -1,3 +1,4 @@
using System;
using System.Linq;
using Content.Shared.Notification;
using Content.Shared.Notification.Managers;
@@ -9,6 +10,7 @@ using Robust.Shared.Localization;
using Robust.Shared.Map;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Broadphase;
using Robust.Shared.Serialization;
namespace Content.Shared.Interaction
{
@@ -338,4 +340,27 @@ namespace Content.Shared.Interaction
return inRange;
}
}
/// <summary>
/// Raised when a player attempts to activate an item in an inventory slot or hand slot
/// </summary>
[Serializable, NetSerializable]
public class InteractInventorySlotEvent : EntityEventArgs
{
/// <summary>
/// Entity that was interacted with.
/// </summary>
public EntityUid ItemUid { get; }
/// <summary>
/// Whether the interaction used the alt-modifier to trigger alternative interactions.
/// </summary>
public bool AltInteract { get; }
public InteractInventorySlotEvent(EntityUid itemUid, bool altInteract = false)
{
ItemUid = itemUid;
AltInteract = altInteract;
}
}
}