[Timnespinner] Implemented get_filler_item_name
This commit is contained in:
parent
14448ad97e
commit
b93e61b758
|
@ -54,6 +54,8 @@ class TimespinnerWorld(World):
|
||||||
def create_item(self, name: str) -> Item:
|
def create_item(self, name: str) -> Item:
|
||||||
return create_item_with_correct_settings(self.world, self.player, name)
|
return create_item_with_correct_settings(self.world, self.player, name)
|
||||||
|
|
||||||
|
def get_filler_item_name(self) -> str:
|
||||||
|
return self.world.random.choice(filler_items)
|
||||||
|
|
||||||
def set_rules(self):
|
def set_rules(self):
|
||||||
setup_events(self.world, self.player, self.locked_locations, self.location_cache)
|
setup_events(self.world, self.player, self.locked_locations, self.location_cache)
|
||||||
|
@ -71,7 +73,7 @@ class TimespinnerWorld(World):
|
||||||
|
|
||||||
pool = get_item_pool(self.world, self.player, excluded_items)
|
pool = get_item_pool(self.world, self.player, excluded_items)
|
||||||
|
|
||||||
fill_item_pool_with_dummy_items(self.world, self.player, self.locked_locations, self.location_cache, pool)
|
fill_item_pool_with_dummy_items(self, self.world, self.player, self.locked_locations, self.location_cache, pool)
|
||||||
|
|
||||||
self.world.itempool += pool
|
self.world.itempool += pool
|
||||||
|
|
||||||
|
@ -159,10 +161,10 @@ def get_item_pool(world: MultiWorld, player: int, excluded_items: Set[str]) -> L
|
||||||
return pool
|
return pool
|
||||||
|
|
||||||
|
|
||||||
def fill_item_pool_with_dummy_items(world: MultiWorld, player: int, locked_locations: List[str],
|
def fill_item_pool_with_dummy_items(self: TimespinnerWorld, world: MultiWorld, player: int, locked_locations: List[str],
|
||||||
location_cache: List[Location], pool: List[Item]):
|
location_cache: List[Location], pool: List[Item]):
|
||||||
for _ in range(len(location_cache) - len(locked_locations) - len(pool)):
|
for _ in range(len(location_cache) - len(locked_locations) - len(pool)):
|
||||||
item = create_item_with_correct_settings(world, player, world.random.choice(filler_items))
|
item = create_item_with_correct_settings(world, player, self.get_filler_item_name())
|
||||||
pool.append(item)
|
pool.append(item)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue