예제 #1
0
 private void OnGotUnequipped(EntityUid uid, MagbootsComponent component, GotUnequippedEvent args)
 {
     if (args.Slot == "shoes")
     {
         UpdateMagbootEffects(args.Equipee, uid, false, component);
     }
 }
예제 #2
0
        private void OnUnequipped(EntityUid uid, SuitSensorComponent component, GotUnequippedEvent args)
        {
            if (args.Slot != component.ActivationSlot)
            {
                return;
            }

            component.User = null;
        }
        private void OnUnequipped(EntityUid uid, StethoscopeComponent component, GotUnequippedEvent args)
        {
            if (!component.IsActive)
            {
                return;
            }

            RemComp <WearingStethoscopeComponent>(args.Equipee);
            component.IsActive = false;
        }
예제 #4
0
        // set to untoggled when unequipped, so it isn't left in a 'pulled down' state
        private void OnGotUnequipped(EntityUid uid, MaskComponent mask, GotUnequippedEvent args)
        {
            if (mask.ToggleAction == null)
            {
                return;
            }

            mask.IsToggled = false;
            _actionSystem.SetToggled(mask.ToggleAction, mask.IsToggled);

            ToggleMaskComponents(uid, mask, args.Equipee, true);
        }
 private void OnUnequipped(EntityUid uid, BlindfoldComponent component, GotUnequippedEvent args)
 {
     if (!component.IsActive)
     {
         return;
     }
     component.IsActive = false;
     if (!TryComp <BlindableComponent>(args.Equipee, out var blindComp))
     {
         return;
     }
     AdjustBlindSources(args.Equipee, false, blindComp);
 }
    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);
    }
예제 #7
0
 private void OnGotUnequipped(EntityUid uid, BreathToolComponent component, GotUnequippedEvent args)
 {
     component.DisconnectInternals();
 }
예제 #8
0
 private void OnGotUnequipped(EntityUid uid, RgbLightControllerComponent rgb, GotUnequippedEvent args)
 {
     rgb.Holder       = null;
     rgb.HolderLayers = null;
 }
    private void OnGotUnequipped(EntityUid uid, AddAccentClothingComponent component, GotUnequippedEvent args)
    {
        if (!component.IsActive)
        {
            return;
        }

        // try to remove accent
        var componentType = _componentFactory.GetRegistration(component.Accent).Type;

        if (EntityManager.HasComponent(args.Equipee, componentType))
        {
            EntityManager.RemoveComponent(args.Equipee, componentType);
        }

        component.IsActive = false;
    }
예제 #10
0
        // Although netsync is being set to false for items client can still update these
        // Realistically:
        // Container should already hide these
        // Client is the only thing that matters.

        private void OnUnequipped(EntityUid uid, SharedSpriteComponent component, GotUnequippedEvent args)
        {
            component.Visible = true;
        }
예제 #11
0
 private void OnGotUnequipped(EntityUid uid, BreathToolComponent component, GotUnequippedEvent args)
 {
     _atmosphereSystem.DisconnectInternals(component);
 }