Fixed generation of traps

This commit is contained in:
Jarno
2025-07-14 16:38:00 +02:00
parent be26511205
commit 476f01eb27

View File

@@ -48,12 +48,6 @@ class SatisfactoryWorld(World):
if self.critical_path_seed == None:
self.critical_path_seed = self.random.random()
self.critical_path = CriticalPathCalculator(self.game_logic, self.critical_path_seed, self.options)
self.critical_path.calculate()
self.state_logic = StateLogic(self.player, self.options, self.critical_path)
self.items = Items(self.player, self.game_logic, self.random, self.options, self.critical_path)
if self.options.mam_logic_placement.value == Placement.starting_inventory:
self.push_precollected("Building: MAM")
if self.options.awesome_logic_placement.value == Placement.starting_inventory:
@@ -68,6 +62,12 @@ class SatisfactoryWorld(World):
if not self.options.trap_selection_override.value:
self.options.trap_selection_override.value = self.options.trap_selection_preset.get_selected_list()
self.critical_path = CriticalPathCalculator(self.game_logic, self.critical_path_seed, self.options)
self.critical_path.calculate()
self.state_logic = StateLogic(self.player, self.options, self.critical_path)
self.items = Items(self.player, self.game_logic, self.random, self.options, self.critical_path)
starting_inventory: list[str] = self.options.starting_inventory_preset.get_selected_list()
for item_name in starting_inventory:
self.push_precollected(item_name)