Destroy() cleanups in VOREStation code

* Remove remaining hard del()'s in our code.
* Replace deleted() and gcDestroyed with QDELETED macro.
* Fix some strange calls directly to Del() (capital D)
* Make Destroy() return qdel hints.
* Make a few of the Destroy()'s more comprehensive in cleaning up references.
* In edited Destroy() procs, converted to use qdel_null and qdel_null_list macros when possible for pretty code.
* Removed unused variable `sleevecard`
This commit is contained in:
Leshana
2017-06-10 20:52:01 -04:00
parent cd88f7ca7b
commit e644dbe18a
35 changed files with 83 additions and 84 deletions
@@ -16,7 +16,7 @@
/obj/structure/closet/secure_closet/egg/attackby(obj/item/weapon/W, mob/user as mob) //This also prevents crew from welding the eggs and making them unable to be opened.
if(istype(W, /obj/item/weapon/weldingtool))
src.dump_contents()
del(src)
qdel(src)
+3 -2
View File
@@ -29,9 +29,10 @@
update_icon(0)
/obj/structure/railing/Destroy()
for(var/obj/structure/railing/R in oview(src, 1))
var/turf/location = loc
. = ..()
for(var/obj/structure/railing/R in orange(location, 1))
R.update_icon()
..()
/obj/structure/railing/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(!mover)
+1 -1
View File
@@ -237,7 +237,7 @@
if(!path) //Tapped out, reallocate?
for(var/P in allocated_gamma)
var/obj/item/I = allocated_gamma[P]
if(!I || istype(I.loc,/obj/machinery/computer/cryopod) || I.gcDestroyed)
if(QDELETED(I) || istype(I.loc,/obj/machinery/computer/cryopod))
allocated_gamma -= P
path = P
break