From 4fab6f14e669f358c5a7ce91680f99c9f4446d1b Mon Sep 17 00:00:00 2001 From: moxian Date: Mon, 28 Oct 2019 10:34:47 +0000 Subject: [PATCH] Add comment on why (I think) the stack fix happens to work. --- code/game/objects/items/stacks/stack.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 793eb1062d5..0d864492266 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -307,7 +307,10 @@ if(ismob(loc)) var/mob/living/L = loc // At this stage, stack code is so horrible and atrocious, I wouldn't be all surprised ghosts can somehow have stacks. If this happens, then the world deserves to burn. L.unEquip(src, TRUE) - if(amount < 1) // check again. Dropping the stuff could have incresed the amount in src (somehow...) + if(amount < 1) + // If you stand on top of a stack, and drop a - different - 0-amount stack on the floor, + // the two get merged, so the amount of items in the stack can increase from the 0 that it had before. + // Check the amount again, to be sure we're not qdeling healthy stacks. qdel(src) return TRUE return FALSE