No need to set locality rules in single player and no need to reverse a list that was just shuffled
This commit is contained in:
parent
d86eb69b4c
commit
3271460c68
8
Fill.py
8
Fill.py
|
@ -125,7 +125,6 @@ def distribute_items_restrictive(world, gftower_trash=False, fill_locations=None
|
||||||
trashcnt += 1
|
trashcnt += 1
|
||||||
|
|
||||||
world.random.shuffle(fill_locations)
|
world.random.shuffle(fill_locations)
|
||||||
fill_locations.reverse()
|
|
||||||
|
|
||||||
# Make sure the escape small key is placed first in standard with key shuffle to prevent running out of spots
|
# Make sure the escape small key is placed first in standard with key shuffle to prevent running out of spots
|
||||||
progitempool.sort(
|
progitempool.sort(
|
||||||
|
@ -134,8 +133,8 @@ def distribute_items_restrictive(world, gftower_trash=False, fill_locations=None
|
||||||
|
|
||||||
fill_restrictive(world, world.state, fill_locations, progitempool)
|
fill_restrictive(world, world.state, fill_locations, progitempool)
|
||||||
|
|
||||||
if any(
|
if any(localprioitempool.values() or
|
||||||
localprioitempool.values() or localrestitempool.values()): # we need to make sure some fills are limited to certain worlds
|
localrestitempool.values()): # we need to make sure some fills are limited to certain worlds
|
||||||
for player, items in localprioitempool.items(): # items already shuffled
|
for player, items in localprioitempool.items(): # items already shuffled
|
||||||
local_locations = [location for location in fill_locations if location.player == player]
|
local_locations = [location for location in fill_locations if location.player == player]
|
||||||
world.random.shuffle(local_locations)
|
world.random.shuffle(local_locations)
|
||||||
|
@ -152,11 +151,10 @@ def distribute_items_restrictive(world, gftower_trash=False, fill_locations=None
|
||||||
fill_locations.remove(spot_to_fill)
|
fill_locations.remove(spot_to_fill)
|
||||||
|
|
||||||
world.random.shuffle(fill_locations)
|
world.random.shuffle(fill_locations)
|
||||||
|
|
||||||
prioitempool, fill_locations = fast_fill(world, prioitempool, fill_locations)
|
prioitempool, fill_locations = fast_fill(world, prioitempool, fill_locations)
|
||||||
|
|
||||||
restitempool, fill_locations = fast_fill(world, restitempool, fill_locations)
|
restitempool, fill_locations = fast_fill(world, restitempool, fill_locations)
|
||||||
unplaced = [item.name for item in progitempool + prioitempool + restitempool]
|
unplaced = [item for item in progitempool + prioitempool + restitempool]
|
||||||
unfilled = [location.name for location in fill_locations]
|
unfilled = [location.name for location in fill_locations]
|
||||||
|
|
||||||
if unplaced or unfilled:
|
if unplaced or unfilled:
|
||||||
|
|
1
Rules.py
1
Rules.py
|
@ -7,6 +7,7 @@ from OverworldGlitchRules import overworld_glitches_rules, no_logic_rules
|
||||||
|
|
||||||
|
|
||||||
def set_rules(world, player):
|
def set_rules(world, player):
|
||||||
|
if world.players > 1:
|
||||||
locality_rules(world, player)
|
locality_rules(world, player)
|
||||||
if world.logic[player] == 'nologic':
|
if world.logic[player] == 'nologic':
|
||||||
logging.getLogger('').info(
|
logging.getLogger('').info(
|
||||||
|
|
Loading…
Reference in New Issue