diff --git a/rust/data/presets/full-settings/Community Race Season 4.json b/rust/data/presets/full-settings/Community Race Season 4.json index 2fb605976e..0bcf293775 100644 --- a/rust/data/presets/full-settings/Community Race Season 4.json +++ b/rust/data/presets/full-settings/Community Race Season 4.json @@ -4560,6 +4560,21 @@ }, "quality_of_life_settings": { "preset": null, + "enhanced_map_settings": { + "preset": "Yes", + "blue_doors": "Visible", + "gray_doors": "Visible", + "ammo_doors": "Visible", + "beam_doors": "Visible", + "heat": "Visible", + "water": "Visible", + "lava": "Visible", + "acid": "Visible", + "walls": "Enhanced", + "objectives": "Icon", + "map_station": "Icon", + "refill_station": "Icon" + }, "initial_map_reveal_settings": { "preset": null, "map_stations": "Full", @@ -4733,7 +4748,6 @@ "map_station_reveal": "Full", "energy_free_shinesparks": false, "all_enemies_respawn": false, - "ultra_low_qol": false, "disable_spikesuit": false, "disable_bluesuit": false, "enable_major_glitches": false, diff --git a/rust/data/presets/full-settings/Default.json b/rust/data/presets/full-settings/Default.json index b2da11c1ca..959ee21c89 100644 --- a/rust/data/presets/full-settings/Default.json +++ b/rust/data/presets/full-settings/Default.json @@ -4560,6 +4560,21 @@ }, "quality_of_life_settings": { "preset": "Default", + "enhanced_map_settings": { + "preset": "Yes", + "blue_doors": "Visible", + "gray_doors": "Visible", + "ammo_doors": "Visible", + "beam_doors": "Visible", + "heat": "Visible", + "water": "Visible", + "lava": "Visible", + "acid": "Visible", + "walls": "Enhanced", + "objectives": "Icon", + "map_station": "Icon", + "refill_station": "Icon" + }, "initial_map_reveal_settings": { "preset": "Maps", "map_stations": "Full", @@ -4738,7 +4753,6 @@ "disable_bluesuit": false, "enable_major_glitches": false, "speed_booster": "Vanilla", - "ultra_low_qol": false, "race_mode": false, "random_seed": null } diff --git a/rust/data/presets/full-settings/Mentor Tournament.json b/rust/data/presets/full-settings/Mentor Tournament.json index ebf773d7f6..7cc64708e6 100644 --- a/rust/data/presets/full-settings/Mentor Tournament.json +++ b/rust/data/presets/full-settings/Mentor Tournament.json @@ -4616,6 +4616,21 @@ }, "quality_of_life_settings": { "preset": null, + "enhanced_map_settings": { + "preset": "Yes", + "blue_doors": "Visible", + "gray_doors": "Visible", + "ammo_doors": "Visible", + "beam_doors": "Visible", + "heat": "Visible", + "water": "Visible", + "lava": "Visible", + "acid": "Visible", + "walls": "Enhanced", + "objectives": "Icon", + "map_station": "Icon", + "refill_station": "Icon" + }, "initial_map_reveal_settings": { "preset": null, "map_stations": "Full", @@ -4789,7 +4804,6 @@ "map_station_reveal": "Full", "energy_free_shinesparks": false, "all_enemies_respawn": false, - "ultra_low_qol": false, "disable_spikesuit": false, "disable_bluesuit": false, "enable_major_glitches": false, diff --git a/rust/data/presets/quality-of-life/Default.json b/rust/data/presets/quality-of-life/Default.json index fc8f167362..46f9ae3454 100644 --- a/rust/data/presets/quality-of-life/Default.json +++ b/rust/data/presets/quality-of-life/Default.json @@ -1,5 +1,20 @@ { "preset": "Default", + "enhanced_map_settings": { + "preset": "Yes", + "blue_doors": "Visible", + "gray_doors": "Visible", + "ammo_doors": "Visible", + "beam_doors": "Visible", + "heat": "Visible", + "water": "Visible", + "lava": "Visible", + "acid": "Visible", + "walls": "Enhanced", + "objectives": "Icon", + "map_station": "Icon", + "refill_station": "Icon" + }, "initial_map_reveal_settings": { "preset": "Maps", "map_stations": "Full", diff --git a/rust/data/presets/quality-of-life/High.json b/rust/data/presets/quality-of-life/High.json index ce19e4a407..cf4f33c041 100644 --- a/rust/data/presets/quality-of-life/High.json +++ b/rust/data/presets/quality-of-life/High.json @@ -1,5 +1,20 @@ { "preset": "High", + "enhanced_map_settings": { + "preset": "Yes", + "blue_doors": "Visible", + "gray_doors": "Visible", + "ammo_doors": "Visible", + "beam_doors": "Visible", + "heat": "Visible", + "water": "Visible", + "lava": "Visible", + "acid": "Visible", + "walls": "Enhanced", + "objectives": "Icon", + "map_station": "Icon", + "refill_station": "Icon" + }, "initial_map_reveal_settings": { "preset": "Maps", "map_stations": "Full", diff --git a/rust/data/presets/quality-of-life/Low.json b/rust/data/presets/quality-of-life/Low.json index 6844004473..a312773b93 100644 --- a/rust/data/presets/quality-of-life/Low.json +++ b/rust/data/presets/quality-of-life/Low.json @@ -1,5 +1,20 @@ { "preset": "Low", + "enhanced_map_settings": { + "preset": "Yes", + "blue_doors": "Visible", + "gray_doors": "Visible", + "ammo_doors": "Visible", + "beam_doors": "Visible", + "heat": "Visible", + "water": "Visible", + "lava": "Visible", + "acid": "Visible", + "walls": "Enhanced", + "objectives": "Icon", + "map_station": "Icon", + "refill_station": "Icon" + }, "initial_map_reveal_settings": { "preset": "Maps", "map_stations": "Full", diff --git a/rust/data/presets/quality-of-life/Max.json b/rust/data/presets/quality-of-life/Max.json index 9aff7459c2..9ce6efe103 100644 --- a/rust/data/presets/quality-of-life/Max.json +++ b/rust/data/presets/quality-of-life/Max.json @@ -1,5 +1,20 @@ { "preset": "Max", + "enhanced_map_settings": { + "preset": "Yes", + "blue_doors": "Visible", + "gray_doors": "Visible", + "ammo_doors": "Visible", + "beam_doors": "Visible", + "heat": "Visible", + "water": "Visible", + "lava": "Visible", + "acid": "Visible", + "walls": "Enhanced", + "objectives": "Icon", + "map_station": "Icon", + "refill_station": "Icon" + }, "initial_map_reveal_settings": { "preset": "Maps", "map_stations": "Full", diff --git a/rust/data/presets/quality-of-life/Off.json b/rust/data/presets/quality-of-life/Off.json index ddbfc506b9..3f17025817 100644 --- a/rust/data/presets/quality-of-life/Off.json +++ b/rust/data/presets/quality-of-life/Off.json @@ -1,5 +1,20 @@ { "preset": "Off", + "enhanced_map_settings": { + "preset": "No", + "blue_doors": "Hidden", + "gray_doors": "Hidden", + "ammo_doors": "Hidden", + "beam_doors": "Hidden", + "heat": "Hidden", + "water": "Hidden", + "lava": "Hidden", + "acid": "Hidden", + "walls": "Vanilla", + "objectives": "Vanilla", + "map_station": "Vanilla", + "refill_station": "Vanilla" + }, "initial_map_reveal_settings": { "preset": "No", "map_stations": "No", diff --git a/rust/maprando-web/src/main.rs b/rust/maprando-web/src/main.rs index 73f9f2327f..ceef3f89d9 100644 --- a/rust/maprando-web/src/main.rs +++ b/rust/maprando-web/src/main.rs @@ -478,7 +478,6 @@ struct SeedData { ammo_refill_all: bool, wall_jump: String, vanilla_map: bool, - ultra_low_qol: bool, } #[derive(MultipartForm)] @@ -781,7 +780,6 @@ async fn randomize( .unwrap() .to_string(), vanilla_map: settings.map_layout == "Vanilla", - ultra_low_qol: settings.other_settings.ultra_low_qol, }; let seed_name = &output.randomization.seed_name; diff --git a/rust/maprando-web/src/randomize_helpers.rs b/rust/maprando-web/src/randomize_helpers.rs index d0f79488e2..5bc199525a 100644 --- a/rust/maprando-web/src/randomize_helpers.rs +++ b/rust/maprando-web/src/randomize_helpers.rs @@ -192,9 +192,6 @@ impl SeedHeaderTemplate<'_> { if other_settings.energy_free_shinesparks { game_variations.push("Energy-free shinesparks"); } - if other_settings.ultra_low_qol { - game_variations.push("Ultra-low quality of life"); - } if other_settings.speed_booster == SpeedBooster::Split { game_variations.push("Split Speed Booster"); } @@ -219,8 +216,8 @@ impl SeedHeaderTemplate<'_> { pub struct SeedFooterTemplate { race_mode: bool, all_items_spawn: bool, + ammo_refill_all: bool, supers_double: bool, - ultra_low_qol: bool, settings: RandomizerSettings, } @@ -529,8 +526,8 @@ pub fn render_seed( let seed_footer_template = SeedFooterTemplate { race_mode: seed_data.race_mode, all_items_spawn: seed_data.all_items_spawn, + ammo_refill_all: seed_data.ammo_refill_all, supers_double: seed_data.supers_double, - ultra_low_qol: seed_data.ultra_low_qol, settings: seed_data.settings.clone(), }; let seed_footer_html = seed_footer_template.render()?; diff --git a/rust/maprando-web/src/seed.rs b/rust/maprando-web/src/seed.rs index f43dee866c..d3dae0054e 100644 --- a/rust/maprando-web/src/seed.rs +++ b/rust/maprando-web/src/seed.rs @@ -167,6 +167,7 @@ struct CustomizeRequest { rom: Bytes, samus_sprite: Text, etank_color: Text, + map_theme: Text, item_dot_change: Text, transition_letters: Text, reserve_hud_style: Text, @@ -236,16 +237,6 @@ async fn customize_seed( let orig_rom = Rom::new(req.rom.data.to_vec()); let mut rom = orig_rom.clone(); - let seed_data_str: String = String::from_utf8( - app_data - .seed_repository - .get_file(seed_name, "seed_data.json") - .await - .unwrap(), - ) - .unwrap(); - let seed_data = json::parse(&seed_data_str).unwrap(); - let settings_bytes = app_data .seed_repository .get_file(seed_name, "public/settings.json") @@ -277,8 +268,6 @@ async fn customize_seed( Some(serde_json::from_slice(&randomization_bytes).unwrap()) }; - let ultra_low_qol = seed_data["ultra_low_qol"].as_bool().unwrap_or(false); - let rom_digest = crypto_hash::hex_digest(crypto_hash::Algorithm::SHA256, &rom.data); info!("Rom digest: {rom_digest}"); if rom_digest != "12b77c4bc9c1832cee8881244659065ee1d84c70c3d29e6eaf92e6798cc2ca72" { @@ -286,19 +275,17 @@ async fn customize_seed( } let customize_settings = CustomizeSettings { - samus_sprite: if ultra_low_qol - && req.samus_sprite.0 == "samus_vanilla" - && req.vanilla_screw_attack_animation.0 - { - None - } else { - Some(req.samus_sprite.0.clone()) - }, + samus_sprite: Some(req.samus_sprite.0.clone()), etank_color: Some(( u8::from_str_radix(&req.etank_color.0[0..2], 16).unwrap() / 8, u8::from_str_radix(&req.etank_color.0[2..4], 16).unwrap() / 8, u8::from_str_radix(&req.etank_color.0[4..6], 16).unwrap() / 8, )), + map_theme: match req.map_theme.0.as_str() { + "Light" => maprando::customize::MapTheme::Light, + "Dark" => maprando::customize::MapTheme::Dark, + _ => panic!("Unexpected map_theme"), + }, item_dot_change: match req.item_dot_change.0.as_str() { "Stay" => maprando::customize::ItemDotChange::Stay, "Fade" => maprando::customize::ItemDotChange::Fade, diff --git a/rust/maprando-web/templates/generate/enhanced_map.html b/rust/maprando-web/templates/generate/enhanced_map.html new file mode 100644 index 0000000000..3828898921 --- /dev/null +++ b/rust/maprando-web/templates/generate/enhanced_map.html @@ -0,0 +1,211 @@ + \ No newline at end of file diff --git a/rust/maprando-web/templates/generate/game_variations.html b/rust/maprando-web/templates/generate/game_variations.html index 0cdccd8e60..0af75efea6 100644 --- a/rust/maprando-web/templates/generate/game_variations.html +++ b/rust/maprando-web/templates/generate/game_variations.html @@ -133,18 +133,6 @@ -
-
- {% include "help/variations/ultra_low_qol.html" %} - -
-
- - - - -
-
{% include "help/race.html" %} diff --git a/rust/maprando-web/templates/generate/help/quality/enhanced_map.html b/rust/maprando-web/templates/generate/help/quality/enhanced_map.html new file mode 100644 index 0000000000..588b19b36b --- /dev/null +++ b/rust/maprando-web/templates/generate/help/quality/enhanced_map.html @@ -0,0 +1,23 @@ + \ No newline at end of file diff --git a/rust/maprando-web/templates/generate/help/variations/ultra_low_qol.html b/rust/maprando-web/templates/generate/help/variations/ultra_low_qol.html deleted file mode 100644 index e20b95a56b..0000000000 --- a/rust/maprando-web/templates/generate/help/variations/ultra_low_qol.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - \ No newline at end of file diff --git a/rust/maprando-web/templates/generate/quality_of_life.html b/rust/maprando-web/templates/generate/quality_of_life.html index 55ad03a9f2..1e7f2a8c14 100644 --- a/rust/maprando-web/templates/generate/quality_of_life.html +++ b/rust/maprando-web/templates/generate/quality_of_life.html @@ -13,6 +13,29 @@

Quality-of-life options

Map
+
+
+ + +
+
+ + + + + +
+
+ +
@@ -587,12 +608,12 @@

Quality-of-life options

- + - +
@@ -822,6 +843,7 @@

Quality-of-life options

+{% include "help/quality/enhanced_map.html" %} {% include "help/quality/initial_map_reveal.html" %} {% include "help/quality/item_markers.html" %} {% include "help/quality/room_outline.html" %} @@ -867,4 +889,5 @@

Quality-of-life options

{% include "help/quality/camera_fixes.html" %} {% include "initial_map_reveal.html" %} +{% include "enhanced_map.html" %} {% include "crash_fixes.html" %} \ No newline at end of file diff --git a/rust/maprando-web/templates/generate/scripts.html b/rust/maprando-web/templates/generate/scripts.html index 310e7de7f6..d639626bd0 100644 --- a/rust/maprando-web/templates/generate/scripts.html +++ b/rust/maprando-web/templates/generate/scripts.html @@ -194,6 +194,24 @@ } } +function buildEnhancedMapSettings(formData) { + return { + "preset": formData.get("enhanced_map"), + "blue_doors": formData.get("enhanced_map_blue_doors"), + "gray_doors": formData.get("enhanced_map_gray_doors"), + "ammo_doors": formData.get("enhanced_map_ammo_doors"), + "beam_doors": formData.get("enhanced_map_beam_doors"), + "heat": formData.get("enhanced_map_heat"), + "water": formData.get("enhanced_map_water"), + "lava": formData.get("enhanced_map_lava"), + "acid": formData.get("enhanced_map_acid"), + "walls": formData.get("enhanced_map_walls"), + "objectives": formData.get("enhanced_map_objectives"), + "map_station": formData.get("enhanced_map_station"), + "refill_station": formData.get("enhanced_map_refill"), + } +} + function emptyToNull(s) { if (s == "") { return null; @@ -257,6 +275,7 @@ }, "quality_of_life_settings": { "preset": formData.get("quality_of_life_preset"), + "enhanced_map_settings": buildEnhancedMapSettings(formData), "initial_map_reveal_settings": buildInitialMapRevealSettings(formData), "item_markers": formData.get("item_markers"), "room_outline_revealed": formData.get("room_outline_revealed") == "true", @@ -331,7 +350,6 @@ "map_station_reveal": formData.get("map_station_reveal"), "energy_free_shinesparks": formData.get("energy_free_shinesparks") == "true", "all_enemies_respawn": formData.get("all_enemies_respawn") == "true", - "ultra_low_qol": formData.get("ultra_low_qol") == "true", "race_mode": formData.get("race_mode") == "true", "random_seed": tryParseInt(formData.get("random_seed")), "disable_spikesuit": formData.get("disable_spike_suit") == "true", @@ -504,6 +522,22 @@ processInitialMapRevealPreset(); } +function applyEnhancedMapSettings(emSettings) { + applyRadioValue("enhancedMapBlueDoors", emSettings.blue_doors); + applyRadioValue("enhancedMapGrayDoors", emSettings.gray_doors); + applyRadioValue("enhancedMapAmmoDoors", emSettings.ammo_doors); + applyRadioValue("enhancedMapBeamDoors", emSettings.beam_doors); + applyRadioValue("enhancedMapHeat", emSettings.heat); + applyRadioValue("enhancedMapWater", emSettings.water); + applyRadioValue("enhancedMapLava", emSettings.lava); + applyRadioValue("enhancedMapAcid", emSettings.acid); + applyRadioValue("enhancedMapWalls", emSettings.walls); + applyRadioValue("enhancedMapObjectives", emSettings.objectives); + applyRadioValue("enhancedMapStation", emSettings.map_station); + applyRadioValue("enhancedMapRefill", emSettings.refill_station); + applyRadioValue("enhancedMapPreset", emSettings.preset); + processEnhancedMapPreset(); +} function applyQolPreset(preset) { for (var presetEl of document.getElementsByClassName("qol-preset-button")) { if (presetEl.value == preset.preset) { @@ -518,6 +552,7 @@ } applyInitialMapRevealSettings(preset.initial_map_reveal_settings); + applyEnhancedMapSettings(preset.enhanced_map_settings); applyRadioValue("itemMarkers", preset.item_markers); applyRadioValue("roomOutlineRevealed", preset.room_outline_revealed); applyRadioValue("oppositeAreaRevealed", preset.opposite_area_revealed); @@ -614,7 +649,6 @@ applyRadioValue("mapStationReveal", other.map_station_reveal); applyRadioValue("energyFreeShinesparks", other.energy_free_shinesparks); applyRadioValue("allEnemiesRespawn", other.all_enemies_respawn); - applyRadioValue("ultraLowQoL", other.ultra_low_qol); applyRadioValue("disableSpikesuit", other.disable_spikesuit); applyRadioValue("disableBluesuit", other.disable_bluesuit); applyRadioValue("enableMajorGlitches", other.enable_major_glitches); @@ -732,9 +766,6 @@ applyQolPreset(preset); } } - if (!isOff) { - document.getElementById("ultraLowQoLNo").checked = true; - } fullSettingsChanged(); } @@ -934,6 +965,47 @@ initialMapRevealPresetChanged(); } +function processEnhancedMapPreset() { + let mapTypes = [ + "BlueDoors", + "GrayDoors", + "AmmoDoors", + "BeamDoors", + "Heat", + "Water", + "Lava", + "Acid" + ] + if (document.getElementById("enhancedMapPresetNo").checked) { + for (t of mapTypes) { + document.getElementById(`enhancedMap${t}Hidden`).checked = true; + } + document.getElementById("enhancedMapWallsVanilla").checked = true; + document.getElementById("enhancedMapObjectivesVanilla").checked = true; + document.getElementById("enhancedMapStationVanilla").checked = true; + document.getElementById("enhancedMapRefillVanilla").checked = true; + } else if (document.getElementById("enhancedMapPresetYes").checked) { + for (t of mapTypes) { + document.getElementById(`enhancedMap${t}Visible`).checked = true; + } + document.getElementById("enhancedMapWallsEnhanced").checked = true; + document.getElementById("enhancedMapObjectivesIcon").checked = true; + document.getElementById("enhancedMapStationIcon").checked = true; + document.getElementById("enhancedMapRefillIcon").checked = true; +} +} + +function enhancedMapPresetChanged() { + processEnhancedMapPreset(); + qualityOfLifeSettingChanged(); +} + +function enhancedMapSettingChanged() { + document.getElementById("enhancedMapPresetNo").checked = false; + document.getElementById("enhancedMapPresetYes").checked = false; + enhancedMapPresetChanged(); +} + function objectivePresetChanged() { for (presetEl of document.getElementsByClassName("objective-preset-button")) { if (presetEl.checked) { @@ -1245,22 +1317,9 @@ } function gameVariationChanged() { - if (!document.getElementById("enableMajorGlitchesYes").checked) - { - document.getElementById("ultraLowQoLNo").checked = true; - } fullSettingsChanged(); } -function ultraLowQoLChanged() { - if (!document.getElementById("ultraLowQoLYes").checked) { - return; - } - document.getElementById("qualityOfLifeOff").checked = true; - document.getElementById("enableMajorGlitchesYes").checked = true; - qualityOfLifePresetChanged(); -} - function initializeSpoilerToken() { if (localStorage["spoilerToken"] === undefined) { let result = ''; @@ -1288,7 +1347,6 @@ !document.getElementById("areaAssignmentPresetStandard").checked || document.getElementById("doorLocksSizeSmall").checked || document.getElementById("mapStationRevealPartial").checked || - document.getElementById("ultraLowQoLYes").checked || document.getElementById("raceModeYes").checked) { document.getElementById("collapseGameVariations").classList.remove("collapse"); diff --git a/rust/maprando-web/templates/seed/enhanced_map_details.html b/rust/maprando-web/templates/seed/enhanced_map_details.html new file mode 100644 index 0000000000..319a547fae --- /dev/null +++ b/rust/maprando-web/templates/seed/enhanced_map_details.html @@ -0,0 +1,49 @@ +{% let em = settings.quality_of_life_settings.enhanced_map_settings %} +
+
Blue doors:
+
{{ em.blue_doors }}
+
+
+
Gray doors:
+
{{ em.gray_doors }}
+
+
+
Ammo doors:
+
{{ em.ammo_doors }}
+
+
+
Beam doors:
+
{{ em.beam_doors }}
+
+
+
Heat:
+
{{ em.heat }}
+
+
+
Water:
+
{{ em.water }}
+
+
+
Lava:
+
{{ em.lava }}
+
+
+
Acid:
+
{{ em.acid }}
+
+
+
Walls and passages:
+
{{ em.walls }}
+
+
+
Objectives:
+
{{ em.objectives}}
+
+
+
Map stations:
+
{{ em.map_station}}
+
+
+
Refill stations:
+
{{ em.refill_station }}
+
\ No newline at end of file diff --git a/rust/maprando-web/templates/seed/help/map_theme.html b/rust/maprando-web/templates/seed/help/map_theme.html new file mode 100644 index 0000000000..29cfbf90c8 --- /dev/null +++ b/rust/maprando-web/templates/seed/help/map_theme.html @@ -0,0 +1,26 @@ + + + + \ No newline at end of file diff --git a/rust/maprando-web/templates/seed/map_appearance.html b/rust/maprando-web/templates/seed/map_appearance.html index 346dc88577..946e511316 100644 --- a/rust/maprando-web/templates/seed/map_appearance.html +++ b/rust/maprando-web/templates/seed/map_appearance.html @@ -1,3 +1,18 @@ +
+
+ +
+
+ + + + +
+
+