spill_item_stack enable_looted = false doesn't work
Posted: Sat Dec 17, 2016 9:36 am
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:
2) Some iron plates are immediately looted by the player. The same as
So the last parameter isn't doing its job properly.
3) But without it, the items will not be looted automatically:
which is expected.
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)
Code: Select all
/c game.player.surface.spill_item_stack(game.player.position, "iron-plate", true)
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")