Emulate quick bar click

Place to get help with not working mods / modding interface.
Post Reply
deterok
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sun Jul 30, 2023 7:47 am
Contact:

Emulate quick bar click

Post by deterok »

Can I use Lua to grab a stuck from the inventory (emulate quick bar click)

Bilka
Factorio Staff
Factorio Staff
Posts: 3159
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Emulate quick bar click

Post by Bilka »

Find the stack in the player inventory (e.g. with find_item_stack) and then swap_stack the stack and the player cursor_stack.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

deterok
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sun Jul 30, 2023 7:47 am
Contact:

Re: Emulate quick bar click

Post by deterok »

Thanks

Post Reply

Return to “Modding help”