mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
More and more Destroy() cleanups all across the board - Return qdel hints.
This commit is contained in:
@@ -131,3 +131,9 @@
|
||||
|
||||
/datum/lighting_corner/dummy/New()
|
||||
return
|
||||
|
||||
/datum/lighting_corner/Destroy(var/force)
|
||||
if (!force)
|
||||
return QDEL_HINT_LETMELIVE
|
||||
crash_with("Who decided to force qdel() a lighting corner? Why did you do this?")
|
||||
return ..()
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
log_debug("A lighting overlay realised its loc was NOT a turf (actual loc: [loc][loc ? ", " + loc.type : "null"]) in update_overlay() and got qdel'ed!")
|
||||
else
|
||||
log_debug("A lighting overlay realised it was in nullspace in update_overlay() and got pooled!")
|
||||
qdel(src)
|
||||
qdel(src, force=TRUE)
|
||||
return
|
||||
|
||||
// To the future coder who sees this and thinks
|
||||
@@ -121,14 +121,17 @@
|
||||
/atom/movable/lighting_overlay/throw_at()
|
||||
return 0
|
||||
|
||||
/atom/movable/lighting_overlay/Destroy()
|
||||
total_lighting_overlays--
|
||||
global.lighting_update_overlays -= src
|
||||
global.lighting_update_overlays_old -= src
|
||||
/atom/movable/lighting_overlay/Destroy(var/force)
|
||||
if (force)
|
||||
total_lighting_overlays--
|
||||
global.lighting_update_overlays -= src
|
||||
global.lighting_update_overlays_old -= src
|
||||
|
||||
var/turf/T = loc
|
||||
if(istype(T))
|
||||
T.lighting_overlay = null
|
||||
T.luminosity = 1
|
||||
var/turf/T = loc
|
||||
if(istype(T))
|
||||
T.lighting_overlay = null
|
||||
T.luminosity = 1
|
||||
|
||||
. = ..()
|
||||
return ..()
|
||||
else
|
||||
return QDEL_HINT_LETMELIVE
|
||||
|
||||
Reference in New Issue
Block a user