Better Destroys

This commit is contained in:
Fox-McCloud
2016-08-02 23:59:23 -04:00
parent 9ffc341f49
commit bb30a02dd5
12 changed files with 76 additions and 5 deletions
@@ -16,6 +16,14 @@
var/list/loadedItems = list() //The items loaded into the cannon that will be fired out
var/pressureSetting = 1 //How powerful the cannon is - higher pressure = more gas but more powerful throws
/obj/item/weapon/pneumatic_cannon/Destroy()
if(tank)
qdel(tank)
tank = null
for(var/obj/item/I in loadedItems)
qdel(I)
loadedItems.Cut()
return ..()
/obj/item/weapon/pneumatic_cannon/examine(mob/user)
..()
@@ -23,6 +23,12 @@
update_icon()
return
/obj/item/weapon/melee/baton/Destroy()
if(bcell)
qdel(bcell)
bcell = null
return ..()
/obj/item/weapon/melee/baton/CheckParts(list/parts_list)
..()
bcell = locate(/obj/item/weapon/stock_parts/cell) in contents
@@ -35,6 +35,7 @@
/obj/item/weapon/tank/Destroy()
if(air_contents)
qdel(air_contents)
air_contents = null
processing_objects.Remove(src)