From 4c6974f1842e6f684fea60d094b293e8c5b91a60 Mon Sep 17 00:00:00 2001 From: CookieCat Date: Fri, 5 Jan 2024 12:06:28 -0500 Subject: [PATCH] proper warnings for invalid act plandos --- worlds/ahit/Regions.py | 11 ++++++----- worlds/ahit/docs/en_A Hat in Time.md | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/worlds/ahit/Regions.py b/worlds/ahit/Regions.py index 7178075c5f..0c1c1e2a4d 100644 --- a/worlds/ahit/Regions.py +++ b/worlds/ahit/Regions.py @@ -445,14 +445,14 @@ def create_tasksanity_locations(world: World): def is_valid_plando(world: World, region: str) -> bool: - if region in blacklisted_acts.values(): + if region in blacklisted_acts.values() or region not in act_entrances.keys(): return False if region not in world.options.ActPlando.keys(): return False act = world.options.ActPlando.get(region) - if act in blacklisted_acts.values(): + if act in blacklisted_acts.values() or act not in act_entrances.keys(): return False # Don't allow plando-ing things onto the first act that aren't completable with nothing @@ -515,9 +515,10 @@ def randomize_act_entrances(world: World): region_list.remove(region) region_list.append(region) else: - print("Disallowing act plando for", - world.multiworld.player_name[world.player], - "-", region.name, ":", world.options.ActPlando.get(region.name)) + print(f"[WARNING] ActPlando " + f"({world.multiworld.get_player_name(world.player)}) - " + f"{region.name}: {world.options.ActPlando.get(region.name)} " + f"is an invalid or disallowed act plando combination!") # Reverse the list, so we can do what we want to do first region_list.reverse() diff --git a/worlds/ahit/docs/en_A Hat in Time.md b/worlds/ahit/docs/en_A Hat in Time.md index 6bfb2196cf..8ebfe77893 100644 --- a/worlds/ahit/docs/en_A Hat in Time.md +++ b/worlds/ahit/docs/en_A Hat in Time.md @@ -13,7 +13,7 @@ To unlock and access a chapter's Time Rift in act shuffle, the levels in place o ## What items and locations get shuffled? -Time Pieces, Relics, Yarn, Badges, and most other items are shuffled. Unlike in the vanilla game, yarn is typeless, and will be automatically crafted in a set order once you gather enough yarn for each hat. Hats can also optionally be shuffled as individual items instead. Any items in the world, shops, act completions, and optionally storybook pages or Death Wish contracts are locations. +Time Pieces, Relics, Yarn, Badges, and most other items are shuffled. Unlike in the vanilla game, yarn is typeless, and hats will be automatically stitched in a set order once you gather enough yarn for each hat. Hats can also optionally be shuffled as individual items instead. Any items in the world, shops, act completions, and optionally storybook pages or Death Wish contracts are locations. Any freestanding items that are considered to be progression or useful will have a rainbow streak particle attached to them. Filler items will have a white glow attached to them instead.