Writable LuaEntity:held_stack_position

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
sparr
Smart Inserter
Smart Inserter
Posts: 1327
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Writable LuaEntity:held_stack_position

Post by sparr »

I want to be able to force an item into an inserter's hand so that I don't have to make an invisible chest for it to automatically grab from.

I want to set the current position of the hand so that when I create the entities they will start with the hand in the right spot, rather than having to animate to get there.
Last edited by sparr on Sun May 07, 2017 6:02 pm, edited 1 time in total.

Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: Writable LuaEntity:held_stack and held_stack_position

Post by Nexela »

held_stack is an inventory stack so doing this will work inserter.held_stack.set_stack({name=item, count=1})
Last edited by Nexela on Sun May 07, 2017 6:12 pm, edited 1 time in total.

sparr
Smart Inserter
Smart Inserter
Posts: 1327
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Writable LuaEntity:held_stack_position

Post by sparr »

Thanks. It is a LuaItemStack and you seem to be right! Halfway there!

Post Reply

Return to “Modding interface requests”