Replace VerbTypes with verb classes (#6525)
This commit is contained in:
@@ -12,7 +12,7 @@ namespace Content.Shared.Item
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<SharedItemComponent, GetInteractionVerbsEvent>(AddPickupVerb);
|
||||
SubscribeLocalEvent<SharedItemComponent, GetVerbsEvent<InteractionVerb>>(AddPickupVerb);
|
||||
|
||||
SubscribeLocalEvent<SharedSpriteComponent, GotEquippedEvent>(OnEquipped);
|
||||
SubscribeLocalEvent<SharedSpriteComponent, GotUnequippedEvent>(OnUnequipped);
|
||||
@@ -52,7 +52,7 @@ namespace Content.Shared.Item
|
||||
component.Visible = false;
|
||||
}
|
||||
|
||||
private void AddPickupVerb(EntityUid uid, SharedItemComponent component, GetInteractionVerbsEvent args)
|
||||
private void AddPickupVerb(EntityUid uid, SharedItemComponent component, GetVerbsEvent<InteractionVerb> args)
|
||||
{
|
||||
if (args.Hands == null ||
|
||||
args.Using != null ||
|
||||
@@ -61,7 +61,7 @@ namespace Content.Shared.Item
|
||||
!args.Hands.CanPickupEntityToActiveHand(args.Target))
|
||||
return;
|
||||
|
||||
Verb verb = new();
|
||||
InteractionVerb verb = new();
|
||||
verb.Act = () => args.Hands.TryPickupEntityToActiveHand(args.Target);
|
||||
verb.IconTexture = "/Textures/Interface/VerbIcons/pickup.svg.192dpi.png";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user