FactorioClient: Batch-Send RCON commands when receiving catch-up locations and multiple items.

This commit is contained in:
Fabian Dill
2021-08-24 09:52:12 +02:00
parent 21a5170337
commit 30ac7baa2c
2 changed files with 13 additions and 6 deletions

View File

@@ -123,11 +123,11 @@ def distribute_items_restrictive(world: MultiWorld, fill_locations=None):
world.random.shuffle(fill_locations)
restitempool, fill_locations = fast_fill(world, restitempool, fill_locations)
unplaced = [item for item in progitempool + restitempool]
unplaced = progitempool + restitempool
unfilled = [location.name for location in fill_locations]
if unplaced or unfilled:
raise FillError(f'Unplaced items({len(unplaced)}): {unplaced} - Unfilled Locations({len(unfilled)}): {unfilled}')
logging.warning(f'Unplaced items({len(unplaced)}): {unplaced} - Unfilled Locations({len(unfilled)}): {unfilled}')
def fast_fill(world: MultiWorld, item_pool: typing.List, fill_locations: typing.List) -> typing.Tuple[typing.List, typing.List]: