diff --git a/worlds/dkc3/Client.py b/worlds/dkc3/Client.py index ee2bd1db..40216e81 100644 --- a/worlds/dkc3/Client.py +++ b/worlds/dkc3/Client.py @@ -1,5 +1,4 @@ import logging -import asyncio from NetUtils import ClientStatus, color from worlds.AutoSNIClient import SNIClient @@ -32,7 +31,7 @@ class DKC3SNIClient(SNIClient): async def validate_rom(self, ctx): - from SNIClient import snes_buffered_write, snes_flush_writes, snes_read + from SNIClient import snes_read rom_name = await snes_read(ctx, DKC3_ROMHASH_START, ROMHASH_SIZE) if rom_name is None or rom_name == bytes([0] * ROMHASH_SIZE) or rom_name[:2] != b"D3": diff --git a/worlds/dkc3/Items.py b/worlds/dkc3/Items.py index 358873cd..e6cac91e 100644 --- a/worlds/dkc3/Items.py +++ b/worlds/dkc3/Items.py @@ -1,6 +1,6 @@ import typing -from BaseClasses import Item, ItemClassification +from BaseClasses import Item from .Names import ItemName diff --git a/worlds/dkc3/Options.py b/worlds/dkc3/Options.py index b114a503..3f220bce 100644 --- a/worlds/dkc3/Options.py +++ b/worlds/dkc3/Options.py @@ -1,7 +1,6 @@ from dataclasses import dataclass -import typing -from Options import Choice, Range, Toggle, DeathLink, DefaultOnToggle, OptionGroup, PerGameCommonOptions +from Options import Choice, Range, Toggle, DefaultOnToggle, OptionGroup, PerGameCommonOptions class Goal(Choice): diff --git a/worlds/dkc3/Regions.py b/worlds/dkc3/Regions.py index ae505b78..6e968dbe 100644 --- a/worlds/dkc3/Regions.py +++ b/worlds/dkc3/Regions.py @@ -1,10 +1,9 @@ import typing -from BaseClasses import MultiWorld, Region, Entrance -from .Items import DKC3Item +from BaseClasses import Region, Entrance +from worlds.AutoWorld import World from .Locations import DKC3Location from .Names import LocationName, ItemName -from worlds.AutoWorld import World def create_regions(world: World, active_locations): diff --git a/worlds/dkc3/Rom.py b/worlds/dkc3/Rom.py index 0dc722a7..fb8bc2b1 100644 --- a/worlds/dkc3/Rom.py +++ b/worlds/dkc3/Rom.py @@ -2,7 +2,6 @@ import Utils from Utils import read_snes_rom from worlds.AutoWorld import World from worlds.Files import APDeltaPatch -from .Locations import lookup_id_to_name, all_locations from .Levels import level_list, level_dict USHASH = '120abf304f0c40fe059f6a192ed4f947' @@ -436,7 +435,7 @@ level_music_ids = [ class LocalRom: - def __init__(self, file, patch=True, vanillaRom=None, name=None, hash=None): + def __init__(self, file, name=None, hash=None): self.name = name self.hash = hash self.orig_buffer = None diff --git a/worlds/dkc3/Rules.py b/worlds/dkc3/Rules.py index cc45e4ef..3d68aefb 100644 --- a/worlds/dkc3/Rules.py +++ b/worlds/dkc3/Rules.py @@ -1,8 +1,8 @@ import math +from worlds.AutoWorld import World +from worlds.generic.Rules import add_rule from .Names import LocationName, ItemName -from worlds.AutoWorld import LogicMixin, World -from worlds.generic.Rules import add_rule, set_rule def set_rules(world: World): diff --git a/worlds/dkc3/__init__.py b/worlds/dkc3/__init__.py index de6fb4a4..1dabeb05 100644 --- a/worlds/dkc3/__init__.py +++ b/worlds/dkc3/__init__.py @@ -1,15 +1,13 @@ import dataclasses -import os -import typing import math +import os import threading +import typing +import settings from BaseClasses import Item, MultiWorld, Tutorial, ItemClassification from Options import PerGameCommonOptions -import Patch -import settings from worlds.AutoWorld import WebWorld, World - from .Client import DKC3SNIClient from .Items import DKC3Item, ItemData, item_table, inventory_table, junk_table from .Levels import level_list