This commit is contained in:
Lyle Mantooth 2022-06-05 15:56:36 -04:00
parent a0150caa56
commit d1d4e31738
Signed by: IslandUsurper
GPG key ID: 6DB52EAE123A5789
2 changed files with 16 additions and 15 deletions

View file

@ -387,13 +387,11 @@ pub struct OptionFlags {
pub enemy_damage_chaos_mode: bool, pub enemy_damage_chaos_mode: bool,
//pub easy_mode_escape: bool, //pub easy_mode_escape: bool,
pub enemies_absorbable: bool, pub enemies_absorbable: bool,
pub absorbable_spawn_rate: u8, pub absorbable_spawn_rate: u8,
pub absorbable_types: HashMap<AbsorbableType, bool>, pub absorbable_types: HashMap<AbsorbableType, bool>,
//pub boss_madness: bool, //pub boss_madness: bool,
pub randomize_bosses: bool, pub randomize_bosses: bool,
pub randomize_bosses_type: RandomizeBossesType, pub randomize_bosses_type: RandomizeBossesType,
@ -406,7 +404,6 @@ pub struct OptionFlags {
//pub randomize_boss_damage_max_amount: u8, //pub randomize_boss_damage_max_amount: u8,
//pub randomize_boss_behavior: bool, //pub randomize_boss_behavior: bool,
pub randomize_dungeon_palettes: bool, pub randomize_dungeon_palettes: bool,
pub set_blackout_mode: bool, pub set_blackout_mode: bool,
@ -766,8 +763,12 @@ mod test {
fn test_option_flags_serde() { fn test_option_flags_serde() {
let empty = "{}"; let empty = "{}";
let actual: OptionFlags = serde_json::from_str(empty).expect("Can't deserialize empty"); let actual: OptionFlags = serde_json::from_str(empty).expect("Can't deserialize empty");
let expected = serde_json::to_string(&OptionFlags::default()).expect("Can't serialize default"); let expected =
serde_json::to_string(&OptionFlags::default()).expect("Can't serialize default");
assert_eq!(serde_json::to_string(&actual).expect("Can't roundtrip"), expected); assert_eq!(
serde_json::to_string(&actual).expect("Can't roundtrip"),
expected
);
} }
} }