LuaInventory::set_selected_index()

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
dewiniaid
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Tue Mar 07, 2017 8:50 pm
Contact:

LuaInventory::set_selected_index()

Post by dewiniaid »

Per an older request, LuaInventory::get_selected_index() was implemented in order to determine which item (if any) was selected on the quickbar.

It would be useful to have a counterpart LuaInventory::set_selected_index(), which should for all intents and purposes function the same as pressing one of the keybindings to store something on the quickbar.

Simply assigning the item in question to the cursor stack has slightly different semantics -- namely when the item is dropped later. An item selected from an (unfiltered) quickbar slot returns to that slot (since it never technically left it), whereas an item that was simply moved to the cursor stack returns to the first available quickbar slot or the inventory.

Post Reply

Return to “Modding interface requests”