Enhanced the inventory config loader to support both old and new config file structures for QBInv by introducing a fallback mechanism. The loader now attempts multiple config paths to improve compatibility with different versions.
The script was randomly looping the config file check, if it hit qb-inventory first it would end the check and break the script, changed it to skip instead and fixed it
Realised that if using older (and custom) versions of qbox, the item list can't be retrieved through `GetCoreObject()`
This fixes that and also (if needed) grabs the item lists from inventories directly if needed
This was my bad, set up functions that requested the cache from server, didn't realise it was duplicating it and spamming it
This moves the requests to a separate file and uses an export instead
Also hopefully fixes ox_lib images being an arse
using the function to grab slot info, this can now check if you have enough inventory slots for items to be given, allowing it to check before TRYING to add them
People were reporting issues with scripts claiming items didn't exist, I believe this was due to their servers having slot starts (eg. alot of clothes or vehicles being loaded)
I've rewritten it to fully delay loading until everything is correctly cached and let the scripts continue. Also hopefully reducing memory footprint for it too.
---
Also slipped in an `experimental` function that grabs inventory config files to check their set InventoryWeight and InventorySlots to automatically apply it for other functions
---
Moves Auth Token stuff to separate file because it doesn't really need to be in `itemcontrol.lua`
Helps me keep track of it better too
Also added a "cooldown" to workaround people's multicharacter scripts claiming the players loaded more than once and breaking it