Revamp framework caching

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
---
This commit is contained in:
Jim Shield
2025-06-26 20:03:12 +01:00
parent 9d74e7cb46
commit f3fa309dbf
4 changed files with 226 additions and 173 deletions

View File

@@ -225,7 +225,7 @@ if isStarted(PSInv) then
return true
end
if versionCompare(GetResourceMetadata("ps-inventory", "version", 0), "1.0.6") then
if versionCompare(GetResourceMetadata(PSInv, "version", 0), "1.0.6") then
print("^6Bridge^7: ^4"..PSInv.."^2 Version above ^31.0.6^7, ^2forcing ^1QBInvNew ^2to ^1true^7")
QBInvNew = true
else
@@ -233,4 +233,4 @@ if isStarted(PSInv) then
QBInvNew = false
end
end
end
end