Closes issue #249: Items disappear when dropping partial stack
cadmal
Branch: cadmal/incursion-roguelike:master
Branch: rmtew/incursion-roguelike:master
Merged
Merged pull request
Merged in cadmal/incursion-roguelike (pull request #11)
Merged in cadmal/incursion-roguelike (pull request #11)
Includes the following changes:
Inv.cpp: Fix Container::TakeOut() to set the item's new parent to the actor that took the item out of the container. The old parent was getting blanked out by the call to Item::Remove() within that function and was never reset.
alchemy.irh: The above change also necessitated a minor change to the AutoLoot macro handler, where it attempts to detect if taking an item out of a container failed. It was expecting the parent to be blank, which only worked because of the bug.
Also, I decided not to make this change to avoid unintended side effects:
Managers.cpp (lines 790-794): Clean up the drop command's logic in InventoryManager() that caused the partial item stack to disappear when the item's parent is blank. I don't fully understand what that logic is supposed to be doing and it should be fine to leave it as is.