Closes issue #249: Items disappear when dropping partial stack

Merged
#11 · Created  · Last updated

Merged pull request

Merged in cadmal/incursion-roguelike (pull request #11)

ee7c845·Author: ·Closed by: ·2015-08-26

Description

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.

0 attachments

0 comments

Loading commits...