From 40546155163487778f8e4ee580ef084d59acd727 Mon Sep 17 00:00:00 2001 From: codemann8 Date: Fri, 16 Jul 2021 15:10:34 -0500 Subject: [PATCH] Removed sortedcontainers dependency --- OverworldShuffle.py | 13 +++++-------- README.md | 2 +- resources/app/meta/manifests/pip_requirements.txt | 1 - 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/OverworldShuffle.py b/OverworldShuffle.py index 90c1c8dc..3a700045 100644 --- a/OverworldShuffle.py +++ b/OverworldShuffle.py @@ -1,10 +1,6 @@ import random, logging, copy from BaseClasses import OWEdge, WorldType, RegionType, Direction, Terrain, PolSlot from OWEdges import OWTileRegions, OWTileGroups, OWEdgeGroups, OpenStd, parallel_links, IsParallel -try: - from sortedcontainers import SortedList -except ImportError: - raise Exception('Could not load sortedcontainers module') __version__ = '0.1.6.7-u' @@ -161,16 +157,16 @@ def link_overworld(world, player): connect_flutes(default_flute_connections) else: flute_pool = list(flute_data.keys()) - new_spots = SortedList() + new_spots = list() # guarantee desert/mire access flute_pool.remove(0x38) - new_spots.add(0x38) + new_spots.append(0x38) # guarantee mountain access mountainIds = [0x0b, 0x0e, 0x07] owslot = mountainIds[random.randint(0, 2)] flute_pool.remove(owslot) - new_spots.add(owslot) + new_spots.append(owslot) random.shuffle(flute_pool) f = 0 @@ -190,8 +186,9 @@ def link_overworld(world, player): f += 1 continue if flute_pool[f] not in new_spots: - new_spots.add(flute_pool[f]) + new_spots.append(flute_pool[f]) f += 1 + new_spots.sort() world.owflutespots[player] = new_spots connect_flutes(new_spots) diff --git a/README.md b/README.md index 0f495d1f..4f466faf 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Download the source code from the repository directly and put it in a folder of You must have Python installed (version 3.6 - 3.9 supported) -This program requires all python dependencies that are necessary to run Aerinon's Door Randomizer plus an additional 'sortedcontainers' package. Try running ```pip install sortedcontainers``` or ```python -m pip install sortedcontainers``` on the command line to install the dependency. +This program requires all python dependencies that are necessary to run Aerinon's Door Randomizer. Try running ```pip install missingdependency``` or ```python -m pip install missingdependency``` on the command line (replace ```missingdependency``` with the specific package that is missing) to install the dependency. Alternatively, run ```resources/ci/common/local_install.py``` to install all the missing dependencies as well. diff --git a/resources/app/meta/manifests/pip_requirements.txt b/resources/app/meta/manifests/pip_requirements.txt index 7b7724d8..faa3c48f 100644 --- a/resources/app/meta/manifests/pip_requirements.txt +++ b/resources/app/meta/manifests/pip_requirements.txt @@ -1,7 +1,6 @@ aenum fast-enum python-bps-continued -sortedcontainers colorama aioconsole websockets