Inventory Depth 2 (#7191)

This commit is contained in:
Aroliacue
2023-11-08 08:23:38 +01:00
committed by GitHub
parent ac6ccf33d9
commit 3117d9a8c9
5 changed files with 14 additions and 9 deletions
@@ -727,13 +727,13 @@
while (cur_atom && !(cur_atom in container.contents))
if (isarea(cur_atom))
return -1
return INFINITY // CHOMPedit
if (istype(cur_atom.loc, /obj/item/weapon/storage))
depth++
cur_atom = cur_atom.loc
if (!cur_atom)
return -1 //inside something with a null loc.
return INFINITY // CHOMPedit - inside something with a null loc.
return depth
@@ -745,13 +745,13 @@
while (cur_atom && !isturf(cur_atom))
if (isarea(cur_atom))
return -1
return INFINITY // CHOMPedit
if (istype(cur_atom.loc, /obj/item/weapon/storage))
depth++
cur_atom = cur_atom.loc
if (!cur_atom)
return -1 //inside something with a null loc.
return INFINITY //CHOMPedit - inside something with a null loc.
return depth