Convert color and sfx options into top-level definitions for pickling

This commit is contained in:
espeon65536 2021-09-18 17:21:49 -05:00 committed by Fabian Dill
parent f9950e1f01
commit 061cc69a6a
3 changed files with 1079 additions and 61 deletions

View File

@ -0,0 +1,963 @@
# Auto-generated color and sound-effect options from Colors.py and Sounds.py
from Options import Choice
class kokiri_color(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code."""
displayname = "Kokiri Tunic"
option_random_choice = 0
option_completely_random = 1
option_kokiri_green = 2
option_goron_red = 3
option_zora_blue = 4
option_black = 5
option_white = 6
option_azure_blue = 7
option_vivid_cyan = 8
option_light_red = 9
option_fuchsia = 10
option_purple = 11
option_majora_purple = 12
option_twitch_purple = 13
option_purple_heart = 14
option_persian_rose = 15
option_dirty_yellow = 16
option_blush_pink = 17
option_hot_pink = 18
option_rose_pink = 19
option_orange = 20
option_gray = 21
option_gold = 22
option_silver = 23
option_beige = 24
option_teal = 25
option_blood_red = 26
option_blood_orange = 27
option_royal_blue = 28
option_sonic_blue = 29
option_nes_green = 30
option_dark_green = 31
option_lumen = 32
default = 2
class goron_color(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code."""
displayname = "Goron Tunic"
option_random_choice = 0
option_completely_random = 1
option_kokiri_green = 2
option_goron_red = 3
option_zora_blue = 4
option_black = 5
option_white = 6
option_azure_blue = 7
option_vivid_cyan = 8
option_light_red = 9
option_fuchsia = 10
option_purple = 11
option_majora_purple = 12
option_twitch_purple = 13
option_purple_heart = 14
option_persian_rose = 15
option_dirty_yellow = 16
option_blush_pink = 17
option_hot_pink = 18
option_rose_pink = 19
option_orange = 20
option_gray = 21
option_gold = 22
option_silver = 23
option_beige = 24
option_teal = 25
option_blood_red = 26
option_blood_orange = 27
option_royal_blue = 28
option_sonic_blue = 29
option_nes_green = 30
option_dark_green = 31
option_lumen = 32
default = 3
class zora_color(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code."""
displayname = "Zora Tunic"
option_random_choice = 0
option_completely_random = 1
option_kokiri_green = 2
option_goron_red = 3
option_zora_blue = 4
option_black = 5
option_white = 6
option_azure_blue = 7
option_vivid_cyan = 8
option_light_red = 9
option_fuchsia = 10
option_purple = 11
option_majora_purple = 12
option_twitch_purple = 13
option_purple_heart = 14
option_persian_rose = 15
option_dirty_yellow = 16
option_blush_pink = 17
option_hot_pink = 18
option_rose_pink = 19
option_orange = 20
option_gray = 21
option_gold = 22
option_silver = 23
option_beige = 24
option_teal = 25
option_blood_red = 26
option_blood_orange = 27
option_royal_blue = 28
option_sonic_blue = 29
option_nes_green = 30
option_dark_green = 31
option_lumen = 32
default = 4
class silver_gauntlets_color(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code."""
displayname = "Silver Gauntlets Color"
option_random_choice = 0
option_completely_random = 1
option_silver = 2
option_gold = 3
option_black = 4
option_green = 5
option_blue = 6
option_bronze = 7
option_red = 8
option_sky_blue = 9
option_pink = 10
option_magenta = 11
option_orange = 12
option_lime = 13
option_purple = 14
default = 2
class golden_gauntlets_color(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code."""
displayname = "Golden Gauntlets Color"
option_random_choice = 0
option_completely_random = 1
option_silver = 2
option_gold = 3
option_black = 4
option_green = 5
option_blue = 6
option_bronze = 7
option_red = 8
option_sky_blue = 9
option_pink = 10
option_magenta = 11
option_orange = 12
option_lime = 13
option_purple = 14
default = 3
class mirror_shield_frame_color(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code."""
displayname = "Mirror Shield Frame Color"
option_random_choice = 0
option_completely_random = 1
option_red = 2
option_green = 3
option_blue = 4
option_yellow = 5
option_cyan = 6
option_magenta = 7
option_orange = 8
option_gold = 9
option_purple = 10
option_pink = 11
default = 2
class navi_color_default_inner(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code."""
displayname = "Navi Idle Inner"
option_random_choice = 0
option_completely_random = 1
option_rainbow = 2
option_gold = 3
option_white = 4
option_green = 5
option_light_blue = 6
option_yellow = 7
option_red = 8
option_magenta = 9
option_black = 10
option_tatl = 11
option_tael = 12
option_fi = 13
option_ciela = 14
option_epona = 15
option_ezlo = 16
option_king_of_red_lions = 17
option_linebeck = 18
option_loftwing = 19
option_midna = 20
option_phantom_zelda = 21
default = 4
class navi_color_default_outer(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code. "match_inner" copies the inner color for this option."""
displayname = "Navi Idle Outer"
option_random_choice = 0
option_completely_random = 1
option_rainbow = 2
option_gold = 3
option_white = 4
option_green = 5
option_light_blue = 6
option_yellow = 7
option_red = 8
option_magenta = 9
option_black = 10
option_tatl = 11
option_tael = 12
option_fi = 13
option_ciela = 14
option_epona = 15
option_ezlo = 16
option_king_of_red_lions = 17
option_linebeck = 18
option_loftwing = 19
option_midna = 20
option_phantom_zelda = 21
option_match_inner = 22
default = 22
class navi_color_enemy_inner(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code."""
displayname = "Navi Targeting Enemy Inner"
option_random_choice = 0
option_completely_random = 1
option_rainbow = 2
option_gold = 3
option_white = 4
option_green = 5
option_light_blue = 6
option_yellow = 7
option_red = 8
option_magenta = 9
option_black = 10
option_tatl = 11
option_tael = 12
option_fi = 13
option_ciela = 14
option_epona = 15
option_ezlo = 16
option_king_of_red_lions = 17
option_linebeck = 18
option_loftwing = 19
option_midna = 20
option_phantom_zelda = 21
default = 7
class navi_color_enemy_outer(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code. "match_inner" copies the inner color for this option."""
displayname = "Navi Targeting Enemy Outer"
option_random_choice = 0
option_completely_random = 1
option_rainbow = 2
option_gold = 3
option_white = 4
option_green = 5
option_light_blue = 6
option_yellow = 7
option_red = 8
option_magenta = 9
option_black = 10
option_tatl = 11
option_tael = 12
option_fi = 13
option_ciela = 14
option_epona = 15
option_ezlo = 16
option_king_of_red_lions = 17
option_linebeck = 18
option_loftwing = 19
option_midna = 20
option_phantom_zelda = 21
option_match_inner = 22
default = 22
class navi_color_npc_inner(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code."""
displayname = "Navi Targeting NPC Inner"
option_random_choice = 0
option_completely_random = 1
option_rainbow = 2
option_gold = 3
option_white = 4
option_green = 5
option_light_blue = 6
option_yellow = 7
option_red = 8
option_magenta = 9
option_black = 10
option_tatl = 11
option_tael = 12
option_fi = 13
option_ciela = 14
option_epona = 15
option_ezlo = 16
option_king_of_red_lions = 17
option_linebeck = 18
option_loftwing = 19
option_midna = 20
option_phantom_zelda = 21
default = 6
class navi_color_npc_outer(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code. "match_inner" copies the inner color for this option."""
displayname = "Navi Targeting NPC Outer"
option_random_choice = 0
option_completely_random = 1
option_rainbow = 2
option_gold = 3
option_white = 4
option_green = 5
option_light_blue = 6
option_yellow = 7
option_red = 8
option_magenta = 9
option_black = 10
option_tatl = 11
option_tael = 12
option_fi = 13
option_ciela = 14
option_epona = 15
option_ezlo = 16
option_king_of_red_lions = 17
option_linebeck = 18
option_loftwing = 19
option_midna = 20
option_phantom_zelda = 21
option_match_inner = 22
default = 22
class navi_color_prop_inner(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code."""
displayname = "Navi Targeting Prop Inner"
option_random_choice = 0
option_completely_random = 1
option_rainbow = 2
option_gold = 3
option_white = 4
option_green = 5
option_light_blue = 6
option_yellow = 7
option_red = 8
option_magenta = 9
option_black = 10
option_tatl = 11
option_tael = 12
option_fi = 13
option_ciela = 14
option_epona = 15
option_ezlo = 16
option_king_of_red_lions = 17
option_linebeck = 18
option_loftwing = 19
option_midna = 20
option_phantom_zelda = 21
default = 5
class navi_color_prop_outer(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code. "match_inner" copies the inner color for this option."""
displayname = "Navi Targeting Prop Outer"
option_random_choice = 0
option_completely_random = 1
option_rainbow = 2
option_gold = 3
option_white = 4
option_green = 5
option_light_blue = 6
option_yellow = 7
option_red = 8
option_magenta = 9
option_black = 10
option_tatl = 11
option_tael = 12
option_fi = 13
option_ciela = 14
option_epona = 15
option_ezlo = 16
option_king_of_red_lions = 17
option_linebeck = 18
option_loftwing = 19
option_midna = 20
option_phantom_zelda = 21
option_match_inner = 22
default = 22
class sword_trail_color_inner(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code."""
displayname = "Sword Trail Inner"
option_random_choice = 0
option_completely_random = 1
option_rainbow = 2
option_white = 3
option_red = 4
option_green = 5
option_blue = 6
option_cyan = 7
option_magenta = 8
option_orange = 9
option_gold = 10
option_purple = 11
option_pink = 12
default = 3
class sword_trail_color_outer(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code. "match_inner" copies the inner color for this option."""
displayname = "Sword Trail Outer"
option_random_choice = 0
option_completely_random = 1
option_rainbow = 2
option_white = 3
option_red = 4
option_green = 5
option_blue = 6
option_cyan = 7
option_magenta = 8
option_orange = 9
option_gold = 10
option_purple = 11
option_pink = 12
option_match_inner = 13
default = 13
class bombchu_trail_color_inner(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code."""
displayname = "Bombchu Trail Inner"
option_random_choice = 0
option_completely_random = 1
option_rainbow = 2
option_red = 3
option_green = 4
option_blue = 5
option_cyan = 6
option_magenta = 7
option_orange = 8
option_gold = 9
option_purple = 10
option_pink = 11
default = 3
class bombchu_trail_color_outer(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code. "match_inner" copies the inner color for this option."""
displayname = "Bombchu Trail Outer"
option_random_choice = 0
option_completely_random = 1
option_rainbow = 2
option_red = 3
option_green = 4
option_blue = 5
option_cyan = 6
option_magenta = 7
option_orange = 8
option_gold = 9
option_purple = 10
option_pink = 11
option_match_inner = 12
default = 12
class boomerang_trail_color_inner(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code."""
displayname = "Boomerang Trail Inner"
option_random_choice = 0
option_completely_random = 1
option_rainbow = 2
option_yellow = 3
option_red = 4
option_green = 5
option_blue = 6
option_cyan = 7
option_magenta = 8
option_orange = 9
option_gold = 10
option_purple = 11
option_pink = 12
default = 3
class boomerang_trail_color_outer(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code. "match_inner" copies the inner color for this option."""
displayname = "Boomerang Trail Outer"
option_random_choice = 0
option_completely_random = 1
option_rainbow = 2
option_yellow = 3
option_red = 4
option_green = 5
option_blue = 6
option_cyan = 7
option_magenta = 8
option_orange = 9
option_gold = 10
option_purple = 11
option_pink = 12
option_match_inner = 13
default = 13
class heart_color(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code."""
displayname = "Heart Color"
option_random_choice = 0
option_completely_random = 1
option_red = 2
option_green = 3
option_blue = 4
option_yellow = 5
default = 2
class magic_color(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code."""
displayname = "Magic Color"
option_random_choice = 0
option_completely_random = 1
option_green = 2
option_red = 3
option_blue = 4
option_purple = 5
option_pink = 6
option_yellow = 7
option_white = 8
default = 2
class a_button_color(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code."""
displayname = "A Button Color"
option_random_choice = 0
option_completely_random = 1
option_n64_blue = 2
option_n64_green = 3
option_n64_red = 4
option_gamecube_green = 5
option_gamecube_red = 6
option_gamecube_grey = 7
option_yellow = 8
option_black = 9
option_white = 10
option_magenta = 11
option_ruby = 12
option_sapphire = 13
option_lime = 14
option_cyan = 15
option_purple = 16
option_orange = 17
default = 2
class b_button_color(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code."""
displayname = "B Button Color"
option_random_choice = 0
option_completely_random = 1
option_n64_blue = 2
option_n64_green = 3
option_n64_red = 4
option_gamecube_green = 5
option_gamecube_red = 6
option_gamecube_grey = 7
option_yellow = 8
option_black = 9
option_white = 10
option_magenta = 11
option_ruby = 12
option_sapphire = 13
option_lime = 14
option_cyan = 15
option_purple = 16
option_orange = 17
default = 3
class c_button_color(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code."""
displayname = "C Button Color"
option_random_choice = 0
option_completely_random = 1
option_n64_blue = 2
option_n64_green = 3
option_n64_red = 4
option_gamecube_green = 5
option_gamecube_red = 6
option_gamecube_grey = 7
option_yellow = 8
option_black = 9
option_white = 10
option_magenta = 11
option_ruby = 12
option_sapphire = 13
option_lime = 14
option_cyan = 15
option_purple = 16
option_orange = 17
default = 8
class start_button_color(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code."""
displayname = "Start Button Color"
option_random_choice = 0
option_completely_random = 1
option_n64_blue = 2
option_n64_green = 3
option_n64_red = 4
option_gamecube_green = 5
option_gamecube_red = 6
option_gamecube_grey = 7
option_yellow = 8
option_black = 9
option_white = 10
option_magenta = 11
option_ruby = 12
option_sapphire = 13
option_lime = 14
option_cyan = 15
option_purple = 16
option_orange = 17
default = 4
class sfx_navi_overworld(Choice):
"""Choose a sound effect. "random_choice" selects a random option. "random_ear_safe" selects a random safe option. "completely_random" selects any random sound."""
displayname = "Navi Overworld"
option_default = 0
option_completely_random = 1
option_random_ear_safe = 2
option_random_choice = 3
option_none = 4
option_bark = 5
option_business_scrub = 6
option_carrot_refill = 7
option_cluck = 8
option_cockadoodledoo = 9
option_dusk_howl = 10
option_exploding_crate = 11
option_explosion = 12
option_great_fairy = 13
option_guay = 14
option_low_health = 15
option_recover_health = 16
option_horse_neigh = 17
option_shattering_ice = 18
option_moo = 19
option_mweep = 20
option_navi_hello = 21
option_notification = 22
option_poe = 23
option_shattering_pot = 24
option_redead_scream = 25
option_ribbit = 26
option_ruto_giggle = 27
option_skulltula = 28
option_soft_beep = 29
option_tambourine = 30
option_timer = 31
option_adult_zelda_gasp = 32
class sfx_navi_enemy(Choice):
"""Choose a sound effect. "random_choice" selects a random option. "random_ear_safe" selects a random safe option. "completely_random" selects any random sound."""
displayname = "Navi Enemy"
option_default = 0
option_completely_random = 1
option_random_ear_safe = 2
option_random_choice = 3
option_none = 4
option_bark = 5
option_business_scrub = 6
option_carrot_refill = 7
option_cluck = 8
option_cockadoodledoo = 9
option_dusk_howl = 10
option_exploding_crate = 11
option_explosion = 12
option_great_fairy = 13
option_guay = 14
option_low_health = 15
option_recover_health = 16
option_horse_neigh = 17
option_shattering_ice = 18
option_moo = 19
option_mweep = 20
option_navi_hello = 21
option_notification = 22
option_poe = 23
option_shattering_pot = 24
option_redead_scream = 25
option_ribbit = 26
option_ruto_giggle = 27
option_skulltula = 28
option_soft_beep = 29
option_tambourine = 30
option_timer = 31
option_adult_zelda_gasp = 32
class sfx_low_hp(Choice):
"""Choose a sound effect. "random_choice" selects a random option. "random_ear_safe" selects a random safe option. "completely_random" selects any random sound."""
displayname = "Low HP"
option_default = 0
option_completely_random = 1
option_random_ear_safe = 2
option_random_choice = 3
option_none = 4
option_bark = 5
option_bomb_bounce = 6
option_bongo_bongo_low = 7
option_bow_twang = 8
option_business_scrub = 9
option_carrot_refill = 10
option_cluck = 11
option_drawbridge_set = 12
option_guay = 13
option_recover_health = 14
option_horse_trot = 15
option_iron_boots = 16
option_moo = 17
option_mweep = 18
option_navi_hey = 19
option_navi_random = 20
option_notification = 21
option_shattering_pot = 22
option_ribbit = 23
option_silver_rupee = 24
option_soft_beep = 25
option_switch = 26
option_sword_bonk = 27
option_tambourine = 28
option_timer = 29
option_adult_zelda_gasp = 30
class sfx_menu_cursor(Choice):
"""Choose a sound effect. "random_choice" selects a random option. "random_ear_safe" selects a random safe option. "completely_random" selects any random sound."""
displayname = "Menu Cursor"
option_default = 0
option_completely_random = 1
option_random_ear_safe = 2
option_random_choice = 3
option_none = 4
option_bark = 5
option_bomb_bounce = 6
option_bongo_bongo_high = 7
option_bongo_bongo_low = 8
option_bottle_cork = 9
option_bow_twang = 10
option_bubble_laugh = 11
option_carrot_refill = 12
option_change_item = 13
option_child_pant = 14
option_cluck = 15
option_deku_baba = 16
option_drawbridge_set = 17
option_dusk_howl = 18
option_fanfare_light = 19
option_fanfare_medium = 20
option_field_shrub = 21
option_flare_dancer_startled = 22
option_ganondorf_teh = 23
option_gohma_larva_croak = 24
option_gold_skull_token = 25
option_goron_wake = 26
option_guay = 27
option_gunshot = 28
option_low_health = 29
option_recover_health = 30
option_hammer_bonk = 31
option_horse_trot = 32
option_iron_boots = 33
option_iron_knuckle = 34
option_moo = 35
option_mweep = 36
option_notification = 37
option_phantom_ganon_laugh = 38
option_plant_explode = 39
option_shattering_pot = 40
option_redead_moan = 41
option_ribbit = 42
option_rupee = 43
option_silver_rupee = 44
option_ruto_crash = 45
option_ruto_lift = 46
option_ruto_thrown = 47
option_scrub_emerge = 48
option_shabom_bounce = 49
option_shabom_pop = 50
option_shellblade = 51
option_skulltula = 52
option_soft_beep = 53
option_spit_nut = 54
option_switch = 55
option_sword_bonk = 56
option_talon_hmm = 57
option_talon_snore = 58
option_talon_wtf = 59
option_tambourine = 60
option_target_enemy = 61
option_target_neutral = 62
option_thunder = 63
option_timer = 64
option_adult_zelda_gasp = 65
class sfx_menu_select(Choice):
"""Choose a sound effect. "random_choice" selects a random option. "random_ear_safe" selects a random safe option. "completely_random" selects any random sound."""
displayname = "Menu Select"
option_default = 0
option_completely_random = 1
option_random_ear_safe = 2
option_random_choice = 3
option_none = 4
option_bark = 5
option_bomb_bounce = 6
option_bongo_bongo_high = 7
option_bongo_bongo_low = 8
option_bottle_cork = 9
option_bow_twang = 10
option_bubble_laugh = 11
option_carrot_refill = 12
option_change_item = 13
option_child_cringe = 14
option_child_pant = 15
option_child_scream = 16
option_cluck = 17
option_deku_baba = 18
option_drawbridge_set = 19
option_dusk_howl = 20
option_fanfare_light = 21
option_fanfare_medium = 22
option_field_shrub = 23
option_flare_dancer_startled = 24
option_ganondorf_teh = 25
option_gohma_larva_croak = 26
option_gold_skull_token = 27
option_goron_wake = 28
option_guay = 29
option_gunshot = 30
option_low_health = 31
option_recover_health = 32
option_hammer_bonk = 33
option_horse_trot = 34
option_iron_boots = 35
option_iron_knuckle = 36
option_moo = 37
option_mweep = 38
option_notification = 39
option_phantom_ganon_laugh = 40
option_plant_explode = 41
option_shattering_pot = 42
option_redead_moan = 43
option_ribbit = 44
option_rupee = 45
option_silver_rupee = 46
option_ruto_crash = 47
option_ruto_lift = 48
option_ruto_thrown = 49
option_scrub_emerge = 50
option_shabom_bounce = 51
option_shabom_pop = 52
option_shellblade = 53
option_skulltula = 54
option_soft_beep = 55
option_spit_nut = 56
option_switch = 57
option_sword_bonk = 58
option_talon_hmm = 59
option_talon_snore = 60
option_talon_wtf = 61
option_tambourine = 62
option_target_enemy = 63
option_target_neutral = 64
option_thunder = 65
option_timer = 66
option_adult_zelda_gasp = 67
class sfx_nightfall(Choice):
"""Choose a sound effect. "random_choice" selects a random option. "random_ear_safe" selects a random safe option. "completely_random" selects any random sound."""
displayname = "Nightfall"
option_default = 0
option_completely_random = 1
option_random_ear_safe = 2
option_random_choice = 3
option_none = 4
option_cockadoodledoo = 5
option_gold_skull_token = 6
option_great_fairy = 7
option_moo = 8
option_mweep = 9
option_redead_moan = 10
option_talon_snore = 11
option_thunder = 12
class sfx_horse_neigh(Choice):
"""Choose a sound effect. "random_choice" selects a random option. "random_ear_safe" selects a random safe option. "completely_random" selects any random sound."""
displayname = "Horse"
option_default = 0
option_completely_random = 1
option_random_ear_safe = 2
option_random_choice = 3
option_none = 4
option_armos = 5
option_child_scream = 6
option_great_fairy = 7
option_moo = 8
option_mweep = 9
option_redead_scream = 10
option_ruto_wiggle = 11
option_stalchild_attack = 12
class sfx_hover_boots(Choice):
"""Choose a sound effect. "random_choice" selects a random option. "random_ear_safe" selects a random safe option. "completely_random" selects any random sound."""
displayname = "Hover Boots"
option_default = 0
option_completely_random = 1
option_random_ear_safe = 2
option_random_choice = 3
option_none = 4
option_bark = 5
option_cartoon_fall = 6
option_flare_dancer_laugh = 7
option_mweep = 8
option_shabom_pop = 9
option_tambourine = 10

View File

@ -1,7 +1,6 @@
import typing
from Options import Option, DefaultOnToggle, Toggle, Choice, Range, OptionList
from .Colors import *
import worlds.oot.Sounds as sfx
from .ColorSFXOptions import *
class Logic(Choice):
@ -651,21 +650,6 @@ itempool_options: typing.Dict[str, type(Option)] = {
# Start of cosmetic options
def assemble_color_option(func, display_name: str, default_option: str, outer=False):
color_options = func()
if outer:
color_options.append("Match Inner")
format_color = lambda color: color.replace(' ', '_').lower()
color_to_id = {format_color(color): index for index, color in enumerate(color_options)}
class ColorOption(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code."""
displayname = display_name
default = color_options.index(default_option)
ColorOption.options.update(color_to_id)
ColorOption.name_lookup.update({id: color for (color, id) in color_to_id.items()})
return ColorOption
class Targeting(Choice):
"""Default targeting option."""
displayname = "Default Targeting Option"
@ -720,45 +704,35 @@ cosmetic_options: typing.Dict[str, type(Option)] = {
"background_music": BackgroundMusic,
"fanfares": Fanfares,
"ocarina_fanfares": OcarinaFanfares,
"kokiri_color": assemble_color_option(get_tunic_color_options, "Kokiri Tunic", "Kokiri Green"),
"goron_color": assemble_color_option(get_tunic_color_options, "Goron Tunic", "Goron Red"),
"zora_color": assemble_color_option(get_tunic_color_options, "Zora Tunic", "Zora Blue"),
"silver_gauntlets_color": assemble_color_option(get_gauntlet_color_options, "Silver Gauntlets Color", "Silver"),
"golden_gauntlets_color": assemble_color_option(get_gauntlet_color_options, "Golden Gauntlets Color", "Gold"),
"mirror_shield_frame_color": assemble_color_option(get_shield_frame_color_options, "Mirror Shield Frame Color", "Red"),
"navi_color_default_inner": assemble_color_option(get_navi_color_options, "Navi Idle Inner", "White"),
"navi_color_default_outer": assemble_color_option(get_navi_color_options, "Navi Idle Outer", "Match Inner", outer=True),
"navi_color_enemy_inner": assemble_color_option(get_navi_color_options, "Navi Targeting Enemy Inner", "Yellow"),
"navi_color_enemy_outer": assemble_color_option(get_navi_color_options, "Navi Targeting Enemy Outer", "Match Inner", outer=True),
"navi_color_npc_inner": assemble_color_option(get_navi_color_options, "Navi Targeting NPC Inner", "Light Blue"),
"navi_color_npc_outer": assemble_color_option(get_navi_color_options, "Navi Targeting NPC Outer", "Match Inner", outer=True),
"navi_color_prop_inner": assemble_color_option(get_navi_color_options, "Navi Targeting Prop Inner", "Green"),
"navi_color_prop_outer": assemble_color_option(get_navi_color_options, "Navi Targeting Prop Outer", "Match Inner", outer=True),
"kokiri_color": kokiri_color,
"goron_color": goron_color,
"zora_color": zora_color,
"silver_gauntlets_color": silver_gauntlets_color,
"golden_gauntlets_color": golden_gauntlets_color,
"mirror_shield_frame_color": mirror_shield_frame_color,
"navi_color_default_inner": navi_color_default_inner,
"navi_color_default_outer": navi_color_default_outer,
"navi_color_enemy_inner": navi_color_enemy_inner,
"navi_color_enemy_outer": navi_color_enemy_outer,
"navi_color_npc_inner": navi_color_npc_inner,
"navi_color_npc_outer": navi_color_npc_outer,
"navi_color_prop_inner": navi_color_prop_inner,
"navi_color_prop_outer": navi_color_prop_outer,
"sword_trail_duration": SwordTrailDuration,
"sword_trail_color_inner": assemble_color_option(get_sword_trail_color_options, "Sword Trail Inner", "White"),
"sword_trail_color_outer": assemble_color_option(get_sword_trail_color_options, "Sword Trail Outer", "Match Inner", outer=True),
"bombchu_trail_color_inner": assemble_color_option(get_bombchu_trail_color_options, "Bombchu Trail Inner", "Red"),
"bombchu_trail_color_outer": assemble_color_option(get_bombchu_trail_color_options, "Bombchu Trail Outer", "Match Inner", outer=True),
"boomerang_trail_color_inner": assemble_color_option(get_boomerang_trail_color_options, "Boomerang Trail Inner", "Yellow"),
"boomerang_trail_color_outer": assemble_color_option(get_boomerang_trail_color_options, "Boomerang Trail Outer", "Match Inner", outer=True),
"heart_color": assemble_color_option(get_heart_color_options, "Heart Color", "Red"),
"magic_color": assemble_color_option(get_magic_color_options, "Magic Color", "Green"),
"a_button_color": assemble_color_option(get_a_button_color_options, "A Button Color", "N64 Blue"),
"b_button_color": assemble_color_option(get_b_button_color_options, "B Button Color", "N64 Green"),
"c_button_color": assemble_color_option(get_c_button_color_options, "C Button Color", "Yellow"),
"start_button_color": assemble_color_option(get_start_button_color_options, "Start Button Color", "N64 Red"),
"sword_trail_color_inner": sword_trail_color_inner,
"sword_trail_color_outer": sword_trail_color_outer,
"bombchu_trail_color_inner": bombchu_trail_color_inner,
"bombchu_trail_color_outer": bombchu_trail_color_outer,
"boomerang_trail_color_inner": boomerang_trail_color_inner,
"boomerang_trail_color_outer": boomerang_trail_color_outer,
"heart_color": heart_color,
"magic_color": magic_color,
"a_button_color": a_button_color,
"b_button_color": b_button_color,
"c_button_color": c_button_color,
"start_button_color": start_button_color,
}
def assemble_sfx_option(sound_hook: sfx.SoundHooks, display_name: str):
options = sfx.get_setting_choices(sound_hook).keys()
sfx_to_id = {sfx.replace('-', '_'): index for index, sfx in enumerate(options)}
class SfxOption(Choice):
"""Choose a sound effect. "random_choice" selects a random option. "random_ear_safe" selects a random safe option. "completely_random" selects any random sound."""
displayname = display_name
SfxOption.options.update(sfx_to_id)
SfxOption.name_lookup.update({id: sfx for (sfx, id) in sfx_to_id.items()})
return SfxOption
class SfxOcarina(Choice):
"""Change the sound of the ocarina."""
displayname = "Ocarina Instrument"
@ -771,14 +745,14 @@ class SfxOcarina(Choice):
default = 1
sfx_options: typing.Dict[str, type(Option)] = {
"sfx_navi_overworld": assemble_sfx_option(sfx.SoundHooks.NAVI_OVERWORLD, "Navi Overworld"),
"sfx_navi_enemy": assemble_sfx_option(sfx.SoundHooks.NAVI_ENEMY, "Navi Enemy"),
"sfx_low_hp": assemble_sfx_option(sfx.SoundHooks.HP_LOW, "Low HP"),
"sfx_menu_cursor": assemble_sfx_option(sfx.SoundHooks.MENU_CURSOR, "Menu Cursor"),
"sfx_menu_select": assemble_sfx_option(sfx.SoundHooks.MENU_SELECT, "Menu Select"),
"sfx_nightfall": assemble_sfx_option(sfx.SoundHooks.NIGHTFALL, "Nightfall"),
"sfx_horse_neigh": assemble_sfx_option(sfx.SoundHooks.HORSE_NEIGH, "Horse"),
"sfx_hover_boots": assemble_sfx_option(sfx.SoundHooks.BOOTS_HOVER, "Hover Boots"),
"sfx_navi_overworld": sfx_navi_overworld,
"sfx_navi_enemy": sfx_navi_enemy,
"sfx_low_hp": sfx_low_hp,
"sfx_menu_cursor": sfx_menu_cursor,
"sfx_menu_select": sfx_menu_select,
"sfx_nightfall": sfx_nightfall,
"sfx_horse_neigh": sfx_horse_neigh,
"sfx_hover_boots": sfx_hover_boots,
"sfx_ocarina": SfxOcarina,
}

View File

@ -0,0 +1,81 @@
# Quick script to build top-level color and sfx options for pickling
from Colors import *
import Sounds as sfx
def assemble_color_option(f, internal_name: str, func, display_name: str, default_option: str, outer=False):
color_options = func()
if outer:
color_options.append("Match Inner")
format_color = lambda color: color.replace(' ', '_').lower()
color_to_id = {format_color(color): index for index, color in enumerate(color_options)}
docstring = 'Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code.'
if outer:
docstring += ' "match_inner" copies the inner color for this option.'
f.write(f"class {internal_name}(Choice):\n")
f.write(f" \"\"\"{docstring}\"\"\"\n")
f.write(f" displayname = \"{display_name}\"\n")
for color, id in color_to_id.items():
f.write(f" option_{color} = {id}\n")
f.write(f" default = {color_options.index(default_option)}")
f.write(f"\n\n\n")
def assemble_sfx_option(f, internal_name: str, sound_hook: sfx.SoundHooks, display_name: str):
options = sfx.get_setting_choices(sound_hook).keys()
sfx_to_id = {sound.replace('-', '_'): index for index, sound in enumerate(options)}
docstring = 'Choose a sound effect. "random_choice" selects a random option. "random_ear_safe" selects a random safe option. "completely_random" selects any random sound.'
f.write(f"class {internal_name}(Choice):\n")
f.write(f" \"\"\"{docstring}\"\"\"\n")
f.write(f" displayname = \"{display_name}\"\n")
for sound, id in sfx_to_id.items():
f.write(f" option_{sound} = {id}\n")
f.write(f"\n\n\n")
with open('ColorSFXOptions.py', 'w') as f:
f.write("# Auto-generated color and sound-effect options from Colors.py and Sounds.py \n")
f.write("from Options import Choice\n\n\n")
assemble_color_option(f, "kokiri_color", get_tunic_color_options, "Kokiri Tunic", "Kokiri Green")
assemble_color_option(f, "goron_color", get_tunic_color_options, "Goron Tunic", "Goron Red")
assemble_color_option(f, "zora_color", get_tunic_color_options, "Zora Tunic", "Zora Blue")
assemble_color_option(f, "silver_gauntlets_color", get_gauntlet_color_options, "Silver Gauntlets Color", "Silver")
assemble_color_option(f, "golden_gauntlets_color", get_gauntlet_color_options, "Golden Gauntlets Color", "Gold")
assemble_color_option(f, "mirror_shield_frame_color", get_shield_frame_color_options, "Mirror Shield Frame Color", "Red")
assemble_color_option(f, "navi_color_default_inner", get_navi_color_options, "Navi Idle Inner", "White")
assemble_color_option(f, "navi_color_default_outer", get_navi_color_options, "Navi Idle Outer", "Match Inner", outer=True)
assemble_color_option(f, "navi_color_enemy_inner", get_navi_color_options, "Navi Targeting Enemy Inner", "Yellow")
assemble_color_option(f, "navi_color_enemy_outer", get_navi_color_options, "Navi Targeting Enemy Outer", "Match Inner", outer=True)
assemble_color_option(f, "navi_color_npc_inner", get_navi_color_options, "Navi Targeting NPC Inner", "Light Blue")
assemble_color_option(f, "navi_color_npc_outer", get_navi_color_options, "Navi Targeting NPC Outer", "Match Inner", outer=True)
assemble_color_option(f, "navi_color_prop_inner", get_navi_color_options, "Navi Targeting Prop Inner", "Green")
assemble_color_option(f, "navi_color_prop_outer", get_navi_color_options, "Navi Targeting Prop Outer", "Match Inner", outer=True)
assemble_color_option(f, "sword_trail_color_inner", get_sword_trail_color_options, "Sword Trail Inner", "White")
assemble_color_option(f, "sword_trail_color_outer", get_sword_trail_color_options, "Sword Trail Outer", "Match Inner", outer=True)
assemble_color_option(f, "bombchu_trail_color_inner", get_bombchu_trail_color_options, "Bombchu Trail Inner", "Red")
assemble_color_option(f, "bombchu_trail_color_outer", get_bombchu_trail_color_options, "Bombchu Trail Outer", "Match Inner", outer=True)
assemble_color_option(f, "boomerang_trail_color_inner", get_boomerang_trail_color_options, "Boomerang Trail Inner", "Yellow")
assemble_color_option(f, "boomerang_trail_color_outer", get_boomerang_trail_color_options, "Boomerang Trail Outer", "Match Inner", outer=True)
assemble_color_option(f, "heart_color", get_heart_color_options, "Heart Color", "Red")
assemble_color_option(f, "magic_color", get_magic_color_options, "Magic Color", "Green")
assemble_color_option(f, "a_button_color", get_a_button_color_options, "A Button Color", "N64 Blue")
assemble_color_option(f, "b_button_color", get_b_button_color_options, "B Button Color", "N64 Green")
assemble_color_option(f, "c_button_color", get_c_button_color_options, "C Button Color", "Yellow")
assemble_color_option(f, "start_button_color", get_start_button_color_options, "Start Button Color", "N64 Red")
assemble_sfx_option(f, "sfx_navi_overworld", sfx.SoundHooks.NAVI_OVERWORLD, "Navi Overworld")
assemble_sfx_option(f, "sfx_navi_enemy", sfx.SoundHooks.NAVI_ENEMY, "Navi Enemy")
assemble_sfx_option(f, "sfx_low_hp", sfx.SoundHooks.HP_LOW, "Low HP")
assemble_sfx_option(f, "sfx_menu_cursor", sfx.SoundHooks.MENU_CURSOR, "Menu Cursor")
assemble_sfx_option(f, "sfx_menu_select", sfx.SoundHooks.MENU_SELECT, "Menu Select")
assemble_sfx_option(f, "sfx_nightfall", sfx.SoundHooks.NIGHTFALL, "Nightfall")
assemble_sfx_option(f, "sfx_horse_neigh", sfx.SoundHooks.HORSE_NEIGH, "Horse")
assemble_sfx_option(f, "sfx_hover_boots", sfx.SoundHooks.BOOTS_HOVER, "Hover Boots")
print('all done')