Fix item actions (#6383)

This commit is contained in:
Leon Friedrich
2022-01-31 20:07:03 +13:00
committed by GitHub
parent 9a9bfda101
commit af13751600
2 changed files with 29 additions and 25 deletions

View File

@@ -178,27 +178,6 @@ namespace Content.Shared.Actions.Components
{
GrantOrUpdate(actionType, toggleOn: toggleOn);
}
public void EquippedHand(EntityUid user, Hand hand)
{
// this entity cannot be granted actions if no actions component
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent<SharedActionsComponent?>(user, out var actionsComponent))
return;
Holder = user;
HolderActionsComponent = actionsComponent;
IsEquipped = true;
InHand = hand;
GrantOrUpdateAllToHolder();
}
public void UnequippedHand()
{
RevokeAllFromHolder();
Holder = null;
HolderActionsComponent = null;
IsEquipped = false;
InHand = null;
}
}
/// <summary>