Page 1 of 1

[Rseding91] Inventory.insert doesn't care about filtered slots in assemb

Posted: Tue Oct 27, 2015 5:22 pm
by judos
Hi,

while developing a mod I discovered that inventory.insert used on assembling machines doesn't respect the filtered slots.
So for example: When I add iron-plates into a entity of type assembling-machine they will always go in. Even when the recipe doesn't even need iron-plates.

I found this on 0.12.12 and retested it successfully in 0.12.14.

Command used to add items into the inventory of the assembling machine:
/c game.player.print(serpent.block(game.player.selected.get_inventory(defines.inventory.assembling_machine_input).insert{name="iron-plate",count=3}))

/edit:
The same goes for the can_insert command:
/c game.player.print(serpent.block(game.player.selected.get_inventory(2).can_insert{name="iron-plate",count=3}))
This will for example return true when you hover an assembling machine which produces stone-furnaces (which only require stone)

See this screenshot:
inserting issue.PNG
inserting issue.PNG (220.17 KiB) Viewed 4634 times
Thanks for having a look at this.
Best,
judos

Re: [Rseding91] Inventory.insert doesn't care about filtered slots in assemb

Posted: Fri Nov 06, 2015 10:13 am
by kovarex
Fixed for 0.12.17, thanks for the report.