mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-07-18 19:53:35 +01:00
More and more Destroy() cleanups all across the board - Return qdel hints.
This commit is contained in:
@@ -477,7 +477,7 @@
|
||||
|
||||
for(var/obj/item/weapon/mop_deploy/blade in M.contents)
|
||||
M.drop_from_inventory(blade)
|
||||
del(blade)
|
||||
qdel(blade)
|
||||
|
||||
|
||||
//Space Cleaner Launcher
|
||||
@@ -520,7 +520,7 @@
|
||||
|
||||
user << "<font color='blue'><b>You slot \the [input_device] into the suit module.</b></font>"
|
||||
user.drop_from_inventory(input_device)
|
||||
del(input_device)
|
||||
qdel(input_device)
|
||||
accepted_item.charges++
|
||||
return 1
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
/mob/living/silicon/ai/Destroy()
|
||||
destroy_eyeobj()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/atom/proc/move_camera_by_click()
|
||||
if(istype(usr, /mob/living/silicon/ai))
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
/obj/machinery/camera/Destroy()
|
||||
clear_all_networks()
|
||||
cameranet.cameras -= src
|
||||
..()
|
||||
return ..()
|
||||
|
||||
// Mobs
|
||||
/mob/living/silicon/ai/rejuvenate()
|
||||
|
||||
@@ -38,7 +38,11 @@ mob/observer/eye/Destroy()
|
||||
qdel(ghostimage)
|
||||
ghostimage = null
|
||||
updateallghostimages()
|
||||
..()
|
||||
if(owner)
|
||||
if(owner.eyeobj == src)
|
||||
owner.eyeobj = null
|
||||
owner = null
|
||||
. = ..()
|
||||
|
||||
/mob/observer/eye/Move(n, direct)
|
||||
if(owner == src)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
/mob/living/Destroy()
|
||||
cultnet.updateVisibility(src, 0)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/mob/living/rejuvenate()
|
||||
var/was_dead = stat == DEAD
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
/turf/simulated/Destroy()
|
||||
updateVisibility(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/turf/simulated/New()
|
||||
..()
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
/obj/structure/Destroy()
|
||||
updateVisibility(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/structure/New()
|
||||
..()
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
/datum/visualnet/Destroy()
|
||||
visual_nets -= src
|
||||
..()
|
||||
return ..()
|
||||
|
||||
// Checks if a chunk has been Generated in x, y, z.
|
||||
/datum/visualnet/proc/chunkGenerated(x, y, z)
|
||||
|
||||
@@ -27,7 +27,7 @@ var/list/holder_mob_icon_cache = list()
|
||||
|
||||
/obj/item/weapon/holder/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/holder/process()
|
||||
update_state()
|
||||
|
||||
@@ -215,20 +215,15 @@ var/list/ai_verbs_hidden = list( // For why this exists, refer to https://xkcd.c
|
||||
/mob/living/silicon/ai/Destroy()
|
||||
ai_list -= src
|
||||
|
||||
qdel(eyeobj)
|
||||
eyeobj = null
|
||||
|
||||
qdel(psupply)
|
||||
psupply = null
|
||||
|
||||
qdel(aiMulti)
|
||||
aiMulti = null
|
||||
|
||||
qdel(aiRadio)
|
||||
aiRadio = null
|
||||
|
||||
qdel(aiCamera)
|
||||
aiCamera = null
|
||||
qdel_null(announcement)
|
||||
qdel_null(eyeobj)
|
||||
qdel_null(psupply)
|
||||
qdel_null(aiPDA)
|
||||
qdel_null(aiCommunicator)
|
||||
qdel_null(aiMulti)
|
||||
qdel_null(aiRadio)
|
||||
qdel_null(aiCamera)
|
||||
hack = null
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
silicon_mob_list -= src
|
||||
for(var/datum/alarm_handler/AH in alarm_manager.all_handlers)
|
||||
AH.unregister_alarm(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/proc/init_id()
|
||||
if(idcard)
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
friends.Cut() //This one is not
|
||||
walk_list.Cut()
|
||||
languages.Cut()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
//Client attached
|
||||
/mob/living/simple_animal/Login()
|
||||
|
||||
@@ -393,9 +393,6 @@
|
||||
/obj/item/weapon/grab/proc/size_difference(mob/A, mob/B)
|
||||
return mob_size_difference(A.mob_size, B.mob_size)
|
||||
|
||||
/obj/item/weapon/grab
|
||||
var/destroying = 0
|
||||
|
||||
/obj/item/weapon/grab/Destroy()
|
||||
animate(affecting, pixel_x = 0, pixel_y = 0, 4, 1, LINEAR_EASING)
|
||||
affecting.layer = 4
|
||||
@@ -408,5 +405,4 @@
|
||||
assailant = null
|
||||
qdel(hud)
|
||||
hud = null
|
||||
destroying = 1 // stops us calling qdel(src) on dropped()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
/mob/living/Destroy()
|
||||
remove_all_modifiers(TRUE)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
// Called by Life().
|
||||
/mob/living/proc/handle_modifiers()
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
var/update_locked = 0
|
||||
|
||||
/obj/machinery/power/breakerbox/Destroy()
|
||||
..()
|
||||
. = ..()
|
||||
for(var/datum/nano_module/rcon/R in world)
|
||||
R.FindDevices()
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ var/list/possible_cable_coil_colours = list(
|
||||
if(powernet)
|
||||
cut_cable_from_powernet() // update the powernets
|
||||
cable_list -= src //remove it from global cable list
|
||||
..() // then go ahead and delete the cable
|
||||
return ..() // then go ahead and delete the cable
|
||||
|
||||
// Ghost examining the cable -> tells him the power
|
||||
/obj/structure/cable/attack_ghost(mob/user)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
/obj/machinery/power/grid_checker/Destroy()
|
||||
qdel(wires)
|
||||
wires = null
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/grid_checker/update_icon()
|
||||
if(power_failing)
|
||||
|
||||
@@ -268,7 +268,7 @@
|
||||
if(A)
|
||||
on = 0
|
||||
// A.update_lights()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/light/update_icon()
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
disconnect_from_network()
|
||||
disconnect_terminal()
|
||||
|
||||
..()
|
||||
return ..()
|
||||
|
||||
///////////////////////////////
|
||||
// General procedures
|
||||
|
||||
@@ -23,7 +23,7 @@ var/global/list/rad_collectors = list()
|
||||
|
||||
/obj/machinery/power/rad_collector/Destroy()
|
||||
rad_collectors -= src
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/rad_collector/process()
|
||||
//so that we don't zero out the meter if the SM is processed first.
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
if(holder && holder.my_atom && ismob(holder.my_atom))
|
||||
var/mob/M = holder.my_atom
|
||||
M.status_flags &= ~FAKEDEATH
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/datum/reagent/toxin/fertilizer //Reagents used for plant fertilizers.
|
||||
name = "fertilizer"
|
||||
|
||||
@@ -6,12 +6,10 @@
|
||||
|
||||
/obj/structure/window/Destroy()
|
||||
var/oldloc = loc
|
||||
loc=null
|
||||
. = ..()
|
||||
for(var/obj/structure/table/T in view(oldloc, 1))
|
||||
T.update_connections()
|
||||
T.update_icon()
|
||||
loc=oldloc
|
||||
..()
|
||||
|
||||
/obj/structure/window/Move()
|
||||
var/oldloc = loc
|
||||
|
||||
Reference in New Issue
Block a user