Question Is there documentation on the Toolbar and how to set active item/slot?

g133m

Greenhorn
New to the forums and a new SV modder.

I'm attempting to make a mod that, when the player pressed a hotkey, changes which item is active in the toolbar (has the red border on the slot) depending on certain criteria. I can't find anything in any documentation about setting the active item. I can try to swap items in the inventory, but if there is no active item (empty slot) I'm not sure I can figure out which slot is active, either.

Any pointers would be great!

EDIT: I see the correct section would be Mod Support if someone could please move it there!
 

g133m

Greenhorn
I found the answer to my question. The Farmer.CurrentToolIndex is the current index in the whole inventory of what is currently highlighted / held by the player. I can use that (and you can set it to change the highlighted item as well).

Thanks for anyone who looked into it for me.
 
Top