Removed sortedcontainers dependency
This commit is contained in:
@@ -1,10 +1,6 @@
|
|||||||
import random, logging, copy
|
import random, logging, copy
|
||||||
from BaseClasses import OWEdge, WorldType, RegionType, Direction, Terrain, PolSlot
|
from BaseClasses import OWEdge, WorldType, RegionType, Direction, Terrain, PolSlot
|
||||||
from OWEdges import OWTileRegions, OWTileGroups, OWEdgeGroups, OpenStd, parallel_links, IsParallel
|
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'
|
__version__ = '0.1.6.7-u'
|
||||||
|
|
||||||
@@ -161,16 +157,16 @@ def link_overworld(world, player):
|
|||||||
connect_flutes(default_flute_connections)
|
connect_flutes(default_flute_connections)
|
||||||
else:
|
else:
|
||||||
flute_pool = list(flute_data.keys())
|
flute_pool = list(flute_data.keys())
|
||||||
new_spots = SortedList()
|
new_spots = list()
|
||||||
|
|
||||||
# guarantee desert/mire access
|
# guarantee desert/mire access
|
||||||
flute_pool.remove(0x38)
|
flute_pool.remove(0x38)
|
||||||
new_spots.add(0x38)
|
new_spots.append(0x38)
|
||||||
# guarantee mountain access
|
# guarantee mountain access
|
||||||
mountainIds = [0x0b, 0x0e, 0x07]
|
mountainIds = [0x0b, 0x0e, 0x07]
|
||||||
owslot = mountainIds[random.randint(0, 2)]
|
owslot = mountainIds[random.randint(0, 2)]
|
||||||
flute_pool.remove(owslot)
|
flute_pool.remove(owslot)
|
||||||
new_spots.add(owslot)
|
new_spots.append(owslot)
|
||||||
|
|
||||||
random.shuffle(flute_pool)
|
random.shuffle(flute_pool)
|
||||||
f = 0
|
f = 0
|
||||||
@@ -190,8 +186,9 @@ def link_overworld(world, player):
|
|||||||
f += 1
|
f += 1
|
||||||
continue
|
continue
|
||||||
if flute_pool[f] not in new_spots:
|
if flute_pool[f] not in new_spots:
|
||||||
new_spots.add(flute_pool[f])
|
new_spots.append(flute_pool[f])
|
||||||
f += 1
|
f += 1
|
||||||
|
new_spots.sort()
|
||||||
world.owflutespots[player] = new_spots
|
world.owflutespots[player] = new_spots
|
||||||
connect_flutes(new_spots)
|
connect_flutes(new_spots)
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
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.
|
Alternatively, run ```resources/ci/common/local_install.py``` to install all the missing dependencies as well.
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
aenum
|
aenum
|
||||||
fast-enum
|
fast-enum
|
||||||
python-bps-continued
|
python-bps-continued
|
||||||
sortedcontainers
|
|
||||||
colorama
|
colorama
|
||||||
aioconsole
|
aioconsole
|
||||||
websockets
|
websockets
|
||||||
|
|||||||
Reference in New Issue
Block a user