mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
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:
@@ -420,7 +420,7 @@ datum/objective/escape
|
||||
return 0
|
||||
if(!emergency_shuttle.returned())
|
||||
return 0
|
||||
if(!owner.current || owner.current.stat ==2)
|
||||
if(!owner.current || owner.current.stat == DEAD)
|
||||
return 0
|
||||
var/turf/location = get_turf(owner.current.loc)
|
||||
if(!location)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user