Switch item definitions to a JSON-driven runtime registry
Replaces the build-time item.json/tools.item.py code generator with a single item_t ITEM registry populated at runtime by parsing assets/items.jsonc, so items/types can grow without a rebuild. Adds itemGetDefById/itemGetTypeById/itemGetIdByName/itemTypeGetOrCreate, updates inventory/backpack to size off the new *_DEF_COUNT_MAX caps and look up types dynamically, and reorders engine init so rpgInit (which loads items) runs before uiInit (which needs the item type count to size the backpack's tabs). Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
1 parent
804f8aa1fa
commit
109ddc9e1e
15 files changed
+216
-174
No files matched your search
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"items": {
|
||||
"potion": { "type": "MEDICINE" },
|
||||
"potato": { "type": "FOOD" },
|
||||
"apple": { "type": "FOOD" }
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user