Page 1 of 1

[Rseding91] [15.37] LuaItemStack.swap_stack incorrect for held item

Posted: Thu Oct 26, 2017 12:50 pm
by Aidiakapi
Version: 0.15.29 through 0.15.37
Description: Calling LuaItemStack.swap_stack behaves unexpectedly when you have the stack being swapped in-hand.
Video: 37s @ YouTube
Image:
factorio_swap_stack_issue.png
factorio_swap_stack_issue.png (60.04 KiB) Viewed 985 times
Command:

Code: Select all

local q = game.player.get_quickbar() q[1].swap_stack(q[11])
Expected: The black "in-hand" indicator gets swapped along, and pressing clearing the cursor will return the item to the swapped ItemStack.

Re: [Rseding91] [15.37] LuaItemStack.swap_stack incorrect for held item

Posted: Thu Oct 26, 2017 2:49 pm
by Rseding91
Thanks for the report. That was never part of what swap_stack was meant to do but it wasn't hard to change so I've changed it for 0.16 to work as you describe.