From c7703de699c8498a534c538345ed0fe491a18f20 Mon Sep 17 00:00:00 2001 From: Selis <12716288+ItsSelis@users.noreply.github.com> Date: Sun, 16 Feb 2025 17:29:30 +0100 Subject: [PATCH] Hotfixes the infinite reach (#17166) --- code/game/objects/items/weapons/storage/storage.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 87011d48eb4..907f0c24ab4 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -717,13 +717,13 @@ while (cur_atom && !(cur_atom in container.contents)) if (isarea(cur_atom)) - return -1 + return INFINITY if (istype(cur_atom.loc, /obj/item/storage)) depth++ cur_atom = cur_atom.loc if (!cur_atom) - return -1 //inside something with a null loc. + return INFINITY //inside something with a null loc. return depth @@ -735,13 +735,13 @@ while (cur_atom && !isturf(cur_atom)) if (isarea(cur_atom)) - return -1 + return INFINITY if (istype(cur_atom.loc, /obj/item/storage)) depth++ cur_atom = cur_atom.loc if (!cur_atom) - return -1 //inside something with a null loc. + return INFINITY //inside something with a null loc. return depth