]> git.smokeofanarchy.ru Git - space-station-14.git/commit
Fire extinguishers can now extinguish items, including when held/worn (#36267)
authorPieter-Jan Briers <pieterjan.briers+git@gmail.com>
Mon, 14 Apr 2025 09:00:47 +0000 (11:00 +0200)
committerGitHub <noreply@github.com>
Mon, 14 Apr 2025 09:00:47 +0000 (19:00 +1000)
commit843d79be5f49855d14dc2875e879583b17e9cd4d
tree79b40a5a6d0c682a87adba11323eea733e9982b7
parentd0b4f4744c9a4846cced6584136f4e132595b799
Fire extinguishers can now extinguish items, including when held/worn (#36267)

* Fire extinguishers now put out candles

This did not actually require any changes to flammable or extinguishers directly, the only necessary changes were to make the collision actually work.

Vapor entities (also used for fire extinguishers) now have a collision layer, so they can hit items.

Added a new FlammableSetCollisionWake component to actually enable collision on candles while they are lit, because otherwise CollisionWake on entities gets in the way too.

* Extinguishing items is now relayed to held/worn items

This means held candles get extinguished too.

Involved moving the core logic of ExtinguishReaction into an event so that it can be relayed via the existing hand/inventory relay logic.

* Add helper functions for subscribing to relayed events.

Use these in FlammableSystem

* Make extinguishers work on cigarettes too

A bunch of renaming to make the rest of my code work with SmokableComponent

---------

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
12 files changed:
Content.Server/Atmos/EntitySystems/FlammableSystem.cs
Content.Server/EntityEffects/Effects/ExtinguishReaction.cs
Content.Server/Nutrition/EntitySystems/SmokingSystem.cs
Content.Shared/Atmos/Components/ExtinguishableSetCollisionWakeComponent.cs [new file with mode: 0644]
Content.Shared/Atmos/EntitySystems/ExtinguishableSetCollisionWakeSystem.cs [new file with mode: 0644]
Content.Shared/Atmos/FireEvents.cs [new file with mode: 0644]
Content.Shared/Hands/EntitySystems/SharedHandsSystem.Relay.cs
Content.Shared/Inventory/InventorySystem.Relay.cs
Content.Shared/Inventory/RelaySubscriptionHelpers.cs [new file with mode: 0644]
Resources/Prototypes/Entities/Objects/Consumable/Smokeables/base_smokeables.yml
Resources/Prototypes/Entities/Objects/Misc/candles.yml
Resources/Prototypes/Entities/Objects/Specific/Janitorial/spray.yml