Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] Water tiles now put out burning atoms #2980

Merged
merged 1 commit into from
Apr 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions code/datums/elements/watery_tile.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/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)
1 change: 1 addition & 0 deletions code/datums/status_effects/debuffs/fire_stacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@
/datum/status_effect/fire_handler/fire_stacks/on_apply()
. = ..()
RegisterSignal(owner, COMSIG_ATOM_UPDATE_OVERLAYS, PROC_REF(add_fire_overlay))
RegisterSignal(owner, COMSIG_ATOM_EXTINGUISH, PROC_REF(extinguish))
owner.update_appearance(UPDATE_OVERLAYS)

/datum/status_effect/fire_handler/fire_stacks/proc/add_fire_overlay(mob/living/source, list/overlays)
Expand Down
1 change: 1 addition & 0 deletions code/game/turfs/open/water.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
/turf/open/water/Initialize(mapload)
. = ..()
AddElement(/datum/element/immerse, icon, icon_state, "immerse", immerse_overlay_color)
AddElement(/datum/element/watery_tile)

/turf/open/water/jungle

Expand Down
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1614,6 +1614,7 @@
#include "code\datums\elements\wall_smasher.dm"
#include "code\datums\elements\wall_tearer.dm"
#include "code\datums\elements\wall_walker.dm"
#include "code\datums\elements\watery_tile.dm"
#include "code\datums\elements\weapon_description.dm"
#include "code\datums\elements\weather_listener.dm"
#include "code\datums\elements\web_walker.dm"
Expand Down
Loading