Skip to content

Commit d088d58

Browse files
committed
make upgrade more flexible with some fields
1 parent ab035a9 commit d088d58

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

rust/maprando/src/settings.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -945,19 +945,19 @@ fn upgrade_other_settings(settings: &mut serde_json::Value) -> Result<()> {
945945
*area_assignment = serde_json::to_value(AreaAssignment::from_preset(preset))?;
946946
}
947947

948-
if other_settings.get("disable_spikesuit").is_none() {
948+
if other_settings["disable_spikesuit"].as_bool().is_none() {
949949
other_settings.insert("disable_spikesuit".to_string(), false.into());
950950
}
951951

952-
if other_settings.get("disable_bluesuit").is_none() {
952+
if other_settings["disable_bluesuit"].as_bool().is_none() {
953953
other_settings.insert("disable_bluesuit".to_string(), false.into());
954954
}
955955

956-
if other_settings.get("enable_major_glitches").is_none() {
956+
if other_settings["enable_major_glitches"].as_bool().is_none() {
957957
other_settings.insert("enable_major_glitches".to_string(), false.into());
958958
}
959959

960-
if other_settings.get("speed_booster").is_none() {
960+
if other_settings["speed_booster"].as_str().is_none() {
961961
other_settings.insert("speed_booster".to_string(), "Vanilla".into());
962962
}
963963

0 commit comments

Comments
 (0)