You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the listring to move items from the output to the main inventory, items can be lost when you have a partial stack already in your inventory.
This is caused by how the engine handles the overflow of the stack in your inventory.
Quick example:
You are crafting 99 stone, and have a stack of 9 in your inventory already.
The engine will cause an on_take callback, and the moved stack will be reported as 99 stone - however, only 90 stone will be moved, and 9 will be left in the output slot.
Your mod then deducts 99 ingredients from the player to pay for the stack, and clears the output, losing 9 stone.
The engine then tries to cause another on_take callback, trying to move 9 of whatever item is still in the inventory slot the stone was in. Since this is empty the engine gives up.
You need to check that the sum of the moved stack and the items remaining in the output is < stack:get_max()
The text was updated successfully, but these errors were encountered:
Qwertymine
added a commit
to Qwertymine/node_texture_modifier
that referenced
this issue
Sep 21, 2016
When using the listring to move items from the output to the main inventory, items can be lost when you have a partial stack already in your inventory.
This is caused by how the engine handles the overflow of the stack in your inventory.
Quick example:
You are crafting 99 stone, and have a stack of 9 in your inventory already.
The engine will cause an on_take callback, and the moved stack will be reported as 99 stone - however, only 90 stone will be moved, and 9 will be left in the output slot.
Your mod then deducts 99 ingredients from the player to pay for the stack, and clears the output, losing 9 stone.
The engine then tries to cause another on_take callback, trying to move 9 of whatever item is still in the inventory slot the stone was in. Since this is empty the engine gives up.
You need to check that the sum of the moved stack and the items remaining in the output is < stack:get_max()
The text was updated successfully, but these errors were encountered: