Fill¶
- exception Fill.FillError(*args: str | Any, **kwargs)¶
Bases:
RuntimeError
- Fill.accessibility_corrections(multiworld: MultiWorld, state: CollectionState, locations, pool=[])¶
- Fill.balance_multiworld_progression(multiworld: MultiWorld) None ¶
- Fill.distribute_early_items(multiworld: MultiWorld, fill_locations: List[Location], itempool: List[Item]) Tuple[List[Location], List[Item]] ¶
returns new fill_locations and itempool
- Fill.distribute_items_restrictive(multiworld: MultiWorld, panic_method: Literal['swap', 'raise', 'start_inventory'] = 'swap') None ¶
- Fill.distribute_planned(multiworld: MultiWorld) None ¶
- Fill.fast_fill(multiworld: MultiWorld, item_pool: List[Item], fill_locations: List[Location]) Tuple[List[Item], List[Location]] ¶
- Fill.fill_restrictive(multiworld: MultiWorld, base_state: CollectionState, locations: List[Location], item_pool: List[Item], single_player_placement: bool = False, lock: bool = False, swap: bool = True, on_place: Callable[[Location], None] | None = None, allow_partial: bool = False, allow_excluded: bool = False, one_item_per_player: bool = True, name: str = 'Unknown') None ¶
- Parameters:
multiworld – Multiworld to be filled.
base_state – State assumed before fill.
locations – Locations to be filled with item_pool, gets mutated by removing locations that get filled.
item_pool – Items to fill into the locations, gets mutated by removing items that get placed.
single_player_placement – if true, can speed up placement if everything belongs to a single player
lock – locations are set to locked as they are filled
swap – if true, swaps of already place items are done in the event of a dead end
on_place – callback that is called when a placement happens
allow_partial – only place what is possible. Remaining items will be in the item_pool list.
allow_excluded – if true and placement fails, it is re-attempted while ignoring excluded on Locations
name – name of this fill step for progress logging purposes
- Fill.flood_items(multiworld: MultiWorld) None ¶
- Fill.inaccessible_location_rules(multiworld: MultiWorld, state: CollectionState, locations)¶
- Fill.remaining_fill(multiworld: MultiWorld, locations: List[Location], itempool: List[Item], name: str = 'Remaining', move_unplaceable_to_start_inventory: bool = False, check_location_can_fill: bool = False) None ¶
- Fill.swap_location_item(location_1: Location, location_2: Location, check_locked: bool = True) None ¶
Swaps Items of locations. Does NOT swap flags like shop_slot or locked, but does swap event
- Fill.sweep_from_pool(base_state: CollectionState, itempool: Sequence[Item] = (), locations: List[Location] | None = None) CollectionState ¶