Add comment on why (I think) the stack fix happens to work.

This commit is contained in:
moxian
2019-10-28 10:34:47 +00:00
parent a24013be5b
commit 4fab6f14e6
+4 -1
View File
@@ -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