Factorio: implement custom filler items (#4945)

This commit is contained in:
Fabian Dill
2025-05-02 23:39:14 +02:00
committed by GitHub
parent 2455f1158f
commit da0207f5cb
2 changed files with 11 additions and 5 deletions

View File

@@ -485,7 +485,7 @@ class World(metaclass=AutoWorldRegister):
def get_filler_item_name(self) -> str:
"""Called when the item pool needs to be filled with additional items to match location count."""
logging.warning(f"World {self} is generating a filler item without custom filler pool.")
return self.multiworld.random.choice(tuple(self.item_name_to_id.keys()))
return self.random.choice(tuple(self.item_name_to_id.keys()))
@classmethod
def create_group(cls, multiworld: "MultiWorld", new_player_id: int, players: Set[int]) -> World: