mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-20 22:16:51 +00:00
* 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!  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>
22 lines
577 B
Plaintext
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)
|