Fixes some bad Destroy()s (#17511)

* Fixes some bad Destroy()s

Fixes some bad destroys on request of Kash, will need checking over that I've not misunderstood the instructions! This is all I had time to look through for now. Checked around 200-ish files.

* The rest of them

Found a quick way to look through them all

* Update chicken.dm

* fix that

* don't abuse destroy

* .

* move this up

---------

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
SatinIsle
2025-04-12 00:15:42 +02:00
committed by GitHub
co-authored by Kashargul
parent 03ea0f928d
commit 94e61bdfc0
57 changed files with 74 additions and 79 deletions
@@ -43,7 +43,7 @@ Admin verb is called by code\modules\admin\verbs\event_triggers.dm
/obj/effect/landmark/event_trigger/Destroy()
if(event_triggers[creator_ckey])
event_triggers[creator_ckey] -= src
..()
. = ..()
/obj/effect/landmark/event_trigger/Crossed(var/atom/movable/AM)
if(!isliving(AM))
+7 -13
View File
@@ -4,34 +4,27 @@
desc = "Oh shit!"
icon_state = "pool"
icon = 'icons/effects/64x64.dmi'
time_to_die = 0.7 SECONDS
pixel_x = -16
/obj/effect/temporary_effect/eruption/New(var/turf/T, var/ttd = 10 SECONDS, var/newcolor)
/obj/effect/temporary_effect/eruption/Initialize(mapload, var/ttd = 10 SECONDS, var/newcolor)
if(ttd)
time_to_die = ttd
time_to_die += ttd
addtimer(CALLBACK(src, PROC_REF(on_eruption), get_turf(src)), time_to_die - 0.2 SECONDS, TIMER_DELETE_ME)
if(newcolor)
color = newcolor
..()
/obj/effect/temporary_effect/eruption/Initialize(mapload)
. = ..()
flick("[icon_state]_create",src)
/obj/effect/temporary_effect/eruption/Destroy()
var/turf/T = get_turf(src)
flick("[icon_state]_erupt",src)
spawn(5)
if(on_eruption(T))
spawn(2)
..()
/obj/effect/temporary_effect/eruption/proc/on_eruption(var/turf/Target) // Override for specific functions, as below.
flick("[icon_state]_erupt",src)
return TRUE
/obj/effect/temporary_effect/eruption/testing/on_eruption(var/turf/Target)
flick("[icon_state]_erupt",src)
if(Target)
new /obj/effect/explosion(Target)
return TRUE
@@ -44,6 +37,7 @@
desc = "A bubbling pool of fire!"
/obj/effect/temporary_effect/eruption/flamestrike/on_eruption(var/turf/Target)
flick("[icon_state]_erupt",src)
if(Target)
Target.hotspot_expose(1000, 50, 1)
@@ -156,4 +156,4 @@
/obj/effect/dummy/chameleon/Destroy()
master.disrupt(0)
..()
. = ..()
+1 -1
View File
@@ -30,7 +30,7 @@
/obj/item/powersink/Destroy()
STOP_PROCESSING(SSobj, src)
STOP_PROCESSING_POWER_OBJECT(src)
..()
. = ..()
/obj/item/powersink/attackby(var/obj/item/I, var/mob/user)
if(I.has_tool_quality(TOOL_SCREWDRIVER))
+1 -1
View File
@@ -148,7 +148,7 @@
if(linkedmonitor)
linkedmonitor.unpair(src)
linkedmonitor = null
..()
. = ..()
/obj/item/bug_monitor
name = "mobile camera pod monitor"
+1 -1
View File
@@ -16,7 +16,7 @@
T.pinned_target = null
T.density = TRUE
break
..() // delete target
. = ..() // delete target
/obj/item/target/Moved(atom/old_loc, direction, forced = FALSE)
. = ..()
@@ -22,7 +22,7 @@
/obj/item/chainsaw/Destroy()
STOP_PROCESSING(SSobj, src)
..()
. = ..()
/obj/item/chainsaw/proc/turnOn(mob/user as mob)
if(on) return
@@ -15,7 +15,7 @@
/obj/item/tool/transforming/Destroy()
if(welder)
QDEL_NULL(welder)
..()
. = ..()
/obj/item/tool/transforming/get_welder()
return welder
+1 -1
View File
@@ -133,7 +133,7 @@
/obj/structure/barricade/sandbag/Destroy()
update_connections(1, src)
..()
. = ..()
/obj/structure/barricade/sandbag/dismantle()
update_connections(1, src)
@@ -35,7 +35,7 @@
if(remote_dial)
remote_dial.my_turrets -= src
remote_dial = null
..()
. = ..()
/obj/structure/prop/prism/proc/reset_rotation()
var/degrees_to_rotate = -1 * degrees_from_north
@@ -215,4 +215,4 @@
for(var/obj/structure/prop/prism/P in my_turrets)
P.remote_dial = null
my_turrets = list()
..()
. = ..()
+1 -1
View File
@@ -32,7 +32,7 @@
/obj/structure/prop/nest/Destroy()
den_mobs = null
STOP_PROCESSING(SSobj, src)
..()
. = ..()
/obj/structure/prop/nest/attack_hand(mob/living/user) // Used to tell the player that this isn't useful for anything.
..()
@@ -18,7 +18,7 @@
var/obj/machinery/door/blast/puzzle/P = O
P.locks -= src
linked_objects -= P
..()
. = ..()
/obj/structure/prop/lock/proc/toggle_lock()
enabled = !enabled
+1 -1
View File
@@ -30,7 +30,7 @@
for(var/datum/beam/B in active_beams)
QDEL_NULL(B)
active_beams = null
..()
. = ..()
/obj/structure/cult/pylon/swarm/pylonhit(var/damage)
if(!isbroken)
@@ -51,7 +51,7 @@
for(var/atom/movable/AM in contents)
AM.loc = loc
..()
. = ..()
@@ -49,7 +49,7 @@
/obj/structure/windoor_assembly/Destroy()
density = FALSE
update_nearby_tiles()
..()
. = ..()
/obj/structure/windoor_assembly/update_icon()
icon_state = "[facing]_[secure]windoor_assembly[state]"