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
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
---
If `jim_bridge` attempts to find shared files, and it returns `nil` it will print an error message stating it couldn't find them.
So..people can stop blaming me for my script not working when its an error in their vehicles.lua
I completely overlooked the fact that when ox_inv shows weapon info, it does it with the upper case version `WEAPON_PISTOL` while my scripts were looking for `weapon_pistol`
making my scripts think they didn't exist
This fixes that
I've moved the framework caching to a new file `frameworkCache.lua`
This now caches the framework data once when `jim_bridge` starts
Then in `coreloader.lua` now, the information that is cached is now called from that script
This also includes better handling of ESX cached data and should stop errors
This greatly optimizes the loading of all my scripts and lowers server load to speed up server start times
I have been testing this for just under a week and 6 different test servers and it appears to work fine