Page 1 of 1

[2.0.76] Cannot place item back into hand location in ItemWithInventory

Posted: Sun May 03, 2026 7:09 pm
by Shemp
inventoryitem-slot-bug.png
inventoryitem-slot-bug.png (126.38 KiB) Viewed 196 times
Steps to reproduce:
  • Install the Packing Tape mod (current version 20.0.7)
  • Create a packed chest by picking up a filled chest with "Toggle Packing Tape" turned on
  • Right-click the packed chest to access the ItemWithInventory GUI
  • Pick up an item stack from the packed chest so you can see the black hand in its inventory
  • Try to place the stack back into the slot where it came from
It will print "This slot is reserved for the cursor" even though the items are coming from the cursor.

Pressing the Pipette hotkey will print "Cannot return item back: This slot is reserved for the cursor" and clear the hand icon. The next time pressing the key will send the cursor stack back to the player inventory.

-----------------

EDIT: An interesting detail that I've just noticed in testing for this bug:

LuaPlayer::hand_location reports that "inventory" = defines.inventory.item_main when the hand is inside the ItemWithInventory, opposed to defines.inventory.character_main when it's in the player's inventory.

But both of these constants happen to be equal to 1. I don't know if this has any relation to how the engine handles things.

Re: [2.0.76] Cannot place item back into hand location in ItemWithInventory

Posted: Mon May 04, 2026 5:41 pm
by Rseding91
Thanks for the report. This is now fixed for 2.1.