More Destroy stuff

This commit is contained in:
d3athrow
2014-03-05 20:28:38 -05:00
committed by ZomgPonies
parent 4f168d8caf
commit dc50b47971
4 changed files with 26 additions and 9 deletions
+3 -9
View File
@@ -44,20 +44,14 @@
if(istype(src.loc, /mob))
var/mob/H = src.loc
H.drop_from_inventory(src) // items at the very least get unequipped from their mob before being deleted
if(istype(src.loc, /obj/item/assembly))
var/obj/item/assembly/A = src.loc
if(A.part1 == src)
A.part1 = null
else if(A.part2 == src)
A.part2 = null
master = null
if(reagents && istype(reagents))
reagents.my_atom = null
reagents.delete()
if(hasvar(src, "holder"))
src:holder = null
I:holder = null
/* // BROKEN, FUCK BYOND
if(hasvar(src, "my_atom"))
src:my_atom = null
I:my_atom = null*/
..()
@@ -17,6 +17,15 @@
return
..()
/obj/item/device/radio/electropack/Destroy()
if(istype(src.loc, /obj/item/assembly/shock_kit))
var/obj/item/assembly/shock_kit/S = src.loc
if(S.part1 == src)
S.part1 = null
else if(S.part2 == src)
S.part2 = null
master = null
/obj/item/device/radio/electropack/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/clothing/head/helmet))