Files
Bubberstation/code/datums/elements/watery_tile.dm
SkyratBot 0733a4e1bb [MIRROR] Water tiles now put out burning atoms (#27380)
* Water tiles now put out burning atoms (#82735)

## About The Pull Request

This adds a new "watery tile" element, currently used for (you guessed
it) water turfs.

This makes a tile extinguish any atom that passes through it. It also
makes mobs wet!

![fire
test](https://github.com/tgstation/tgstation/assets/28870487/4a19c921-37f3-428d-bb94-0baef7589e1b)

This required a minor amount of under-the-hood work regarding
firestacks. Essentially, they now get put out when the atom-level
`extinguish()` proc is called, as they are now receptive to the
`COMSIG_ATOM_EXTINGUISH` signal.

## Why It's Good For The Game

It makes sense to me! If I was playing another simulation game and dived
into a pool of water on fire, only to remain on fire, I would be very
confused and disturbed.

Also, it's good for immersion. Get it? Like, because water tiles also
have the immerse element?
## Changelog
🆑 Rhials
qol: Water tiles now extinguish fires on items and people.
/🆑

* Water tiles now put out burning atoms

---------

Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com>
2024-04-26 20:45:34 -04:00

22 lines
577 B
Plaintext

/datum/element/watery_tile
element_flags = ELEMENT_DETACH_ON_HOST_DESTROY
/datum/element/watery_tile/Attach(turf/target)
. = ..()
if(!isturf(target))
return ELEMENT_INCOMPATIBLE
RegisterSignal(target, COMSIG_ATOM_ENTERED, PROC_REF(extinguish_atom))
/datum/element/watery_tile/Detach(turf/source)
UnregisterSignal(source, COMSIG_ATOM_ENTERED)
return ..()
/datum/element/watery_tile/proc/extinguish_atom(atom/source, atom/movable/entered)
SIGNAL_HANDLER
entered.extinguish()
if(isliving(entered))
var/mob/living/our_mob = entered
our_mob.adjust_wet_stacks(3)