Fixes runtime with getting inventory

- Fixes runtime at living.dm line 195, when return_inv() is called for
suits and accessories that store items.
- Fixes use of 'stat == 2' instead of 'stat == DEAD' in objective.dm
This commit is contained in:
DZD
2015-02-10 09:25:54 -05:00
parent 1d009e9c91
commit 03d0699637
3 changed files with 30 additions and 2 deletions
+15 -1
View File
@@ -26,4 +26,18 @@
/obj/item/clothing/suit/storage/hear_talk(mob/M, var/msg)
pockets.hear_talk(M, msg)
..()
..()
/obj/item/clothing/suit/storage/proc/return_inv()
var/list/L = list( )
L += src.contents
for(var/obj/item/weapon/storage/S in src)
L += S.return_inv()
for(var/obj/item/weapon/gift/G in src)
L += G.gift
if (istype(G.gift, /obj/item/weapon/storage))
L += G.gift:return_inv()
return L
@@ -40,6 +40,20 @@
hold.hear_talk(M, msg, verb, speaking)
..()
/obj/item/clothing/accessory/storage/proc/return_inv()
var/list/L = list( )
L += src.contents
for(var/obj/item/weapon/storage/S in src)
L += S.return_inv()
for(var/obj/item/weapon/gift/G in src)
L += G.gift
if (istype(G.gift, /obj/item/weapon/storage))
L += G.gift:return_inv()
return L
/obj/item/clothing/accessory/storage/attack_self(mob/user as mob)
if (has_suit) //if we are part of a suit
hold.open(user)