Skip to content

Commit

Permalink
YGO06: make sure it runs on 3.8 support (ArchipelagoMW#3324)
Browse files Browse the repository at this point in the history
* YGO06: make sure it runs on python 3.8

* YGO06: change merge of dict, so it runs on python 3.8
  • Loading branch information
Rensen3 authored and qwint committed Jun 24, 2024
1 parent 3800f4b commit c354726
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions worlds/yugioh06/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def generate_early(self):
self.multiworld.push_precollected(self.create_item(Banlist_Items[banlist]))

if not self.removed_challenges:
challenge = list((Limited_Duels | Theme_Duels).keys())
challenge = list(({**Limited_Duels, **Theme_Duels}).keys())
noc = len(challenge) - max(
self.options.third_tier_5_campaign_boss_challenges.value
if self.options.third_tier_5_campaign_boss_unlock_condition == "challenges"
Expand Down Expand Up @@ -238,9 +238,9 @@ def create_regions(self):
structure_deck = self.options.structure_deck.current_key
self.multiworld.regions += [
self.create_region("Menu", None, ["to Deck Edit", "to Campaign", "to Challenges", "to Card Shop"]),
self.create_region("Campaign", Bonuses | Campaign_Opponents),
self.create_region("Campaign", {**Bonuses, **Campaign_Opponents}),
self.create_region("Challenges"),
self.create_region("Card Shop", Required_Cards | collection_events),
self.create_region("Card Shop", {**Required_Cards, **collection_events}),
self.create_region("Structure Deck", get_deck_content_locations(structure_deck)),
]

Expand Down Expand Up @@ -308,7 +308,7 @@ def create_regions(self):

challenge_region = self.get_region("Challenges")
# Challenges
for challenge, lid in (Limited_Duels | Theme_Duels).items():
for challenge, lid in ({**Limited_Duels, **Theme_Duels}).items():
if challenge in self.removed_challenges:
continue
region = self.create_region(challenge, {challenge: lid, challenge + " Complete": None})
Expand Down
6 changes: 4 additions & 2 deletions worlds/yugioh06/structure_deck.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
structure_contents: dict[str, set] = {
from typing import Dict, Set

structure_contents: Dict[str, Set] = {
"dragons_roar": {
"Luster Dragon",
"Armed Dragon LV3",
Expand Down Expand Up @@ -77,5 +79,5 @@
}


def get_deck_content_locations(deck: str) -> dict[str, str]:
def get_deck_content_locations(deck: str) -> Dict[str, str]:
return {f"{deck} {i}": content for i, content in enumerate(structure_contents[deck])}

0 comments on commit c354726

Please sign in to comment.