mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
TUNIC: Fix plando connections, seed groups, and UT support (#3429)
This commit is contained in:
@@ -8,7 +8,7 @@ from .er_rules import set_er_location_rules
|
||||
from .regions import tunic_regions
|
||||
from .er_scripts import create_er_regions
|
||||
from .er_data import portal_mapping
|
||||
from .options import TunicOptions, EntranceRando, tunic_option_groups, tunic_option_presets
|
||||
from .options import TunicOptions, EntranceRando, tunic_option_groups, tunic_option_presets, TunicPlandoConnections
|
||||
from worlds.AutoWorld import WebWorld, World
|
||||
from Options import PlandoConnection
|
||||
from decimal import Decimal, ROUND_HALF_UP
|
||||
@@ -43,7 +43,7 @@ class SeedGroup(TypedDict):
|
||||
logic_rules: int # logic rules value
|
||||
laurels_at_10_fairies: bool # laurels location value
|
||||
fixed_shop: bool # fixed shop value
|
||||
plando: List[PlandoConnection] # consolidated list of plando connections for the seed group
|
||||
plando: TunicPlandoConnections # consolidated of plando connections for the seed group
|
||||
|
||||
|
||||
class TunicWorld(World):
|
||||
@@ -96,13 +96,15 @@ class TunicWorld(World):
|
||||
self.options.hexagon_quest.value = passthrough["hexagon_quest"]
|
||||
self.options.entrance_rando.value = passthrough["entrance_rando"]
|
||||
self.options.shuffle_ladders.value = passthrough["shuffle_ladders"]
|
||||
self.options.fixed_shop.value = self.options.fixed_shop.option_false
|
||||
self.options.laurels_location.value = self.options.laurels_location.option_anywhere
|
||||
|
||||
@classmethod
|
||||
def stage_generate_early(cls, multiworld: MultiWorld) -> None:
|
||||
tunic_worlds: Tuple[TunicWorld] = multiworld.get_game_worlds("TUNIC")
|
||||
for tunic in tunic_worlds:
|
||||
# if it's one of the options, then it isn't a custom seed group
|
||||
if tunic.options.entrance_rando.value in EntranceRando.options:
|
||||
if tunic.options.entrance_rando.value in EntranceRando.options.values():
|
||||
continue
|
||||
group = tunic.options.entrance_rando.value
|
||||
# if this is the first world in the group, set the rules equal to its rules
|
||||
@@ -147,7 +149,7 @@ class TunicWorld(World):
|
||||
f"{tunic.multiworld.get_player_name(tunic.player)}'s plando "
|
||||
f"connection {cxn.entrance} <-> {cxn.exit}")
|
||||
if new_cxn:
|
||||
cls.seed_groups[group]["plando"].append(cxn)
|
||||
cls.seed_groups[group]["plando"].value.append(cxn)
|
||||
|
||||
def create_item(self, name: str) -> TunicItem:
|
||||
item_data = item_table[name]
|
||||
|
Reference in New Issue
Block a user