diff --git a/BaseClasses.py b/BaseClasses.py index b467fcac..5107849c 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -1190,7 +1190,7 @@ class Spoiler(object): listed_locations.update(other_locations) self.shops = [] - from Shops import ShopType + from worlds.alttp.Shops import ShopType for shop in self.world.shops: if not shop.custom: continue diff --git a/MultiClient.py b/MultiClient.py index e6e88097..d8f3a0a4 100644 --- a/MultiClient.py +++ b/MultiClient.py @@ -1,6 +1,4 @@ import argparse -import asyncio -import logging import urllib.parse import atexit import time @@ -16,7 +14,6 @@ import shutil from random import randrange -import Shops from Utils import get_item_name_from_id, get_location_name_from_address, ReceivedItem exit_func = atexit.register(input, "Press enter to close.") @@ -32,7 +29,7 @@ from prompt_toolkit.patch_stdout import patch_stdout from NetUtils import * import WebUI -from worlds.alttp import Regions +from worlds.alttp import Regions, Shops import Utils # logging note: diff --git a/test/dungeons/TestDungeon.py b/test/dungeons/TestDungeon.py index c7af0c59..a12d308f 100644 --- a/test/dungeons/TestDungeon.py +++ b/test/dungeons/TestDungeon.py @@ -6,7 +6,7 @@ from worlds.alttp.EntranceShuffle import mandatory_connections, connect_simple from worlds.alttp.ItemPool import difficulties, generate_itempool from worlds.alttp.Items import ItemFactory from worlds.alttp.Regions import create_regions -from Shops import create_shops +from worlds.alttp.Shops import create_shops from worlds.alttp.Rules import set_rules diff --git a/test/inverted/TestInverted.py b/test/inverted/TestInverted.py index c7050da0..624b7290 100644 --- a/test/inverted/TestInverted.py +++ b/test/inverted/TestInverted.py @@ -5,7 +5,7 @@ from worlds.alttp.InvertedRegions import create_inverted_regions from worlds.alttp.ItemPool import generate_itempool, difficulties from worlds.alttp.Items import ItemFactory from worlds.alttp.Regions import mark_light_world_regions -from Shops import create_shops +from worlds.alttp.Shops import create_shops from worlds.alttp.Rules import set_rules from test.TestBase import TestBase diff --git a/test/inverted_minor_glitches/TestInvertedMinor.py b/test/inverted_minor_glitches/TestInvertedMinor.py index 76cbc801..a9b6ef09 100644 --- a/test/inverted_minor_glitches/TestInvertedMinor.py +++ b/test/inverted_minor_glitches/TestInvertedMinor.py @@ -5,7 +5,7 @@ from worlds.alttp.InvertedRegions import create_inverted_regions from worlds.alttp.ItemPool import generate_itempool, difficulties from worlds.alttp.Items import ItemFactory from worlds.alttp.Regions import mark_light_world_regions -from Shops import create_shops +from worlds.alttp.Shops import create_shops from worlds.alttp.Rules import set_rules from test.TestBase import TestBase diff --git a/test/inverted_owg/TestInvertedOWG.py b/test/inverted_owg/TestInvertedOWG.py index f2b15929..c4a8e59e 100644 --- a/test/inverted_owg/TestInvertedOWG.py +++ b/test/inverted_owg/TestInvertedOWG.py @@ -5,7 +5,7 @@ from worlds.alttp.InvertedRegions import create_inverted_regions from worlds.alttp.ItemPool import generate_itempool, difficulties from worlds.alttp.Items import ItemFactory from worlds.alttp.Regions import mark_light_world_regions -from Shops import create_shops +from worlds.alttp.Shops import create_shops from worlds.alttp.Rules import set_rules from test.TestBase import TestBase diff --git a/test/minor_glitches/TestMinor.py b/test/minor_glitches/TestMinor.py index 11f5354d..71f05f24 100644 --- a/test/minor_glitches/TestMinor.py +++ b/test/minor_glitches/TestMinor.py @@ -5,7 +5,7 @@ from worlds.alttp.InvertedRegions import mark_dark_world_regions from worlds.alttp.ItemPool import difficulties, generate_itempool from worlds.alttp.Items import ItemFactory from worlds.alttp.Regions import create_regions -from Shops import create_shops +from worlds.alttp.Shops import create_shops from worlds.alttp.Rules import set_rules from test.TestBase import TestBase diff --git a/test/owg/TestVanillaOWG.py b/test/owg/TestVanillaOWG.py index 22b99b8e..22feedaa 100644 --- a/test/owg/TestVanillaOWG.py +++ b/test/owg/TestVanillaOWG.py @@ -5,7 +5,7 @@ from worlds.alttp.InvertedRegions import mark_dark_world_regions from worlds.alttp.ItemPool import difficulties, generate_itempool from worlds.alttp.Items import ItemFactory from worlds.alttp.Regions import create_regions -from Shops import create_shops +from worlds.alttp.Shops import create_shops from worlds.alttp.Rules import set_rules from test.TestBase import TestBase diff --git a/test/shops/TestSram.py b/test/shops/TestSram.py index 0da4e42e..f5feedfb 100644 --- a/test/shops/TestSram.py +++ b/test/shops/TestSram.py @@ -1,4 +1,4 @@ -from Shops import shop_table +from worlds.alttp.Shops import shop_table from test.TestBase import TestBase diff --git a/test/vanilla/TestVanilla.py b/test/vanilla/TestVanilla.py index 3bf1a8c1..9b0e4060 100644 --- a/test/vanilla/TestVanilla.py +++ b/test/vanilla/TestVanilla.py @@ -5,7 +5,7 @@ from worlds.alttp.InvertedRegions import mark_dark_world_regions from worlds.alttp.ItemPool import difficulties, generate_itempool from worlds.alttp.Items import ItemFactory from worlds.alttp.Regions import create_regions -from Shops import create_shops +from worlds.alttp.Shops import create_shops from worlds.alttp.Rules import set_rules from test.TestBase import TestBase diff --git a/worlds/alttp/ItemPool.py b/worlds/alttp/ItemPool.py index 9e78d2f0..68d3b85f 100644 --- a/worlds/alttp/ItemPool.py +++ b/worlds/alttp/ItemPool.py @@ -2,7 +2,7 @@ from collections import namedtuple import logging from BaseClasses import Region, RegionType, Location -from Shops import TakeAny, total_shop_slots, set_up_shops, shuffle_shops +from worlds.alttp.Shops import TakeAny, total_shop_slots, set_up_shops, shuffle_shops from worlds.alttp.Bosses import place_bosses from worlds.alttp.Dungeons import get_dungeon_item_pool from worlds.alttp.EntranceShuffle import connect_entrance diff --git a/worlds/alttp/Main.py b/worlds/alttp/Main.py index 37a989fb..09bad7ad 100644 --- a/worlds/alttp/Main.py +++ b/worlds/alttp/Main.py @@ -19,7 +19,7 @@ from worlds.alttp.Rom import patch_rom, patch_race_rom, patch_enemizer, apply_ro from worlds.alttp.Rules import set_rules from worlds.alttp.Dungeons import create_dungeons, fill_dungeons, fill_dungeons_restrictive from Fill import distribute_items_restrictive, flood_items, balance_multiworld_progression, distribute_planned -from Shops import create_shops, ShopSlotFill, SHOP_ID_START, total_shop_slots, FillDisabledShopSlots +from worlds.alttp.Shops import create_shops, ShopSlotFill, SHOP_ID_START, total_shop_slots, FillDisabledShopSlots from worlds.alttp.ItemPool import generate_itempool, difficulties, fill_prizes from Utils import output_path, parse_player_names, get_options, __version__, _version_tuple import Patch diff --git a/worlds/alttp/Regions.py b/worlds/alttp/Regions.py index fdd03fae..cffcdc15 100644 --- a/worlds/alttp/Regions.py +++ b/worlds/alttp/Regions.py @@ -672,7 +672,7 @@ location_table: typing.Dict[str, 'Turtle Rock - Prize': ( [0x120A7, 0x53F24, 0x53F25, 0x18005C, 0x180079, 0xC708], None, True, 'Turtle Rock')} -from Shops import shop_table_by_location_id, shop_table_by_location +from worlds.alttp.Shops import shop_table_by_location_id, shop_table_by_location lookup_id_to_name = {data[0]: name for name, data in location_table.items() if type(data[0]) == int} lookup_id_to_name = {**lookup_id_to_name, **{data[1]: name for name, data in key_drop_data.items()}, -1: "cheat console"} lookup_id_to_name.update(shop_table_by_location_id) diff --git a/worlds/alttp/Rom.py b/worlds/alttp/Rom.py index 4d861c23..63378204 100644 --- a/worlds/alttp/Rom.py +++ b/worlds/alttp/Rom.py @@ -10,7 +10,6 @@ import logging import os import random import struct -import sys import subprocess import threading import xxtea @@ -18,7 +17,7 @@ import concurrent.futures from typing import Optional from BaseClasses import CollectionState, Region, Location -from Shops import ShopType, total_shop_slots +from worlds.alttp.Shops import ShopType from worlds.alttp.Dungeons import dungeon_music_addresses from worlds.alttp.Regions import location_table, old_location_address_to_new_location_address from worlds.alttp.Text import MultiByteTextMapper, text_addresses, Credits, TextTable diff --git a/Shops.py b/worlds/alttp/Shops.py similarity index 100% rename from Shops.py rename to worlds/alttp/Shops.py