[Rseding91] [for 0.17] [0.16.37] [API] Inserting artillery shells is capped at 1
Posted: Thu Apr 26, 2018 11:14 am
Likely because the stack size limit of artillery shells is 1, you cannot insert more than 1 into an artillery wagon using the modding API.
How to reproduce:
Multiple artillery shells to be inside the wagon, up to the limit a player can insert of 100.
Result:
At most 1 artillery shell is inserted.
How to reproduce:
- Place some rail & artillery wagon.
- Hover over the wagon and run one or multiple of:
Code: Select all
/c game.player.selected.get_inventory(1).insert({name = 'artillery-shell', count = 10}) /c game.player.selected.get_inventory(1)[1].set_stack({name = 'artillery-shell', count = 10}) -- After inserting a single one: /c game.player.selected.get_inventory(1)[1].count = 10
Multiple artillery shells to be inside the wagon, up to the limit a player can insert of 100.
Result:
At most 1 artillery shell is inserted.