Page 1 of 1

[0.15.9] [Lua-API] robot.insert{} does not insert item

Posted: Sun May 07, 2017 3:38 pm
by Mylon
I want to insert items to robots via script (part of my mod to simulate fast-replace with robots) but this doesn't seem to work. I can do robot.remove{} and that works, but robot.insert{} does not.

Screenshot: http://imgur.com/a/yF9Lr

Steps: Run console command to insert item into bot.

Observed behavior: Command runs without complaint, suggesting success. Bot has no item, neither displayed nor granted upon pickup.

Expected behavior: Bot has item in inventory (displayed like the chest)

Re: [0.15.9] [Lua-API] robot.insert{} does not insert item

Posted: Sun May 07, 2017 6:29 pm
by Rseding91
This is a side effect of not allowing the player to transfer items through CTRL + click.

If you want to transfer items into the robot you'll need to get the specific inventory and then do insert() on that.