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] Fix Flaky Failure From Fire #1934

Merged
merged 3 commits into from
Feb 11, 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
2 changes: 0 additions & 2 deletions code/datums/elements/permanent_fire_overlay.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@

RegisterSignal(target, COMSIG_ATOM_UPDATE_OVERLAYS, PROC_REF(add_fire_overlay))
target.update_appearance(UPDATE_OVERLAYS)
ADD_TRAIT(target, TRAIT_NO_EXTINGUISH, ELEMENT_TRAIT(type))

/datum/element/perma_fire_overlay/Detach(atom/target)
. = ..()
UnregisterSignal(target, COMSIG_ATOM_UPDATE_OVERLAYS)
REMOVE_TRAIT(target, TRAIT_NO_EXTINGUISH, ELEMENT_TRAIT(type))
target.update_appearance(UPDATE_OVERLAYS)

/datum/element/perma_fire_overlay/proc/add_fire_overlay(mob/living/source, list/overlays)
Expand Down
26 changes: 16 additions & 10 deletions code/game/turfs/open/lava.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
/turf/open/lava/Destroy()
for(var/mob/living/leaving_mob in contents)
leaving_mob.RemoveElement(/datum/element/perma_fire_overlay)
REMOVE_TRAIT(leaving_mob, TRAIT_NO_EXTINGUISH, TURF_TRAIT)
return ..()

/turf/open/lava/update_overlays()
Expand Down Expand Up @@ -145,6 +146,7 @@
. = ..()
if(isliving(gone) && !islava(gone.loc))
gone.RemoveElement(/datum/element/perma_fire_overlay)
REMOVE_TRAIT(gone, TRAIT_NO_EXTINGUISH, TURF_TRAIT)

/turf/open/lava/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
if(burn_stuff(AM))
Expand Down Expand Up @@ -292,11 +294,10 @@
if(QDELETED(burn_target))
return FALSE

. = TRUE
if(isobj(burn_target))
var/obj/burn_obj = burn_target
if(burn_obj.resistance_flags & ON_FIRE) // already on fire; skip it.
return
return TRUE
if(!(burn_obj.resistance_flags & FLAMMABLE))
burn_obj.resistance_flags |= FLAMMABLE //Even fireproof things burn up in lava
if(burn_obj.resistance_flags & FIRE_PROOF)
Expand All @@ -305,16 +306,21 @@
burn_obj.set_armor_rating(FIRE, 50)
burn_obj.fire_act(temperature_damage, 1000 * seconds_per_tick)
if(istype(burn_obj, /obj/structure/closet))
var/obj/structure/closet/burn_closet = burn_obj
for(var/burn_content in burn_closet.contents)
for(var/burn_content in burn_target)
burn_stuff(burn_content)
return
return TRUE

var/mob/living/burn_living = burn_target
burn_living.AddElement(/datum/element/perma_fire_overlay)
burn_living.ignite_mob()
burn_living.adjust_fire_stacks(lava_firestacks * seconds_per_tick)
burn_living.adjustFireLoss(lava_damage * seconds_per_tick)
if(isliving(burn_target))
var/mob/living/burn_living = burn_target
if(!HAS_TRAIT_FROM(burn_living, TRAIT_NO_EXTINGUISH, TURF_TRAIT))
burn_living.AddElement(/datum/element/perma_fire_overlay)
ADD_TRAIT(burn_living, TRAIT_NO_EXTINGUISH, TURF_TRAIT)
burn_living.adjust_fire_stacks(lava_firestacks * seconds_per_tick)
burn_living.ignite_mob()
burn_living.adjustFireLoss(lava_damage * seconds_per_tick)
return TRUE

return FALSE

/turf/open/lava/can_cross_safely(atom/movable/crossing)
return HAS_TRAIT(src, TRAIT_LAVA_STOPPED) || HAS_TRAIT(crossing, immunity_trait ) || HAS_TRAIT(crossing, TRAIT_MOVE_FLYING)
Expand Down
Loading