remove powderlimit field entirely and make it automatically find based on num of powders (it's useless anyway)
This commit is contained in:
parent
501bacc7f3
commit
b4f61b9eb1
3 changed files with 2 additions and 4 deletions
|
@ -19,7 +19,6 @@
|
|||
{"id": "rawSpellDamage", "base":222 , "roll":130 },
|
||||
{"id": "spellDamage", "base":10 , "roll":130 }
|
||||
],
|
||||
"powder_limit": 10,
|
||||
"powders": [
|
||||
{"type":"E", "tier":6},
|
||||
{"type":"T", "tier":6},
|
||||
|
|
|
@ -215,13 +215,13 @@ fn cook(
|
|||
dbg!(&powdervec);
|
||||
}
|
||||
|
||||
let real_powderlimit = json_config.powder_limit.ok_or(PowderLimitNotPresent)?;
|
||||
let powderlimitfr: u8 = powdervec.len() as u8;
|
||||
|
||||
// ENCODE: PowderData
|
||||
// only occurs if the powders array is present and the powder limit is also present
|
||||
//
|
||||
PowderData {
|
||||
powder_slots: real_powderlimit,
|
||||
powder_slots: powderlimitfr,
|
||||
powders: powdervec,
|
||||
}
|
||||
.encode(ver, out)
|
||||
|
|
|
@ -20,7 +20,6 @@ pub struct Jsonconfig {
|
|||
pub name: Option<String>,
|
||||
pub shiny: Option<Shinyjson>,
|
||||
pub ids: Option<Vec<Identificationer>>,
|
||||
pub powder_limit: Option<u8>,
|
||||
pub powders: Option<Vec<Powder>>,
|
||||
pub rerolls: Option<u8>,
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue