mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-25 00:22:39 +00:00
## About The Pull Request Closes #81396 , Closes #81391 , Closes #81403, Closes #81402 I don't know why but I thought this proc was only called once, when the mob entered the turf. That was silly. And going back at it, I'm not entirely sure why I tied `TRAIT_NO_EXTINGUISH` to the element anyways, rather than the lava like it originally was. While going back over this, I cleaned up the proc a bit. ## Changelog Not necessary
25 lines
834 B
Plaintext
25 lines
834 B
Plaintext
/// When applied to a mob, they will always have a fire overlay regardless of if they are *actually* on fire.
|
|
/datum/element/perma_fire_overlay
|
|
|
|
/datum/element/perma_fire_overlay/Attach(atom/target)
|
|
. = ..()
|
|
if(!isliving(target))
|
|
return ELEMENT_INCOMPATIBLE
|
|
|
|
RegisterSignal(target, COMSIG_ATOM_UPDATE_OVERLAYS, PROC_REF(add_fire_overlay))
|
|
target.update_appearance(UPDATE_OVERLAYS)
|
|
|
|
/datum/element/perma_fire_overlay/Detach(atom/target)
|
|
. = ..()
|
|
UnregisterSignal(target, COMSIG_ATOM_UPDATE_OVERLAYS)
|
|
target.update_appearance(UPDATE_OVERLAYS)
|
|
|
|
/datum/element/perma_fire_overlay/proc/add_fire_overlay(mob/living/source, list/overlays)
|
|
SIGNAL_HANDLER
|
|
|
|
var/mutable_appearance/created_overlay = source.get_fire_overlay(stacks = MAX_FIRE_STACKS, on_fire = TRUE)
|
|
if(isnull(created_overlay))
|
|
return
|
|
|
|
overlays |= created_overlay
|