diff --git a/BaseClasses.py b/BaseClasses.py index c9b00eac..50fed3ac 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -5,7 +5,7 @@ from enum import Enum, unique import logging import json from collections import OrderedDict, Counter, deque -from typing import Union, Optional, List +from typing import Union, Optional, List, Set import secrets import random @@ -333,9 +333,7 @@ class World(object): def get_entrances(self) -> list: if self._cached_entrances is None: - self._cached_entrances = [] - for region in self.regions: - self._cached_entrances.extend(region.entrances) + self._cached_entrances = [entrance for region in self.regions for entrance in region.entrances] return self._cached_entrances def clear_entrance_cache(self): @@ -343,9 +341,7 @@ class World(object): def get_locations(self) -> list: if self._cached_locations is None: - self._cached_locations = [] - for region in self.regions: - self._cached_locations.extend(region.locations) + self._cached_locations = [location for region in self.regions for location in region.locations] return self._cached_locations def clear_location_cache(self): diff --git a/Gui.py b/Gui.py index d15a0a64..24e5cc9d 100755 --- a/Gui.py +++ b/Gui.py @@ -351,14 +351,6 @@ def guiMain(args=None): shuffleLabel = Label(shuffleFrame, text='Entrance shuffle algorithm') shuffleLabel.pack(side=LEFT) - shop_shuffleFrame = Frame(drowDownFrame) - shop_shuffleVar = StringVar() - shop_shuffleVar.set('off') - shop_shuffleOptionMenu = OptionMenu(shop_shuffleFrame, shop_shuffleVar, 'off', 'inventory', 'price', - 'price and inventory') - shop_shuffleOptionMenu.pack(side=RIGHT) - shop_shuffleLabel = Label(shop_shuffleFrame, text='Shop Shuffle') - shop_shuffleLabel.pack(side=LEFT) modeFrame.pack(expand=True, anchor=E) logicFrame.pack(expand=True, anchor=E) @@ -374,7 +366,6 @@ def guiMain(args=None): accessibilityFrame.pack(expand=True, anchor=E) algorithmFrame.pack(expand=True, anchor=E) shuffleFrame.pack(expand=True, anchor=E) - shop_shuffleFrame.pack(expand=True, anchor=E) enemizerFrame = LabelFrame(randomizerWindow, text="Enemizer", padx=5, pady=2) @@ -505,7 +496,6 @@ def guiMain(args=None): guiargs.accessibility = accessibilityVar.get() guiargs.algorithm = algorithmVar.get() guiargs.shuffle = shuffleVar.get() - guiargs.shop_shuffle = shop_shuffleVar.get() guiargs.heartbeep = heartbeepVar.get() guiargs.heartcolor = heartcolorVar.get() guiargs.fastmenu = fastMenuVar.get() diff --git a/Main.py b/Main.py index 6e944017..b7e93ce9 100644 --- a/Main.py +++ b/Main.py @@ -431,7 +431,7 @@ def copy_dynamic_regions_and_locations(world, ret): new_loc.item_rule = location.item_rule new_reg.locations.append(new_loc) - ret.clear_location_cache() + ret.clear_location_cache() def create_playthrough(world): diff --git a/Utils.py b/Utils.py index e27c53e0..a08fa5c6 100644 --- a/Utils.py +++ b/Utils.py @@ -6,7 +6,7 @@ def tuplize_version(version: str) -> typing.Tuple[int, ...]: return tuple(int(piece, 10) for piece in version.split(".")) -__version__ = "2.5.1" +__version__ = "2.5.2" _version_tuple = tuplize_version(__version__) import os