diff --git a/config.json b/config.json index ccc5e6b..8b9c341 100644 --- a/config.json +++ b/config.json @@ -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}, diff --git a/src/main.rs b/src/main.rs index ddddba3..b0f4a54 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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) diff --git a/src/structures/mod.rs b/src/structures/mod.rs index 84d19cc..67b4f12 100644 --- a/src/structures/mod.rs +++ b/src/structures/mod.rs @@ -20,7 +20,6 @@ pub struct Jsonconfig { pub name: Option, pub shiny: Option, pub ids: Option>, - pub powder_limit: Option, pub powders: Option>, pub rerolls: Option, }