Small cleanup
This commit is contained in:
@@ -1106,7 +1106,8 @@ def connect_random(world, exitlist, targetlist, player, two_way=False):
|
|||||||
def connect_mandatory_exits(world, entrances, caves, must_be_exits, player):
|
def connect_mandatory_exits(world, entrances, caves, must_be_exits, player):
|
||||||
|
|
||||||
# Keeps track of entrances that cannot be used to access each exit / cave
|
# Keeps track of entrances that cannot be used to access each exit / cave
|
||||||
if world.mode[player] == 'inverted':
|
inverted = world.mode[player] == 'inverted'
|
||||||
|
if inverted:
|
||||||
invalid_connections = Inverted_Must_Exit_Invalid_Connections.copy()
|
invalid_connections = Inverted_Must_Exit_Invalid_Connections.copy()
|
||||||
else:
|
else:
|
||||||
invalid_connections = Must_Exit_Invalid_Connections.copy()
|
invalid_connections = Must_Exit_Invalid_Connections.copy()
|
||||||
@@ -1114,7 +1115,7 @@ def connect_mandatory_exits(world, entrances, caves, must_be_exits, player):
|
|||||||
|
|
||||||
if world.logic[player] in ['owglitches', 'hybridglitches', 'nologic']:
|
if world.logic[player] in ['owglitches', 'hybridglitches', 'nologic']:
|
||||||
import OverworldGlitchRules
|
import OverworldGlitchRules
|
||||||
for entrance in OverworldGlitchRules.get_non_mandatory_exits(world.mode[player] == 'inverted'):
|
for entrance in OverworldGlitchRules.inverted_non_mandatory_exits if inverted else OverworldGlitchRules.open_non_mandatory_exits:
|
||||||
invalid_connections[entrance] = set()
|
invalid_connections[entrance] = set()
|
||||||
if entrance in must_be_exits:
|
if entrance in must_be_exits:
|
||||||
must_be_exits.remove(entrance)
|
must_be_exits.remove(entrance)
|
||||||
@@ -1125,7 +1126,7 @@ def connect_mandatory_exits(world, entrances, caves, must_be_exits, player):
|
|||||||
random.shuffle(caves)
|
random.shuffle(caves)
|
||||||
|
|
||||||
# Handle inverted Aga Tower - if it depends on connections, then so does Hyrule Castle Ledge
|
# Handle inverted Aga Tower - if it depends on connections, then so does Hyrule Castle Ledge
|
||||||
if world.mode[player] == 'inverted':
|
if inverted:
|
||||||
for entrance in invalid_connections:
|
for entrance in invalid_connections:
|
||||||
if world.get_entrance(entrance, player).connected_region == world.get_region('Agahnims Tower Portal', player):
|
if world.get_entrance(entrance, player).connected_region == world.get_region('Agahnims Tower Portal', player):
|
||||||
for exit in invalid_connections[entrance]:
|
for exit in invalid_connections[entrance]:
|
||||||
|
|||||||
@@ -959,7 +959,7 @@ def do_mandatory_connections(avail, entrances, cave_options, must_exit):
|
|||||||
|
|
||||||
if avail.world.logic[avail.player] in ['owglitches', 'hybridglitches', 'nologic']:
|
if avail.world.logic[avail.player] in ['owglitches', 'hybridglitches', 'nologic']:
|
||||||
import OverworldGlitchRules
|
import OverworldGlitchRules
|
||||||
for entrance in OverworldGlitchRules.get_non_mandatory_exits(avail.inverted):
|
for entrance in OverworldGlitchRules.inverted_non_mandatory_exits if avail.inverted else OverworldGlitchRules.open_non_mandatory_exits:
|
||||||
invalid_connections[entrance] = set()
|
invalid_connections[entrance] = set()
|
||||||
if entrance in must_exit:
|
if entrance in must_exit:
|
||||||
must_exit.remove(entrance)
|
must_exit.remove(entrance)
|
||||||
|
|||||||
Reference in New Issue
Block a user