From 40ccd8c88d9df6138cfc82edcad961fd21946638 Mon Sep 17 00:00:00 2001 From: Cherry Date: Mon, 19 Aug 2024 16:40:20 -0400 Subject: [PATCH] fix item registry schema --- pets-gd/assets/itemregistries/weapons.json | 8 +++++--- pets-lib/src/stats/autoload.rs | 9 +++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pets-gd/assets/itemregistries/weapons.json b/pets-gd/assets/itemregistries/weapons.json index b8e019eb..69390f37 100644 --- a/pets-gd/assets/itemregistries/weapons.json +++ b/pets-gd/assets/itemregistries/weapons.json @@ -2,8 +2,7 @@ "trusty_rusty_pistol": { "attributes": [ "Cheap", - "Ranged", - "Firearm" + "Ranged" ], "category": { "Equipment": { @@ -19,7 +18,10 @@ "epsilon": 0, "lambda": 0, "max_mana": 0 - } + }, + "equippable_by": [ + "Terra" + ] } } } diff --git a/pets-lib/src/stats/autoload.rs b/pets-lib/src/stats/autoload.rs index 4f6e6cd0..b29ee11b 100644 --- a/pets-lib/src/stats/autoload.rs +++ b/pets-lib/src/stats/autoload.rs @@ -62,7 +62,6 @@ impl IObject for StatsInterface { fn init(base: Base) -> Self { // start an empty save file, but load other if the player // picks a save file instead of "new" - print_debug_crap(); let save = SaveFile::fresh(); load_item_registry(); @@ -71,6 +70,8 @@ impl IObject for StatsInterface { // randomize seed for godot randomize(); + print_debug_crap(); + Self { base, save } } } @@ -79,7 +80,7 @@ impl IObject for StatsInterface { /// it'll run when the game starts fn print_debug_crap() { // let ser = crate::stats::charmap::default_charmap(); - let ser = CharMap::_debugging_charmap(); - let ser = serde_json::to_string(&ser).unwrap(); - godot_print!("{}", ser); + // let ser = CharMap::_debugging_charmap(); + // let ser = serde_json::to_string(&ser).unwrap(); + // godot_print!("{}", ser); }