From 246ce7e75cc39273dee0f058701d9243f6b05867 Mon Sep 17 00:00:00 2001 From: codemann8 Date: Fri, 27 Dec 2024 00:31:14 -0600 Subject: [PATCH] Backwards compatibility for new dungeon item shuffle structure in customizer --- source/classes/CustomSettings.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/source/classes/CustomSettings.py b/source/classes/CustomSettings.py index 17d66946..a636a776 100644 --- a/source/classes/CustomSettings.py +++ b/source/classes/CustomSettings.py @@ -146,14 +146,23 @@ class CustomSettings(object): args.mapshuffle[p] = get_setting(settings['mapshuffle'], args.mapshuffle[p]) args.compassshuffle[p] = get_setting(settings['compassshuffle'], args.compassshuffle[p]) + dungeon_item_map = { 0: 'none', + 1: 'wild' } + if args.mapshuffle[p] in dungeon_item_map: + args.mapshuffle[p] = dungeon_item_map[args.mapshuffle[p]] + if args.compassshuffle[p] in dungeon_item_map: + args.compassshuffle[p] = dungeon_item_map[args.compassshuffle[p]] + if args.bigkeyshuffle[p] in dungeon_item_map: + args.bigkeyshuffle[p] = dungeon_item_map[args.bigkeyshuffle[p]] + if get_setting(settings['keysanity'], args.keysanity): - if args.bigkeyshuffle[p] == 'none': + if args.bigkeyshuffle[p] in ['none', 0]: args.bigkeyshuffle[p] = 'wild' if args.keyshuffle[p] == 'none': args.keyshuffle[p] = 'wild' - if args.mapshuffle[p] == 'none': + if args.mapshuffle[p] in ['none', 0]: args.mapshuffle[p] = 'wild' - if args.compassshuffle[p] == 'none': + if args.compassshuffle[p] in ['none', 0]: args.compassshuffle[p] = 'wild' args.shufflebosses[p] = get_setting(settings['boss_shuffle'], get_setting(settings['shufflebosses'], args.shufflebosses[p]))