Add timeout to pathfinding, optimize

This commit is contained in:
2020-05-20 17:57:22 -06:00
parent 948dd64221
commit ccdd51aad3
2 changed files with 46 additions and 12 deletions
+4 -4
View File
@@ -183,12 +183,12 @@ NON_SOLID = [
]
SINGLE_SNOW = 3919
NON_SOLID_IDS = [SINGLE_SNOW]
NON_SOLID_IDS = set([SINGLE_SNOW])
for block_name in NON_SOLID:
for state in BLOCKS[block_name]['states']:
NON_SOLID_IDS.append(state['id'])
NON_SOLID_IDS.add(state['id'])
AVOID_IDS = []
AVOID_IDS = set()
for block_name in AVOID:
for state in BLOCKS[block_name]['states']:
AVOID_IDS.append(state['id'])
AVOID_IDS.add(state['id'])