Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mm/mission groups #201

Merged
merged 3 commits into from
May 19, 2024
Merged

Conversation

MatthewMarinets
Copy link

What is this fixing or adding?

Adding mission groups (and some minor item group code refactors).

Note that on AP main, there's a PR up (#3280 ) which breaks the current call to .verify_keys() in Sc2ItemDict. I updated it to no longer call the function, and also verified it still displayed sensible error messages in response to typos / yaml errors.

How was this tested?

  • Added some basic unit tests
  • Did a test generation using some mar sara mission groups and checked the spoiler
  • Tried generating with a few mission groups with typos to verify the error message fuzzy search would also recommend mission groups

If this makes graphical changes, please attach screenshots.

  excluded_missions:
    # Guarantees that these missions will not appear in the campaign
    # Doesn't apply to vanilla mission order.
    ### No builds
    - Belly of the Beast
    - The Infinite Cycle
    - Supreme
    # - Whispers of Doom
    - Ghost of a Chance
    - Piercing the Shroud
    - With Friends Like These
    - Conviction
    # - Enemy Within
    - Evil Awoken
    - The Infinite Cycle
    # - Templar's Return
    # - In the Enemy's Shadow
    ### Very Hard
    - All-In
    - Salvation
    # - Into the Void
    - The Essence of Eternity
    - Amon's Fall
    # - End Game
    - PlANEt AiuRR

Exception: Mission PlANEt AiuRR from option ExcludedMissions(All-In, Amon's Fall, Belly of the Beast, Conviction, Evil Awoken, Ghost of a Chance, Piercing the Shroud, PlANEt AiuRR, Salvation, Supreme, The Essence of Eternity, The Infinite Cycle, With Friends Like These) is not a valid mission name from Starcraft 2. Did you mean 'Planet Aiur' (91% sure)

@@ -655,7 +694,12 @@ def verify(self, world: Type['World'], player_name: str, plando_options: PlandoO
self.value = new_value
for item_name in self.value:
if item_name not in world.item_names:
picks = get_fuzzy_results(item_name, list(world.item_names), limit=1)
from . import ItemGroups
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alas, trying to import this in the top of the file results in a circular dependency and the generator always crashing. Another option would be to put the mission group names on the world object, though that would be tightening the assumptions on when this function is called, and the PR on main makes me think that interface is not entirely nailed down yet.

@Ziktofel Ziktofel merged commit 4187828 into Ziktofel:sc2-next May 19, 2024
10 checks passed
@MatthewMarinets MatthewMarinets deleted the mm/mission_groups branch June 16, 2024 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants