Infinite loop detection for connect_inaccessible_regions
This commit is contained in:
@@ -4,6 +4,7 @@ import RaceRandom as random
|
|||||||
from BaseClasses import CollectionState, RegionType
|
from BaseClasses import CollectionState, RegionType
|
||||||
from OverworldShuffle import build_accessible_region_list
|
from OverworldShuffle import build_accessible_region_list
|
||||||
from OWEdges import OWTileRegions
|
from OWEdges import OWTileRegions
|
||||||
|
from Utils import stack_size3a
|
||||||
|
|
||||||
entrance_pool = list()
|
entrance_pool = list()
|
||||||
exit_pool = list()
|
exit_pool = list()
|
||||||
@@ -1481,6 +1482,10 @@ def junk_fill_inaccessible(world, player):
|
|||||||
def connect_inaccessible_regions(world, lw_entrances, dw_entrances, caves, player, ignore_list=[]):
|
def connect_inaccessible_regions(world, lw_entrances, dw_entrances, caves, player, ignore_list=[]):
|
||||||
invFlag = world.mode[player] == 'inverted'
|
invFlag = world.mode[player] == 'inverted'
|
||||||
|
|
||||||
|
if stack_size3a() > 500:
|
||||||
|
from DungeonGenerator import GenerationException
|
||||||
|
raise GenerationException(f'Infinite loop detected at \'connect_inaccessible_regions\'')
|
||||||
|
|
||||||
random.shuffle(lw_entrances)
|
random.shuffle(lw_entrances)
|
||||||
random.shuffle(dw_entrances)
|
random.shuffle(dw_entrances)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user