Page 1 of 1

spill_item_stack enable_looted = false doesn't work

Posted: Sat Dec 17, 2016 9:36 am
by Mooncat
Just a minor bug.

Bug: If provided, the "enable_looted" parameter of LuaSurface::spill_item_stack always yield to true, even if false is provided. But if it is not provided, the item is not flagged as to-be-looted.

Steps to reproduce:
1) Type this command:

Code: Select all

/c game.player.surface.spill_item_stack(game.player.position, "iron-plate", false)
2) Some iron plates are immediately looted by the player. The same as

Code: Select all

/c game.player.surface.spill_item_stack(game.player.position, "iron-plate", true)
So the last parameter isn't doing its job properly.

3) But without it, the items will not be looted automatically:

Code: Select all

/c game.player.surface.spill_item_stack(game.player.position, "iron-plate")
which is expected.

Re: spill_item_stack enable_looted = false doesn't work

Posted: Sat Dec 17, 2016 11:47 am
by posila
Thanks for the report.
Fixed for 0.15