mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 23:27:34 +01:00
[MIRROR] Space/Changeturf fixes and optimizations [MDB IGNORE] (#19201)
Space/Changeturf fixes and optimizations Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com> Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
This commit is contained in:
co-authored by
LemonInTheDark
GoldenAlpharex
GoldenAlpharex
parent
f558095a40
commit
db33d75a5e
@@ -9,6 +9,10 @@
|
||||
. = ..()
|
||||
if(turf_loc_check && (!isturf(loc) || NeverShouldHaveComeHere(loc)))
|
||||
return INITIALIZE_HINT_QDEL
|
||||
var/static/list/loc_connections = list(
|
||||
COMSIG_TURF_CHANGED = PROC_REF(handle_turf_change),
|
||||
)
|
||||
AddElement(/datum/element/connect_loc, loc_connections)
|
||||
|
||||
/obj/effect/decal/blob_act(obj/structure/blob/B)
|
||||
if(B && B.loc == loc)
|
||||
@@ -24,9 +28,12 @@
|
||||
if(!(resistance_flags & FIRE_PROOF)) //non fire proof decal or being burned by lava
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/HandleTurfChange(turf/T)
|
||||
..()
|
||||
if(T == loc && NeverShouldHaveComeHere(T))
|
||||
/obj/effect/decal/proc/handle_turf_change(turf/source, path, list/new_baseturfs, flags, list/post_change_callbacks)
|
||||
SIGNAL_HANDLER
|
||||
post_change_callbacks += CALLBACK(src, PROC_REF(sanity_check_self))
|
||||
|
||||
/obj/effect/decal/proc/sanity_check_self(turf/changed)
|
||||
if(changed == loc && NeverShouldHaveComeHere(changed))
|
||||
qdel(src)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user