Page 1 of 1

Is LuaSimulation.get_slot_position supposed to be 0-based?

Posted: Sat Apr 19, 2025 5:14 pm
by i142857
LuaSimulation.get_slot_position takes a slot_index. The game interprets this as 0-based (i.e. the first slot in the inventory is slot_index 0). It means it's inconsistent with functions like LuaInventory.find_item_stack which returns a 1-based stack index.

Intentional? If yes, please document as hardly anything in the whole API is 0-based. If no, please fix (although, arguably, that might break mods if they depended on the old behavior!)

Re: Is LuaSimulation.get_slot_position supposed to be 0-based?

Posted: Mon May 05, 2025 6:43 am
by Therenas
Thanks, this is noted for the next release.