diff --git a/Content.Server/Flash/FlashSystem.cs b/Content.Server/Flash/FlashSystem.cs index 94129e963a..4a1803edbc 100644 --- a/Content.Server/Flash/FlashSystem.cs +++ b/Content.Server/Flash/FlashSystem.cs @@ -10,6 +10,7 @@ using Content.Shared.Interaction.Events; using Content.Shared.Inventory; using Content.Shared.Physics; using Content.Shared.Popups; +using Content.Shared.Tag; using Robust.Server.GameObjects; using Robust.Shared.Audio; using Robust.Shared.Player; @@ -26,6 +27,7 @@ namespace Content.Server.Flash [Dependency] private readonly InventorySystem _inventorySystem = default!; [Dependency] private readonly MetaDataSystem _metaSystem = default!; [Dependency] private readonly SharedInteractionSystem _interactionSystem = default!; + [Dependency] private readonly TagSystem _tagSystem = default!; public override void Initialize() { @@ -76,7 +78,7 @@ namespace Content.Server.Flash Flash(e, args.User, uid, comp.FlashDuration, comp.SlowTo); } } - + private void OnFlashUseInHand(EntityUid uid, FlashComponent comp, UseInHandEvent args) { if (args.Handled || !UseFlash(comp, args.User)) @@ -97,6 +99,8 @@ namespace Content.Server.Flash if (--comp.Uses == 0) { sprite.LayerSetState(0, "burnt"); + + _tagSystem.AddTag(comp.Owner, "Trash"); comp.Owner.PopupMessage(user, Loc.GetString("flash-component-becomes-empty")); } else if (!comp.Flashing) diff --git a/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs b/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs index 6f36b6857c..7bc87af292 100644 --- a/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs +++ b/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs @@ -4,6 +4,7 @@ using Content.Shared.Clothing.EntitySystems; using Content.Shared.Interaction.Events; using Content.Shared.Item; using Content.Shared.Light.Component; +using Content.Shared.Tag; using Content.Shared.Verbs; using JetBrains.Annotations; using Robust.Server.GameObjects; @@ -17,6 +18,7 @@ namespace Content.Server.Light.EntitySystems { [Dependency] private readonly SharedItemSystem _item = default!; [Dependency] private readonly ClothingSystem _clothing = default!; + [Dependency] private readonly TagSystem _tagSystem = default!; public override void Initialize() { @@ -60,6 +62,8 @@ namespace Content.Server.Light.EntitySystems meta.EntityName = Loc.GetString(component.SpentName); meta.EntityDescription = Loc.GetString(component.SpentDesc); + _tagSystem.AddTag(component.Owner, "Trash"); + UpdateSpriteAndSounds(component); UpdateVisualizer(component); diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/skewer.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/skewer.yml index 8781e98595..88b536250f 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/skewer.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/skewer.yml @@ -42,6 +42,9 @@ - type: Sprite sprite: Objects/Consumable/Food/skewer.rsi state: skewer + - type: Tag + tags: + - Trash # Custom Kebab Example diff --git a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/spray.yml b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/spray.yml index 502ea56e60..afd87b996c 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/spray.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/spray.yml @@ -29,6 +29,8 @@ sprayVelocity: 2 spraySound: path: /Audio/Effects/spray2.ogg + - type: TrashOnEmpty + solution: spray - type: entity name: spray bottle diff --git a/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml b/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml index 212a0d981e..52b505374d 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml @@ -78,6 +78,8 @@ - type: SpaceGarbage - type: StaticPrice price: 75 # These are limited supply items. + - type: TrashOnEmpty + solution: pen - type: entity name: emergency medipen diff --git a/Resources/Prototypes/Entities/Objects/Tools/glowstick.yml b/Resources/Prototypes/Entities/Objects/Tools/glowstick.yml index 73772727a0..adadd3e4c2 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/glowstick.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/glowstick.yml @@ -4,9 +4,6 @@ id: GlowstickBase description: Useful for raves and emergencies. components: - - type: Tag - tags: - - Trash - type: Recyclable - type: SpaceGarbage - type: ExpendableLight