private void OnEntRemoved(EntityUid uid, InventoryComponent component, EntRemovedFromContainerMessage args)
    {
        if (!TryGetSlot(uid, args.Container.ID, out var slotDef, inventory: component))
        {
            return;
        }

        var unequippedEvent = new DidUnequipEvent(uid, args.Entity, slotDef);

        RaiseLocalEvent(uid, unequippedEvent);

        var gotUnequippedEvent = new GotUnequippedEvent(uid, args.Entity, slotDef);

        RaiseLocalEvent(args.Entity, gotUnequippedEvent);
    }
 private void OnDidUnequip(EntityUid uid, ActionsComponent component, DidUnequipEvent args)
 {
     RemoveProvidedActions(uid, args.Equipment, component);
 }
示例#3
0
 private void OnDidUnequip(EntityUid uid, StrippableComponent component, DidUnequipEvent args)
 {
     SendUpdate(uid, component);
 }