mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-07-20 19:42:34 +01:00
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:
@@ -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)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user