Skip to content

Commit

Permalink
fix item registry schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Lamby777 committed Aug 19, 2024
1 parent cbe3f16 commit 40ccd8c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
8 changes: 5 additions & 3 deletions pets-gd/assets/itemregistries/weapons.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
"trusty_rusty_pistol": {
"attributes": [
"Cheap",
"Ranged",
"Firearm"
"Ranged"
],
"category": {
"Equipment": {
Expand All @@ -19,7 +18,10 @@
"epsilon": 0,
"lambda": 0,
"max_mana": 0
}
},
"equippable_by": [
"Terra"
]
}
}
}
Expand Down
9 changes: 5 additions & 4 deletions pets-lib/src/stats/autoload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ impl IObject for StatsInterface {
fn init(base: Base<Object>) -> 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();
Expand All @@ -71,6 +70,8 @@ impl IObject for StatsInterface {
// randomize seed for godot
randomize();

print_debug_crap();

Self { base, save }
}
}
Expand All @@ -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);
}

0 comments on commit 40ccd8c

Please sign in to comment.