cleans up raws/mod.rs with trait impls for json parsing
This commit is contained in:
parent
875e6bfee7
commit
dc1cb0562f
5 changed files with 60 additions and 21 deletions
13
src/raws/loot_table_structs.rs
Normal file
13
src/raws/loot_table_structs.rs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
use serde::Deserialize;
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
pub struct LootTable {
|
||||
pub id: String,
|
||||
pub table: Vec<LootTableEntry>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
pub struct LootTableEntry {
|
||||
pub id: String,
|
||||
pub weight: i32,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue