Archipelago/worlds/musedash/MuseDashCollection.py

129 lines
4.4 KiB
Python
Raw Permalink Normal View History

from .Items import SongData
from .MuseDashData import SONG_DATA
from typing import Dict, List, Set
from collections import ChainMap
Muse Dash: Add New Game (#1723) * Alpha 1 Muse dash stuff. * Add in an option to limit to only base game songs. * Make all items progression instead of progression_skip_balancing. * Add in extra_goal_song_items to help make runs less about completing every song. * Change ID range to be in a more open area, and add some comments. * Add in Streamer Mode and difficulty range options. Rearrange data files so its easier to get all data at once. * Fix generation issues. * Fix up the maximum and remove old option. * Remove empty items and the option to make filler songs empty. * Support emerald hunt mode. Make difficulties an option rather than 2 sliders. * Fix DLC Song option being inverted. * Fix item counting being broken if there was more than 1 world. * Make compatible with .apworld specification. * Make All item names ASCII compatible. * Add in the additional_item_percentage option. * Add a test to ensure the item names are within the normal ascii range. * Add in death link. * Remove the album from the item name. Not really needed anymore. * Add the 2 budget is burning albums under the free songs heading. Adds a couple more songs without dlc. * Sanitise Album names. * Added the grade needed choice. * Update songs to v3.1.0 * Adjust difficulty ranges. Add Expert and Master. * Fix setup_en.md being out of date. * Add a manual override. * Add testing for diff ranges. Fix bugs introduced there. Limit option to 11 to not generate an impossible seed. * Remove regions from Muse Dash. * Some Oops... * Attempt to make tests happy. * Remove supports weighting false to stop webhost test failing. * Adjusted settings * Adjust music sheets to use percentages. Various cleanups. * Fixes to new code. * Add Ola Dash Album. Add support for overriding song difficulty. Other stylisation changes. * Attempt fix tests. * Ooops missed one. * flake8 suggestions. * Remove FM 17314 SUGAR RADIO as that song is a bit weird. * Update document pages. * Add trap support * Lower additional song count by 10. * Tests broke on my end. Using github to test this. * Looks like I was accidentally adding ~. * Fix the one song that crashes OoT hint generation * Various documentation changes. * Website documents fixup. * Doc updates part 2. * Oops. Doc updates part 3. * Add Muse Dash to the apworld list. * Add trailing comma. * Add a couple plando options. * Set data_version to 1. * Add in some handling incase someone decides a song is both starter and included. * Remove brackets around ifs. * Oops. Accidentally removed a necessary bracket. * Fix filtering crash due to me mixing up c# and python .remove(). * Add Happy Otaku Pack Vol.17. Also increment data version. * Update links to melon loader to be the latest. * Clean up song selection code by shuffling once then popping. * Add UID to the Data text file, so the same file can be used client and server. * Increment Data Version because some names have changed. * Correct some names. * Update data to v3.4.0 (Addition of Muse Radio FM104) * Add support for SFX traps. Adjusted how traps were setup a bit. * Update the docs to include a troubleshooting section. * Small fixes. * Remove unnecessary brackets. * Add .net downloads to docs. * Avoid failing generation if strict difficulty settings are applied with no dlc songs and streamer mode. * Forgot to add the worst starting song count. * Make minimum song count be Starting Songs + 11 instead of Starting Songs * 2 + 1. * Fix up several issues where song count could mismatch the requested amount. * Add a test to ensure world size doesn't grow. * Fix some oversights. * Remove unnecessary brackets. * Fix up passing the tuple out when just the key would suffice. * Adjust typing based on Phar's suggestions. * Apply the rest of Phar's suggestions with minor tweaks to other parts to suit suggestions. * Adjust some more stuff to fit 120 characters. * Some more pep8 stuff and fix tests. * Some pep8 in tests.
2023-06-29 12:36:39 +00:00
class MuseDashCollections:
"""Contains all the data of Muse Dash, loaded from MuseDashData.txt."""
STARTING_CODE = 2900000
Muse Dash: Add New Game (#1723) * Alpha 1 Muse dash stuff. * Add in an option to limit to only base game songs. * Make all items progression instead of progression_skip_balancing. * Add in extra_goal_song_items to help make runs less about completing every song. * Change ID range to be in a more open area, and add some comments. * Add in Streamer Mode and difficulty range options. Rearrange data files so its easier to get all data at once. * Fix generation issues. * Fix up the maximum and remove old option. * Remove empty items and the option to make filler songs empty. * Support emerald hunt mode. Make difficulties an option rather than 2 sliders. * Fix DLC Song option being inverted. * Fix item counting being broken if there was more than 1 world. * Make compatible with .apworld specification. * Make All item names ASCII compatible. * Add in the additional_item_percentage option. * Add a test to ensure the item names are within the normal ascii range. * Add in death link. * Remove the album from the item name. Not really needed anymore. * Add the 2 budget is burning albums under the free songs heading. Adds a couple more songs without dlc. * Sanitise Album names. * Added the grade needed choice. * Update songs to v3.1.0 * Adjust difficulty ranges. Add Expert and Master. * Fix setup_en.md being out of date. * Add a manual override. * Add testing for diff ranges. Fix bugs introduced there. Limit option to 11 to not generate an impossible seed. * Remove regions from Muse Dash. * Some Oops... * Attempt to make tests happy. * Remove supports weighting false to stop webhost test failing. * Adjusted settings * Adjust music sheets to use percentages. Various cleanups. * Fixes to new code. * Add Ola Dash Album. Add support for overriding song difficulty. Other stylisation changes. * Attempt fix tests. * Ooops missed one. * flake8 suggestions. * Remove FM 17314 SUGAR RADIO as that song is a bit weird. * Update document pages. * Add trap support * Lower additional song count by 10. * Tests broke on my end. Using github to test this. * Looks like I was accidentally adding ~. * Fix the one song that crashes OoT hint generation * Various documentation changes. * Website documents fixup. * Doc updates part 2. * Oops. Doc updates part 3. * Add Muse Dash to the apworld list. * Add trailing comma. * Add a couple plando options. * Set data_version to 1. * Add in some handling incase someone decides a song is both starter and included. * Remove brackets around ifs. * Oops. Accidentally removed a necessary bracket. * Fix filtering crash due to me mixing up c# and python .remove(). * Add Happy Otaku Pack Vol.17. Also increment data version. * Update links to melon loader to be the latest. * Clean up song selection code by shuffling once then popping. * Add UID to the Data text file, so the same file can be used client and server. * Increment Data Version because some names have changed. * Correct some names. * Update data to v3.4.0 (Addition of Muse Radio FM104) * Add support for SFX traps. Adjusted how traps were setup a bit. * Update the docs to include a troubleshooting section. * Small fixes. * Remove unnecessary brackets. * Add .net downloads to docs. * Avoid failing generation if strict difficulty settings are applied with no dlc songs and streamer mode. * Forgot to add the worst starting song count. * Make minimum song count be Starting Songs + 11 instead of Starting Songs * 2 + 1. * Fix up several issues where song count could mismatch the requested amount. * Add a test to ensure world size doesn't grow. * Fix some oversights. * Remove unnecessary brackets. * Fix up passing the tuple out when just the key would suffice. * Adjust typing based on Phar's suggestions. * Apply the rest of Phar's suggestions with minor tweaks to other parts to suit suggestions. * Adjust some more stuff to fit 120 characters. * Some more pep8 stuff and fix tests. * Some pep8 in tests.
2023-06-29 12:36:39 +00:00
MUSIC_SHEET_NAME: str = "Music Sheet"
MUSIC_SHEET_CODE: int = STARTING_CODE
Muse Dash: Add New Game (#1723) * Alpha 1 Muse dash stuff. * Add in an option to limit to only base game songs. * Make all items progression instead of progression_skip_balancing. * Add in extra_goal_song_items to help make runs less about completing every song. * Change ID range to be in a more open area, and add some comments. * Add in Streamer Mode and difficulty range options. Rearrange data files so its easier to get all data at once. * Fix generation issues. * Fix up the maximum and remove old option. * Remove empty items and the option to make filler songs empty. * Support emerald hunt mode. Make difficulties an option rather than 2 sliders. * Fix DLC Song option being inverted. * Fix item counting being broken if there was more than 1 world. * Make compatible with .apworld specification. * Make All item names ASCII compatible. * Add in the additional_item_percentage option. * Add a test to ensure the item names are within the normal ascii range. * Add in death link. * Remove the album from the item name. Not really needed anymore. * Add the 2 budget is burning albums under the free songs heading. Adds a couple more songs without dlc. * Sanitise Album names. * Added the grade needed choice. * Update songs to v3.1.0 * Adjust difficulty ranges. Add Expert and Master. * Fix setup_en.md being out of date. * Add a manual override. * Add testing for diff ranges. Fix bugs introduced there. Limit option to 11 to not generate an impossible seed. * Remove regions from Muse Dash. * Some Oops... * Attempt to make tests happy. * Remove supports weighting false to stop webhost test failing. * Adjusted settings * Adjust music sheets to use percentages. Various cleanups. * Fixes to new code. * Add Ola Dash Album. Add support for overriding song difficulty. Other stylisation changes. * Attempt fix tests. * Ooops missed one. * flake8 suggestions. * Remove FM 17314 SUGAR RADIO as that song is a bit weird. * Update document pages. * Add trap support * Lower additional song count by 10. * Tests broke on my end. Using github to test this. * Looks like I was accidentally adding ~. * Fix the one song that crashes OoT hint generation * Various documentation changes. * Website documents fixup. * Doc updates part 2. * Oops. Doc updates part 3. * Add Muse Dash to the apworld list. * Add trailing comma. * Add a couple plando options. * Set data_version to 1. * Add in some handling incase someone decides a song is both starter and included. * Remove brackets around ifs. * Oops. Accidentally removed a necessary bracket. * Fix filtering crash due to me mixing up c# and python .remove(). * Add Happy Otaku Pack Vol.17. Also increment data version. * Update links to melon loader to be the latest. * Clean up song selection code by shuffling once then popping. * Add UID to the Data text file, so the same file can be used client and server. * Increment Data Version because some names have changed. * Correct some names. * Update data to v3.4.0 (Addition of Muse Radio FM104) * Add support for SFX traps. Adjusted how traps were setup a bit. * Update the docs to include a troubleshooting section. * Small fixes. * Remove unnecessary brackets. * Add .net downloads to docs. * Avoid failing generation if strict difficulty settings are applied with no dlc songs and streamer mode. * Forgot to add the worst starting song count. * Make minimum song count be Starting Songs + 11 instead of Starting Songs * 2 + 1. * Fix up several issues where song count could mismatch the requested amount. * Add a test to ensure world size doesn't grow. * Fix some oversights. * Remove unnecessary brackets. * Fix up passing the tuple out when just the key would suffice. * Adjust typing based on Phar's suggestions. * Apply the rest of Phar's suggestions with minor tweaks to other parts to suit suggestions. * Adjust some more stuff to fit 120 characters. * Some more pep8 stuff and fix tests. * Some pep8 in tests.
2023-06-29 12:36:39 +00:00
FREE_ALBUMS: List[str] = [
Muse Dash: Add New Game (#1723) * Alpha 1 Muse dash stuff. * Add in an option to limit to only base game songs. * Make all items progression instead of progression_skip_balancing. * Add in extra_goal_song_items to help make runs less about completing every song. * Change ID range to be in a more open area, and add some comments. * Add in Streamer Mode and difficulty range options. Rearrange data files so its easier to get all data at once. * Fix generation issues. * Fix up the maximum and remove old option. * Remove empty items and the option to make filler songs empty. * Support emerald hunt mode. Make difficulties an option rather than 2 sliders. * Fix DLC Song option being inverted. * Fix item counting being broken if there was more than 1 world. * Make compatible with .apworld specification. * Make All item names ASCII compatible. * Add in the additional_item_percentage option. * Add a test to ensure the item names are within the normal ascii range. * Add in death link. * Remove the album from the item name. Not really needed anymore. * Add the 2 budget is burning albums under the free songs heading. Adds a couple more songs without dlc. * Sanitise Album names. * Added the grade needed choice. * Update songs to v3.1.0 * Adjust difficulty ranges. Add Expert and Master. * Fix setup_en.md being out of date. * Add a manual override. * Add testing for diff ranges. Fix bugs introduced there. Limit option to 11 to not generate an impossible seed. * Remove regions from Muse Dash. * Some Oops... * Attempt to make tests happy. * Remove supports weighting false to stop webhost test failing. * Adjusted settings * Adjust music sheets to use percentages. Various cleanups. * Fixes to new code. * Add Ola Dash Album. Add support for overriding song difficulty. Other stylisation changes. * Attempt fix tests. * Ooops missed one. * flake8 suggestions. * Remove FM 17314 SUGAR RADIO as that song is a bit weird. * Update document pages. * Add trap support * Lower additional song count by 10. * Tests broke on my end. Using github to test this. * Looks like I was accidentally adding ~. * Fix the one song that crashes OoT hint generation * Various documentation changes. * Website documents fixup. * Doc updates part 2. * Oops. Doc updates part 3. * Add Muse Dash to the apworld list. * Add trailing comma. * Add a couple plando options. * Set data_version to 1. * Add in some handling incase someone decides a song is both starter and included. * Remove brackets around ifs. * Oops. Accidentally removed a necessary bracket. * Fix filtering crash due to me mixing up c# and python .remove(). * Add Happy Otaku Pack Vol.17. Also increment data version. * Update links to melon loader to be the latest. * Clean up song selection code by shuffling once then popping. * Add UID to the Data text file, so the same file can be used client and server. * Increment Data Version because some names have changed. * Correct some names. * Update data to v3.4.0 (Addition of Muse Radio FM104) * Add support for SFX traps. Adjusted how traps were setup a bit. * Update the docs to include a troubleshooting section. * Small fixes. * Remove unnecessary brackets. * Add .net downloads to docs. * Avoid failing generation if strict difficulty settings are applied with no dlc songs and streamer mode. * Forgot to add the worst starting song count. * Make minimum song count be Starting Songs + 11 instead of Starting Songs * 2 + 1. * Fix up several issues where song count could mismatch the requested amount. * Add a test to ensure world size doesn't grow. * Fix some oversights. * Remove unnecessary brackets. * Fix up passing the tuple out when just the key would suffice. * Adjust typing based on Phar's suggestions. * Apply the rest of Phar's suggestions with minor tweaks to other parts to suit suggestions. * Adjust some more stuff to fit 120 characters. * Some more pep8 stuff and fix tests. * Some pep8 in tests.
2023-06-29 12:36:39 +00:00
"Default Music",
"Budget Is Burning: Nano Core",
"Budget Is Burning Vol.1",
Muse Dash: Add New Game (#1723) * Alpha 1 Muse dash stuff. * Add in an option to limit to only base game songs. * Make all items progression instead of progression_skip_balancing. * Add in extra_goal_song_items to help make runs less about completing every song. * Change ID range to be in a more open area, and add some comments. * Add in Streamer Mode and difficulty range options. Rearrange data files so its easier to get all data at once. * Fix generation issues. * Fix up the maximum and remove old option. * Remove empty items and the option to make filler songs empty. * Support emerald hunt mode. Make difficulties an option rather than 2 sliders. * Fix DLC Song option being inverted. * Fix item counting being broken if there was more than 1 world. * Make compatible with .apworld specification. * Make All item names ASCII compatible. * Add in the additional_item_percentage option. * Add a test to ensure the item names are within the normal ascii range. * Add in death link. * Remove the album from the item name. Not really needed anymore. * Add the 2 budget is burning albums under the free songs heading. Adds a couple more songs without dlc. * Sanitise Album names. * Added the grade needed choice. * Update songs to v3.1.0 * Adjust difficulty ranges. Add Expert and Master. * Fix setup_en.md being out of date. * Add a manual override. * Add testing for diff ranges. Fix bugs introduced there. Limit option to 11 to not generate an impossible seed. * Remove regions from Muse Dash. * Some Oops... * Attempt to make tests happy. * Remove supports weighting false to stop webhost test failing. * Adjusted settings * Adjust music sheets to use percentages. Various cleanups. * Fixes to new code. * Add Ola Dash Album. Add support for overriding song difficulty. Other stylisation changes. * Attempt fix tests. * Ooops missed one. * flake8 suggestions. * Remove FM 17314 SUGAR RADIO as that song is a bit weird. * Update document pages. * Add trap support * Lower additional song count by 10. * Tests broke on my end. Using github to test this. * Looks like I was accidentally adding ~. * Fix the one song that crashes OoT hint generation * Various documentation changes. * Website documents fixup. * Doc updates part 2. * Oops. Doc updates part 3. * Add Muse Dash to the apworld list. * Add trailing comma. * Add a couple plando options. * Set data_version to 1. * Add in some handling incase someone decides a song is both starter and included. * Remove brackets around ifs. * Oops. Accidentally removed a necessary bracket. * Fix filtering crash due to me mixing up c# and python .remove(). * Add Happy Otaku Pack Vol.17. Also increment data version. * Update links to melon loader to be the latest. * Clean up song selection code by shuffling once then popping. * Add UID to the Data text file, so the same file can be used client and server. * Increment Data Version because some names have changed. * Correct some names. * Update data to v3.4.0 (Addition of Muse Radio FM104) * Add support for SFX traps. Adjusted how traps were setup a bit. * Update the docs to include a troubleshooting section. * Small fixes. * Remove unnecessary brackets. * Add .net downloads to docs. * Avoid failing generation if strict difficulty settings are applied with no dlc songs and streamer mode. * Forgot to add the worst starting song count. * Make minimum song count be Starting Songs + 11 instead of Starting Songs * 2 + 1. * Fix up several issues where song count could mismatch the requested amount. * Add a test to ensure world size doesn't grow. * Fix some oversights. * Remove unnecessary brackets. * Fix up passing the tuple out when just the key would suffice. * Adjust typing based on Phar's suggestions. * Apply the rest of Phar's suggestions with minor tweaks to other parts to suit suggestions. * Adjust some more stuff to fit 120 characters. * Some more pep8 stuff and fix tests. * Some pep8 in tests.
2023-06-29 12:36:39 +00:00
]
MUSE_PLUS_DLC: str = "Muse Plus"
# Ordering matters for webhost. Order goes: Muse Plus, Time Limited Muse Plus Dlcs, Paid Dlcs
DLC: List[str] = [
MUSE_PLUS_DLC,
"CHUNITHM COURSE MUSE", # Part of Muse Plus. Goes away 22nd May 2027.
"maimai DX Limited-time Suite", # Part of Muse Plus. Goes away 31st Jan 2026.
"MSR Anthology", # Now no longer available.
"Miku in Museland", # Paid DLC not included in Muse Plus
"Rin Len's Mirrorland", # Paid DLC not included in Muse Plus
]
REMOVED_SONGS = [
"CHAOS Glitch",
"FM 17314 SUGAR RADIO",
"Yume Ou Mono Yo Secret",
"Echo over you... Secret",
"Tsukuyomi Ni Naru Replaced",
]
Muse Dash: Add New Game (#1723) * Alpha 1 Muse dash stuff. * Add in an option to limit to only base game songs. * Make all items progression instead of progression_skip_balancing. * Add in extra_goal_song_items to help make runs less about completing every song. * Change ID range to be in a more open area, and add some comments. * Add in Streamer Mode and difficulty range options. Rearrange data files so its easier to get all data at once. * Fix generation issues. * Fix up the maximum and remove old option. * Remove empty items and the option to make filler songs empty. * Support emerald hunt mode. Make difficulties an option rather than 2 sliders. * Fix DLC Song option being inverted. * Fix item counting being broken if there was more than 1 world. * Make compatible with .apworld specification. * Make All item names ASCII compatible. * Add in the additional_item_percentage option. * Add a test to ensure the item names are within the normal ascii range. * Add in death link. * Remove the album from the item name. Not really needed anymore. * Add the 2 budget is burning albums under the free songs heading. Adds a couple more songs without dlc. * Sanitise Album names. * Added the grade needed choice. * Update songs to v3.1.0 * Adjust difficulty ranges. Add Expert and Master. * Fix setup_en.md being out of date. * Add a manual override. * Add testing for diff ranges. Fix bugs introduced there. Limit option to 11 to not generate an impossible seed. * Remove regions from Muse Dash. * Some Oops... * Attempt to make tests happy. * Remove supports weighting false to stop webhost test failing. * Adjusted settings * Adjust music sheets to use percentages. Various cleanups. * Fixes to new code. * Add Ola Dash Album. Add support for overriding song difficulty. Other stylisation changes. * Attempt fix tests. * Ooops missed one. * flake8 suggestions. * Remove FM 17314 SUGAR RADIO as that song is a bit weird. * Update document pages. * Add trap support * Lower additional song count by 10. * Tests broke on my end. Using github to test this. * Looks like I was accidentally adding ~. * Fix the one song that crashes OoT hint generation * Various documentation changes. * Website documents fixup. * Doc updates part 2. * Oops. Doc updates part 3. * Add Muse Dash to the apworld list. * Add trailing comma. * Add a couple plando options. * Set data_version to 1. * Add in some handling incase someone decides a song is both starter and included. * Remove brackets around ifs. * Oops. Accidentally removed a necessary bracket. * Fix filtering crash due to me mixing up c# and python .remove(). * Add Happy Otaku Pack Vol.17. Also increment data version. * Update links to melon loader to be the latest. * Clean up song selection code by shuffling once then popping. * Add UID to the Data text file, so the same file can be used client and server. * Increment Data Version because some names have changed. * Correct some names. * Update data to v3.4.0 (Addition of Muse Radio FM104) * Add support for SFX traps. Adjusted how traps were setup a bit. * Update the docs to include a troubleshooting section. * Small fixes. * Remove unnecessary brackets. * Add .net downloads to docs. * Avoid failing generation if strict difficulty settings are applied with no dlc songs and streamer mode. * Forgot to add the worst starting song count. * Make minimum song count be Starting Songs + 11 instead of Starting Songs * 2 + 1. * Fix up several issues where song count could mismatch the requested amount. * Add a test to ensure world size doesn't grow. * Fix some oversights. * Remove unnecessary brackets. * Fix up passing the tuple out when just the key would suffice. * Adjust typing based on Phar's suggestions. * Apply the rest of Phar's suggestions with minor tweaks to other parts to suit suggestions. * Adjust some more stuff to fit 120 characters. * Some more pep8 stuff and fix tests. * Some pep8 in tests.
2023-06-29 12:36:39 +00:00
song_items = SONG_DATA
Muse Dash: Add New Game (#1723) * Alpha 1 Muse dash stuff. * Add in an option to limit to only base game songs. * Make all items progression instead of progression_skip_balancing. * Add in extra_goal_song_items to help make runs less about completing every song. * Change ID range to be in a more open area, and add some comments. * Add in Streamer Mode and difficulty range options. Rearrange data files so its easier to get all data at once. * Fix generation issues. * Fix up the maximum and remove old option. * Remove empty items and the option to make filler songs empty. * Support emerald hunt mode. Make difficulties an option rather than 2 sliders. * Fix DLC Song option being inverted. * Fix item counting being broken if there was more than 1 world. * Make compatible with .apworld specification. * Make All item names ASCII compatible. * Add in the additional_item_percentage option. * Add a test to ensure the item names are within the normal ascii range. * Add in death link. * Remove the album from the item name. Not really needed anymore. * Add the 2 budget is burning albums under the free songs heading. Adds a couple more songs without dlc. * Sanitise Album names. * Added the grade needed choice. * Update songs to v3.1.0 * Adjust difficulty ranges. Add Expert and Master. * Fix setup_en.md being out of date. * Add a manual override. * Add testing for diff ranges. Fix bugs introduced there. Limit option to 11 to not generate an impossible seed. * Remove regions from Muse Dash. * Some Oops... * Attempt to make tests happy. * Remove supports weighting false to stop webhost test failing. * Adjusted settings * Adjust music sheets to use percentages. Various cleanups. * Fixes to new code. * Add Ola Dash Album. Add support for overriding song difficulty. Other stylisation changes. * Attempt fix tests. * Ooops missed one. * flake8 suggestions. * Remove FM 17314 SUGAR RADIO as that song is a bit weird. * Update document pages. * Add trap support * Lower additional song count by 10. * Tests broke on my end. Using github to test this. * Looks like I was accidentally adding ~. * Fix the one song that crashes OoT hint generation * Various documentation changes. * Website documents fixup. * Doc updates part 2. * Oops. Doc updates part 3. * Add Muse Dash to the apworld list. * Add trailing comma. * Add a couple plando options. * Set data_version to 1. * Add in some handling incase someone decides a song is both starter and included. * Remove brackets around ifs. * Oops. Accidentally removed a necessary bracket. * Fix filtering crash due to me mixing up c# and python .remove(). * Add Happy Otaku Pack Vol.17. Also increment data version. * Update links to melon loader to be the latest. * Clean up song selection code by shuffling once then popping. * Add UID to the Data text file, so the same file can be used client and server. * Increment Data Version because some names have changed. * Correct some names. * Update data to v3.4.0 (Addition of Muse Radio FM104) * Add support for SFX traps. Adjusted how traps were setup a bit. * Update the docs to include a troubleshooting section. * Small fixes. * Remove unnecessary brackets. * Add .net downloads to docs. * Avoid failing generation if strict difficulty settings are applied with no dlc songs and streamer mode. * Forgot to add the worst starting song count. * Make minimum song count be Starting Songs + 11 instead of Starting Songs * 2 + 1. * Fix up several issues where song count could mismatch the requested amount. * Add a test to ensure world size doesn't grow. * Fix some oversights. * Remove unnecessary brackets. * Fix up passing the tuple out when just the key would suffice. * Adjust typing based on Phar's suggestions. * Apply the rest of Phar's suggestions with minor tweaks to other parts to suit suggestions. * Adjust some more stuff to fit 120 characters. * Some more pep8 stuff and fix tests. * Some pep8 in tests.
2023-06-29 12:36:39 +00:00
song_locations: Dict[str, int] = {}
trap_items: Dict[str, int] = {
"Bad Apple Trap": STARTING_CODE + 1,
"Pixelate Trap": STARTING_CODE + 2,
"Ripple Trap": STARTING_CODE + 3,
"Vignette Trap": STARTING_CODE + 4,
"Chromatic Aberration Trap": STARTING_CODE + 5,
"Background Freeze Trap": STARTING_CODE + 6,
"Gray Scale Trap": STARTING_CODE + 7,
"Nyaa SFX Trap": STARTING_CODE + 8,
"Error SFX Trap": STARTING_CODE + 9,
"Focus Line Trap": STARTING_CODE + 10,
Muse Dash: Add New Game (#1723) * Alpha 1 Muse dash stuff. * Add in an option to limit to only base game songs. * Make all items progression instead of progression_skip_balancing. * Add in extra_goal_song_items to help make runs less about completing every song. * Change ID range to be in a more open area, and add some comments. * Add in Streamer Mode and difficulty range options. Rearrange data files so its easier to get all data at once. * Fix generation issues. * Fix up the maximum and remove old option. * Remove empty items and the option to make filler songs empty. * Support emerald hunt mode. Make difficulties an option rather than 2 sliders. * Fix DLC Song option being inverted. * Fix item counting being broken if there was more than 1 world. * Make compatible with .apworld specification. * Make All item names ASCII compatible. * Add in the additional_item_percentage option. * Add a test to ensure the item names are within the normal ascii range. * Add in death link. * Remove the album from the item name. Not really needed anymore. * Add the 2 budget is burning albums under the free songs heading. Adds a couple more songs without dlc. * Sanitise Album names. * Added the grade needed choice. * Update songs to v3.1.0 * Adjust difficulty ranges. Add Expert and Master. * Fix setup_en.md being out of date. * Add a manual override. * Add testing for diff ranges. Fix bugs introduced there. Limit option to 11 to not generate an impossible seed. * Remove regions from Muse Dash. * Some Oops... * Attempt to make tests happy. * Remove supports weighting false to stop webhost test failing. * Adjusted settings * Adjust music sheets to use percentages. Various cleanups. * Fixes to new code. * Add Ola Dash Album. Add support for overriding song difficulty. Other stylisation changes. * Attempt fix tests. * Ooops missed one. * flake8 suggestions. * Remove FM 17314 SUGAR RADIO as that song is a bit weird. * Update document pages. * Add trap support * Lower additional song count by 10. * Tests broke on my end. Using github to test this. * Looks like I was accidentally adding ~. * Fix the one song that crashes OoT hint generation * Various documentation changes. * Website documents fixup. * Doc updates part 2. * Oops. Doc updates part 3. * Add Muse Dash to the apworld list. * Add trailing comma. * Add a couple plando options. * Set data_version to 1. * Add in some handling incase someone decides a song is both starter and included. * Remove brackets around ifs. * Oops. Accidentally removed a necessary bracket. * Fix filtering crash due to me mixing up c# and python .remove(). * Add Happy Otaku Pack Vol.17. Also increment data version. * Update links to melon loader to be the latest. * Clean up song selection code by shuffling once then popping. * Add UID to the Data text file, so the same file can be used client and server. * Increment Data Version because some names have changed. * Correct some names. * Update data to v3.4.0 (Addition of Muse Radio FM104) * Add support for SFX traps. Adjusted how traps were setup a bit. * Update the docs to include a troubleshooting section. * Small fixes. * Remove unnecessary brackets. * Add .net downloads to docs. * Avoid failing generation if strict difficulty settings are applied with no dlc songs and streamer mode. * Forgot to add the worst starting song count. * Make minimum song count be Starting Songs + 11 instead of Starting Songs * 2 + 1. * Fix up several issues where song count could mismatch the requested amount. * Add a test to ensure world size doesn't grow. * Fix some oversights. * Remove unnecessary brackets. * Fix up passing the tuple out when just the key would suffice. * Adjust typing based on Phar's suggestions. * Apply the rest of Phar's suggestions with minor tweaks to other parts to suit suggestions. * Adjust some more stuff to fit 120 characters. * Some more pep8 stuff and fix tests. * Some pep8 in tests.
2023-06-29 12:36:39 +00:00
}
sfx_trap_items: List[str] = [
"Nyaa SFX Trap",
"Error SFX Trap",
]
filler_items: Dict[str, int] = {
"Great To Perfect (10 Pack)": STARTING_CODE + 30,
"Miss To Great (5 Pack)": STARTING_CODE + 31,
"Extra Life": STARTING_CODE + 32,
}
filler_item_weights: Dict[str, int] = {
"Great To Perfect (10 Pack)": 10,
"Miss To Great (5 Pack)": 3,
"Extra Life": 1,
}
item_names_to_id: ChainMap = ChainMap({k: v.code for k, v in SONG_DATA.items()}, filler_items, trap_items)
location_names_to_id: ChainMap = ChainMap(song_locations)
def __init__(self) -> None:
self.item_names_to_id[self.MUSIC_SHEET_NAME] = self.MUSIC_SHEET_CODE
Muse Dash: Add New Game (#1723) * Alpha 1 Muse dash stuff. * Add in an option to limit to only base game songs. * Make all items progression instead of progression_skip_balancing. * Add in extra_goal_song_items to help make runs less about completing every song. * Change ID range to be in a more open area, and add some comments. * Add in Streamer Mode and difficulty range options. Rearrange data files so its easier to get all data at once. * Fix generation issues. * Fix up the maximum and remove old option. * Remove empty items and the option to make filler songs empty. * Support emerald hunt mode. Make difficulties an option rather than 2 sliders. * Fix DLC Song option being inverted. * Fix item counting being broken if there was more than 1 world. * Make compatible with .apworld specification. * Make All item names ASCII compatible. * Add in the additional_item_percentage option. * Add a test to ensure the item names are within the normal ascii range. * Add in death link. * Remove the album from the item name. Not really needed anymore. * Add the 2 budget is burning albums under the free songs heading. Adds a couple more songs without dlc. * Sanitise Album names. * Added the grade needed choice. * Update songs to v3.1.0 * Adjust difficulty ranges. Add Expert and Master. * Fix setup_en.md being out of date. * Add a manual override. * Add testing for diff ranges. Fix bugs introduced there. Limit option to 11 to not generate an impossible seed. * Remove regions from Muse Dash. * Some Oops... * Attempt to make tests happy. * Remove supports weighting false to stop webhost test failing. * Adjusted settings * Adjust music sheets to use percentages. Various cleanups. * Fixes to new code. * Add Ola Dash Album. Add support for overriding song difficulty. Other stylisation changes. * Attempt fix tests. * Ooops missed one. * flake8 suggestions. * Remove FM 17314 SUGAR RADIO as that song is a bit weird. * Update document pages. * Add trap support * Lower additional song count by 10. * Tests broke on my end. Using github to test this. * Looks like I was accidentally adding ~. * Fix the one song that crashes OoT hint generation * Various documentation changes. * Website documents fixup. * Doc updates part 2. * Oops. Doc updates part 3. * Add Muse Dash to the apworld list. * Add trailing comma. * Add a couple plando options. * Set data_version to 1. * Add in some handling incase someone decides a song is both starter and included. * Remove brackets around ifs. * Oops. Accidentally removed a necessary bracket. * Fix filtering crash due to me mixing up c# and python .remove(). * Add Happy Otaku Pack Vol.17. Also increment data version. * Update links to melon loader to be the latest. * Clean up song selection code by shuffling once then popping. * Add UID to the Data text file, so the same file can be used client and server. * Increment Data Version because some names have changed. * Correct some names. * Update data to v3.4.0 (Addition of Muse Radio FM104) * Add support for SFX traps. Adjusted how traps were setup a bit. * Update the docs to include a troubleshooting section. * Small fixes. * Remove unnecessary brackets. * Add .net downloads to docs. * Avoid failing generation if strict difficulty settings are applied with no dlc songs and streamer mode. * Forgot to add the worst starting song count. * Make minimum song count be Starting Songs + 11 instead of Starting Songs * 2 + 1. * Fix up several issues where song count could mismatch the requested amount. * Add a test to ensure world size doesn't grow. * Fix some oversights. * Remove unnecessary brackets. * Fix up passing the tuple out when just the key would suffice. * Adjust typing based on Phar's suggestions. * Apply the rest of Phar's suggestions with minor tweaks to other parts to suit suggestions. * Adjust some more stuff to fit 120 characters. * Some more pep8 stuff and fix tests. * Some pep8 in tests.
2023-06-29 12:36:39 +00:00
location_id_index = self.STARTING_CODE
Muse Dash: Add New Game (#1723) * Alpha 1 Muse dash stuff. * Add in an option to limit to only base game songs. * Make all items progression instead of progression_skip_balancing. * Add in extra_goal_song_items to help make runs less about completing every song. * Change ID range to be in a more open area, and add some comments. * Add in Streamer Mode and difficulty range options. Rearrange data files so its easier to get all data at once. * Fix generation issues. * Fix up the maximum and remove old option. * Remove empty items and the option to make filler songs empty. * Support emerald hunt mode. Make difficulties an option rather than 2 sliders. * Fix DLC Song option being inverted. * Fix item counting being broken if there was more than 1 world. * Make compatible with .apworld specification. * Make All item names ASCII compatible. * Add in the additional_item_percentage option. * Add a test to ensure the item names are within the normal ascii range. * Add in death link. * Remove the album from the item name. Not really needed anymore. * Add the 2 budget is burning albums under the free songs heading. Adds a couple more songs without dlc. * Sanitise Album names. * Added the grade needed choice. * Update songs to v3.1.0 * Adjust difficulty ranges. Add Expert and Master. * Fix setup_en.md being out of date. * Add a manual override. * Add testing for diff ranges. Fix bugs introduced there. Limit option to 11 to not generate an impossible seed. * Remove regions from Muse Dash. * Some Oops... * Attempt to make tests happy. * Remove supports weighting false to stop webhost test failing. * Adjusted settings * Adjust music sheets to use percentages. Various cleanups. * Fixes to new code. * Add Ola Dash Album. Add support for overriding song difficulty. Other stylisation changes. * Attempt fix tests. * Ooops missed one. * flake8 suggestions. * Remove FM 17314 SUGAR RADIO as that song is a bit weird. * Update document pages. * Add trap support * Lower additional song count by 10. * Tests broke on my end. Using github to test this. * Looks like I was accidentally adding ~. * Fix the one song that crashes OoT hint generation * Various documentation changes. * Website documents fixup. * Doc updates part 2. * Oops. Doc updates part 3. * Add Muse Dash to the apworld list. * Add trailing comma. * Add a couple plando options. * Set data_version to 1. * Add in some handling incase someone decides a song is both starter and included. * Remove brackets around ifs. * Oops. Accidentally removed a necessary bracket. * Fix filtering crash due to me mixing up c# and python .remove(). * Add Happy Otaku Pack Vol.17. Also increment data version. * Update links to melon loader to be the latest. * Clean up song selection code by shuffling once then popping. * Add UID to the Data text file, so the same file can be used client and server. * Increment Data Version because some names have changed. * Correct some names. * Update data to v3.4.0 (Addition of Muse Radio FM104) * Add support for SFX traps. Adjusted how traps were setup a bit. * Update the docs to include a troubleshooting section. * Small fixes. * Remove unnecessary brackets. * Add .net downloads to docs. * Avoid failing generation if strict difficulty settings are applied with no dlc songs and streamer mode. * Forgot to add the worst starting song count. * Make minimum song count be Starting Songs + 11 instead of Starting Songs * 2 + 1. * Fix up several issues where song count could mismatch the requested amount. * Add a test to ensure world size doesn't grow. * Fix some oversights. * Remove unnecessary brackets. * Fix up passing the tuple out when just the key would suffice. * Adjust typing based on Phar's suggestions. * Apply the rest of Phar's suggestions with minor tweaks to other parts to suit suggestions. * Adjust some more stuff to fit 120 characters. * Some more pep8 stuff and fix tests. * Some pep8 in tests.
2023-06-29 12:36:39 +00:00
for name in self.song_items.keys():
self.song_locations[f"{name}-0"] = location_id_index
self.song_locations[f"{name}-1"] = location_id_index + 1
location_id_index += 2
Muse Dash: Add New Game (#1723) * Alpha 1 Muse dash stuff. * Add in an option to limit to only base game songs. * Make all items progression instead of progression_skip_balancing. * Add in extra_goal_song_items to help make runs less about completing every song. * Change ID range to be in a more open area, and add some comments. * Add in Streamer Mode and difficulty range options. Rearrange data files so its easier to get all data at once. * Fix generation issues. * Fix up the maximum and remove old option. * Remove empty items and the option to make filler songs empty. * Support emerald hunt mode. Make difficulties an option rather than 2 sliders. * Fix DLC Song option being inverted. * Fix item counting being broken if there was more than 1 world. * Make compatible with .apworld specification. * Make All item names ASCII compatible. * Add in the additional_item_percentage option. * Add a test to ensure the item names are within the normal ascii range. * Add in death link. * Remove the album from the item name. Not really needed anymore. * Add the 2 budget is burning albums under the free songs heading. Adds a couple more songs without dlc. * Sanitise Album names. * Added the grade needed choice. * Update songs to v3.1.0 * Adjust difficulty ranges. Add Expert and Master. * Fix setup_en.md being out of date. * Add a manual override. * Add testing for diff ranges. Fix bugs introduced there. Limit option to 11 to not generate an impossible seed. * Remove regions from Muse Dash. * Some Oops... * Attempt to make tests happy. * Remove supports weighting false to stop webhost test failing. * Adjusted settings * Adjust music sheets to use percentages. Various cleanups. * Fixes to new code. * Add Ola Dash Album. Add support for overriding song difficulty. Other stylisation changes. * Attempt fix tests. * Ooops missed one. * flake8 suggestions. * Remove FM 17314 SUGAR RADIO as that song is a bit weird. * Update document pages. * Add trap support * Lower additional song count by 10. * Tests broke on my end. Using github to test this. * Looks like I was accidentally adding ~. * Fix the one song that crashes OoT hint generation * Various documentation changes. * Website documents fixup. * Doc updates part 2. * Oops. Doc updates part 3. * Add Muse Dash to the apworld list. * Add trailing comma. * Add a couple plando options. * Set data_version to 1. * Add in some handling incase someone decides a song is both starter and included. * Remove brackets around ifs. * Oops. Accidentally removed a necessary bracket. * Fix filtering crash due to me mixing up c# and python .remove(). * Add Happy Otaku Pack Vol.17. Also increment data version. * Update links to melon loader to be the latest. * Clean up song selection code by shuffling once then popping. * Add UID to the Data text file, so the same file can be used client and server. * Increment Data Version because some names have changed. * Correct some names. * Update data to v3.4.0 (Addition of Muse Radio FM104) * Add support for SFX traps. Adjusted how traps were setup a bit. * Update the docs to include a troubleshooting section. * Small fixes. * Remove unnecessary brackets. * Add .net downloads to docs. * Avoid failing generation if strict difficulty settings are applied with no dlc songs and streamer mode. * Forgot to add the worst starting song count. * Make minimum song count be Starting Songs + 11 instead of Starting Songs * 2 + 1. * Fix up several issues where song count could mismatch the requested amount. * Add a test to ensure world size doesn't grow. * Fix some oversights. * Remove unnecessary brackets. * Fix up passing the tuple out when just the key would suffice. * Adjust typing based on Phar's suggestions. * Apply the rest of Phar's suggestions with minor tweaks to other parts to suit suggestions. * Adjust some more stuff to fit 120 characters. * Some more pep8 stuff and fix tests. * Some pep8 in tests.
2023-06-29 12:36:39 +00:00
def get_songs_with_settings(self, dlc_songs: Set[str], streamer_mode_active: bool,
Muse Dash: Add New Game (#1723) * Alpha 1 Muse dash stuff. * Add in an option to limit to only base game songs. * Make all items progression instead of progression_skip_balancing. * Add in extra_goal_song_items to help make runs less about completing every song. * Change ID range to be in a more open area, and add some comments. * Add in Streamer Mode and difficulty range options. Rearrange data files so its easier to get all data at once. * Fix generation issues. * Fix up the maximum and remove old option. * Remove empty items and the option to make filler songs empty. * Support emerald hunt mode. Make difficulties an option rather than 2 sliders. * Fix DLC Song option being inverted. * Fix item counting being broken if there was more than 1 world. * Make compatible with .apworld specification. * Make All item names ASCII compatible. * Add in the additional_item_percentage option. * Add a test to ensure the item names are within the normal ascii range. * Add in death link. * Remove the album from the item name. Not really needed anymore. * Add the 2 budget is burning albums under the free songs heading. Adds a couple more songs without dlc. * Sanitise Album names. * Added the grade needed choice. * Update songs to v3.1.0 * Adjust difficulty ranges. Add Expert and Master. * Fix setup_en.md being out of date. * Add a manual override. * Add testing for diff ranges. Fix bugs introduced there. Limit option to 11 to not generate an impossible seed. * Remove regions from Muse Dash. * Some Oops... * Attempt to make tests happy. * Remove supports weighting false to stop webhost test failing. * Adjusted settings * Adjust music sheets to use percentages. Various cleanups. * Fixes to new code. * Add Ola Dash Album. Add support for overriding song difficulty. Other stylisation changes. * Attempt fix tests. * Ooops missed one. * flake8 suggestions. * Remove FM 17314 SUGAR RADIO as that song is a bit weird. * Update document pages. * Add trap support * Lower additional song count by 10. * Tests broke on my end. Using github to test this. * Looks like I was accidentally adding ~. * Fix the one song that crashes OoT hint generation * Various documentation changes. * Website documents fixup. * Doc updates part 2. * Oops. Doc updates part 3. * Add Muse Dash to the apworld list. * Add trailing comma. * Add a couple plando options. * Set data_version to 1. * Add in some handling incase someone decides a song is both starter and included. * Remove brackets around ifs. * Oops. Accidentally removed a necessary bracket. * Fix filtering crash due to me mixing up c# and python .remove(). * Add Happy Otaku Pack Vol.17. Also increment data version. * Update links to melon loader to be the latest. * Clean up song selection code by shuffling once then popping. * Add UID to the Data text file, so the same file can be used client and server. * Increment Data Version because some names have changed. * Correct some names. * Update data to v3.4.0 (Addition of Muse Radio FM104) * Add support for SFX traps. Adjusted how traps were setup a bit. * Update the docs to include a troubleshooting section. * Small fixes. * Remove unnecessary brackets. * Add .net downloads to docs. * Avoid failing generation if strict difficulty settings are applied with no dlc songs and streamer mode. * Forgot to add the worst starting song count. * Make minimum song count be Starting Songs + 11 instead of Starting Songs * 2 + 1. * Fix up several issues where song count could mismatch the requested amount. * Add a test to ensure world size doesn't grow. * Fix some oversights. * Remove unnecessary brackets. * Fix up passing the tuple out when just the key would suffice. * Adjust typing based on Phar's suggestions. * Apply the rest of Phar's suggestions with minor tweaks to other parts to suit suggestions. * Adjust some more stuff to fit 120 characters. * Some more pep8 stuff and fix tests. * Some pep8 in tests.
2023-06-29 12:36:39 +00:00
diff_lower: int, diff_higher: int) -> List[str]:
"""Gets a list of all songs that match the filter settings. Difficulty thresholds are inclusive."""
filtered_list = []
for songKey, songData in self.song_items.items():
if not self.song_matches_dlc_filter(songData, dlc_songs):
Muse Dash: Add New Game (#1723) * Alpha 1 Muse dash stuff. * Add in an option to limit to only base game songs. * Make all items progression instead of progression_skip_balancing. * Add in extra_goal_song_items to help make runs less about completing every song. * Change ID range to be in a more open area, and add some comments. * Add in Streamer Mode and difficulty range options. Rearrange data files so its easier to get all data at once. * Fix generation issues. * Fix up the maximum and remove old option. * Remove empty items and the option to make filler songs empty. * Support emerald hunt mode. Make difficulties an option rather than 2 sliders. * Fix DLC Song option being inverted. * Fix item counting being broken if there was more than 1 world. * Make compatible with .apworld specification. * Make All item names ASCII compatible. * Add in the additional_item_percentage option. * Add a test to ensure the item names are within the normal ascii range. * Add in death link. * Remove the album from the item name. Not really needed anymore. * Add the 2 budget is burning albums under the free songs heading. Adds a couple more songs without dlc. * Sanitise Album names. * Added the grade needed choice. * Update songs to v3.1.0 * Adjust difficulty ranges. Add Expert and Master. * Fix setup_en.md being out of date. * Add a manual override. * Add testing for diff ranges. Fix bugs introduced there. Limit option to 11 to not generate an impossible seed. * Remove regions from Muse Dash. * Some Oops... * Attempt to make tests happy. * Remove supports weighting false to stop webhost test failing. * Adjusted settings * Adjust music sheets to use percentages. Various cleanups. * Fixes to new code. * Add Ola Dash Album. Add support for overriding song difficulty. Other stylisation changes. * Attempt fix tests. * Ooops missed one. * flake8 suggestions. * Remove FM 17314 SUGAR RADIO as that song is a bit weird. * Update document pages. * Add trap support * Lower additional song count by 10. * Tests broke on my end. Using github to test this. * Looks like I was accidentally adding ~. * Fix the one song that crashes OoT hint generation * Various documentation changes. * Website documents fixup. * Doc updates part 2. * Oops. Doc updates part 3. * Add Muse Dash to the apworld list. * Add trailing comma. * Add a couple plando options. * Set data_version to 1. * Add in some handling incase someone decides a song is both starter and included. * Remove brackets around ifs. * Oops. Accidentally removed a necessary bracket. * Fix filtering crash due to me mixing up c# and python .remove(). * Add Happy Otaku Pack Vol.17. Also increment data version. * Update links to melon loader to be the latest. * Clean up song selection code by shuffling once then popping. * Add UID to the Data text file, so the same file can be used client and server. * Increment Data Version because some names have changed. * Correct some names. * Update data to v3.4.0 (Addition of Muse Radio FM104) * Add support for SFX traps. Adjusted how traps were setup a bit. * Update the docs to include a troubleshooting section. * Small fixes. * Remove unnecessary brackets. * Add .net downloads to docs. * Avoid failing generation if strict difficulty settings are applied with no dlc songs and streamer mode. * Forgot to add the worst starting song count. * Make minimum song count be Starting Songs + 11 instead of Starting Songs * 2 + 1. * Fix up several issues where song count could mismatch the requested amount. * Add a test to ensure world size doesn't grow. * Fix some oversights. * Remove unnecessary brackets. * Fix up passing the tuple out when just the key would suffice. * Adjust typing based on Phar's suggestions. * Apply the rest of Phar's suggestions with minor tweaks to other parts to suit suggestions. * Adjust some more stuff to fit 120 characters. * Some more pep8 stuff and fix tests. * Some pep8 in tests.
2023-06-29 12:36:39 +00:00
continue
if songKey in self.REMOVED_SONGS:
continue
Muse Dash: Add New Game (#1723) * Alpha 1 Muse dash stuff. * Add in an option to limit to only base game songs. * Make all items progression instead of progression_skip_balancing. * Add in extra_goal_song_items to help make runs less about completing every song. * Change ID range to be in a more open area, and add some comments. * Add in Streamer Mode and difficulty range options. Rearrange data files so its easier to get all data at once. * Fix generation issues. * Fix up the maximum and remove old option. * Remove empty items and the option to make filler songs empty. * Support emerald hunt mode. Make difficulties an option rather than 2 sliders. * Fix DLC Song option being inverted. * Fix item counting being broken if there was more than 1 world. * Make compatible with .apworld specification. * Make All item names ASCII compatible. * Add in the additional_item_percentage option. * Add a test to ensure the item names are within the normal ascii range. * Add in death link. * Remove the album from the item name. Not really needed anymore. * Add the 2 budget is burning albums under the free songs heading. Adds a couple more songs without dlc. * Sanitise Album names. * Added the grade needed choice. * Update songs to v3.1.0 * Adjust difficulty ranges. Add Expert and Master. * Fix setup_en.md being out of date. * Add a manual override. * Add testing for diff ranges. Fix bugs introduced there. Limit option to 11 to not generate an impossible seed. * Remove regions from Muse Dash. * Some Oops... * Attempt to make tests happy. * Remove supports weighting false to stop webhost test failing. * Adjusted settings * Adjust music sheets to use percentages. Various cleanups. * Fixes to new code. * Add Ola Dash Album. Add support for overriding song difficulty. Other stylisation changes. * Attempt fix tests. * Ooops missed one. * flake8 suggestions. * Remove FM 17314 SUGAR RADIO as that song is a bit weird. * Update document pages. * Add trap support * Lower additional song count by 10. * Tests broke on my end. Using github to test this. * Looks like I was accidentally adding ~. * Fix the one song that crashes OoT hint generation * Various documentation changes. * Website documents fixup. * Doc updates part 2. * Oops. Doc updates part 3. * Add Muse Dash to the apworld list. * Add trailing comma. * Add a couple plando options. * Set data_version to 1. * Add in some handling incase someone decides a song is both starter and included. * Remove brackets around ifs. * Oops. Accidentally removed a necessary bracket. * Fix filtering crash due to me mixing up c# and python .remove(). * Add Happy Otaku Pack Vol.17. Also increment data version. * Update links to melon loader to be the latest. * Clean up song selection code by shuffling once then popping. * Add UID to the Data text file, so the same file can be used client and server. * Increment Data Version because some names have changed. * Correct some names. * Update data to v3.4.0 (Addition of Muse Radio FM104) * Add support for SFX traps. Adjusted how traps were setup a bit. * Update the docs to include a troubleshooting section. * Small fixes. * Remove unnecessary brackets. * Add .net downloads to docs. * Avoid failing generation if strict difficulty settings are applied with no dlc songs and streamer mode. * Forgot to add the worst starting song count. * Make minimum song count be Starting Songs + 11 instead of Starting Songs * 2 + 1. * Fix up several issues where song count could mismatch the requested amount. * Add a test to ensure world size doesn't grow. * Fix some oversights. * Remove unnecessary brackets. * Fix up passing the tuple out when just the key would suffice. * Adjust typing based on Phar's suggestions. * Apply the rest of Phar's suggestions with minor tweaks to other parts to suit suggestions. * Adjust some more stuff to fit 120 characters. * Some more pep8 stuff and fix tests. * Some pep8 in tests.
2023-06-29 12:36:39 +00:00
if streamer_mode_active and not songData.streamer_mode:
continue
if songData.easy is not None and diff_lower <= songData.easy <= diff_higher:
filtered_list.append(songKey)
continue
if songData.hard is not None and diff_lower <= songData.hard <= diff_higher:
filtered_list.append(songKey)
continue
if songData.master is not None and diff_lower <= songData.master <= diff_higher:
filtered_list.append(songKey)
continue
return filtered_list
def filter_songs_to_dlc(self, song_list: List[str], dlc_songs: Set[str]) -> List[str]:
return [song for song in song_list if self.song_matches_dlc_filter(self.song_items[song], dlc_songs)]
def song_matches_dlc_filter(self, song: SongData, dlc_songs: Set[str]) -> bool:
if song.album in self.FREE_ALBUMS:
return True
if song.album in dlc_songs:
return True
# Muse Plus provides access to any DLC not included as a seperate pack
if song.album not in self.DLC and self.MUSE_PLUS_DLC in dlc_songs:
return True
return False