Revert "Actions Rework" (#6888)

This commit is contained in:
Leon Friedrich
2022-02-25 18:55:18 +13:00
committed by GitHub
parent 5ac5dd6a64
commit 49ae383f06
135 changed files with 5165 additions and 3119 deletions

View File

@@ -92,11 +92,10 @@ namespace Content.Shared.Hands
hands.Dirty();
var gotUnequipped = new GotUnequippedHandEvent(uid, entity, hand);
RaiseLocalEvent(entity, gotUnequipped, false);
var didUnequip = new DidUnequipHandEvent(uid, entity, hand);
RaiseLocalEvent(uid, didUnequip);
var unequippedHandMessage = new UnequippedHandEvent(uid, entity, hand);
RaiseLocalEvent(entity, unequippedHandMessage);
if (unequippedHandMessage.Handled)
return;
if (hand.Name == hands.ActiveHand)
RaiseLocalEvent(entity, new HandDeselectedEvent(uid, entity), false);
@@ -124,15 +123,11 @@ namespace Content.Shared.Hands
hands.Dirty();
var didEquip = new DidEquipHandEvent(uid, entity, hand);
RaiseLocalEvent(uid, didEquip, false);
var equippedHandMessage = new EquippedHandEvent(uid, entity, hand);
RaiseLocalEvent(entity, equippedHandMessage);
var gotEquipped = new GotEquippedHandEvent(uid, entity, hand);
RaiseLocalEvent(entity, gotEquipped);
// TODO this should REALLY be a cancellable thing, not a handled event.
// If one of the interactions resulted in the item being dropped, return early.
if (gotEquipped.Handled)
if (equippedHandMessage.Handled)
return;
if (hand.Name == hands.ActiveHand)