Time Nick Message 13:41 adfeno Hi there :) 17:17 specing Why does localplayer:get_wield_index return a 0-indexed number? Wouldn't it make more sense to make CSM developer lives easier by making the number be 1-index? 17:21 sfan5 probably 17:21 MTDiscord C++ programmer was involved in that probably 17:23 specing I wonder if I should change it to return 1-indexed or add a get_hotbar_index instead 17:23 specing probably the latter. 17:23 MTDiscord Honestly I didn't know that I even could start lua tables at one until I saw it. Now I cannot wait to start using it everywhere. Starting at zero is so important for writing performant code with loops, because otherwise you end up having to subtract one a bunch of times 17:24 specing In the language that I otherwise use, you can start and end arrays at any index you want 17:25 specing it's most performant if you can tell the compiler what you mean and let it do the optimisation 17:28 MTDiscord In what case would you have to subtract by 1? 17:28 MTDiscord Guess this might be better in #programming or somewhere similar though 17:31 specing Hmm? In my CSM I switch hotbar indices, e.g. to auto-eat