private void OnGotUnequipped(EntityUid uid, MagbootsComponent component, GotUnequippedEvent args) { if (args.Slot == "shoes") { UpdateMagbootEffects(args.Equipee, uid, false, component); } }
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; }
// 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); }
private void OnGotUnequipped(EntityUid uid, BreathToolComponent component, GotUnequippedEvent args) { component.DisconnectInternals(); }
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; }
// 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; }
private void OnGotUnequipped(EntityUid uid, BreathToolComponent component, GotUnequippedEvent args) { _atmosphereSystem.DisconnectInternals(component); }