[0.17.66] LuaSurface.create_entity{resource} does not set initial_amount
Posted: Tue Sep 03, 2019 12:07 pm
Observed behavior:
Expected behavior:
Initial amount ought to be bet to the amount specified at creation. Perhaps it could be an optional parameter specified in create_entity if non-default behavior is desired.
Code: Select all
/c game.player.surface.create_entity{name="stone", position=game.player.position, amount=500}
/c game.print(game.player.selected.initial_amount)
> nil
Code: Select all
/c game.player.surface.create_entity{name="stone", position=game.player.position, amount=500}
/c game.print(game.player.selected.initial_amount)
> 500