From ced93022b67532e8172fd217a7d3a7bd205b8177 Mon Sep 17 00:00:00 2001 From: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> Date: Fri, 6 Dec 2024 01:15:26 -0500 Subject: [PATCH] Adventure: Remove unused variables (#4301) * Remove unused variables * Provide old parameters to comment --- worlds/adventure/Locations.py | 2 -- worlds/adventure/Regions.py | 6 +++--- worlds/adventure/Rom.py | 2 -- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/worlds/adventure/Locations.py b/worlds/adventure/Locations.py index 27e50468..ddaa266e 100644 --- a/worlds/adventure/Locations.py +++ b/worlds/adventure/Locations.py @@ -47,8 +47,6 @@ class LocationData: self.local_item: int = None def get_random_position(self, random): - x: int = None - y: int = None if self.world_positions is None or len(self.world_positions) == 0: if self.room_id is None: return None diff --git a/worlds/adventure/Regions.py b/worlds/adventure/Regions.py index e72806ca..4e4dd1e7 100644 --- a/worlds/adventure/Regions.py +++ b/worlds/adventure/Regions.py @@ -76,10 +76,9 @@ def create_regions(options: PerGameCommonOptions, multiworld: MultiWorld, player multiworld.regions.append(credits_room_far_side) dragon_slay_check = options.dragon_slay_check.value - priority_locations = determine_priority_locations(multiworld, dragon_slay_check) + priority_locations = determine_priority_locations() for name, location_data in location_table.items(): - require_sword = False if location_data.region == "Varies": if location_data.name == "Slay Yorgle": if not dragon_slay_check: @@ -154,6 +153,7 @@ def create_regions(options: PerGameCommonOptions, multiworld: MultiWorld, player # Placeholder for adding sets of priority locations at generation, possibly as an option in the future -def determine_priority_locations(world: MultiWorld, dragon_slay_check: bool) -> {}: +# def determine_priority_locations(multiworld: MultiWorld, dragon_slay_check: bool) -> {}: +def determine_priority_locations() -> {}: priority_locations = {} return priority_locations diff --git a/worlds/adventure/Rom.py b/worlds/adventure/Rom.py index ca64e569..643f7a6c 100644 --- a/worlds/adventure/Rom.py +++ b/worlds/adventure/Rom.py @@ -86,9 +86,7 @@ class AdventureDeltaPatch(APPatch, metaclass=AutoPatchRegister): # locations: [], autocollect: [], seed_name: bytes, def __init__(self, *args: Any, **kwargs: Any) -> None: - patch_only = True if "autocollect" in kwargs: - patch_only = False self.foreign_items: [AdventureForeignItemInfo] = [AdventureForeignItemInfo(loc.short_location_id, loc.room_id, loc.room_x, loc.room_y) for loc in kwargs["locations"]]