Core: remove sending_visible (#339)

* Core: remove sending_visible
Only used by Factorio and that use predates start_location_hints, which works perfectly fine for this purpose.

* Factorio: minor cleanup
This commit is contained in:
Fabian Dill
2022-03-24 17:15:52 +01:00
committed by GitHub
parent c12d8e2f46
commit 75de616465
3 changed files with 7 additions and 11 deletions

View File

@@ -57,6 +57,7 @@ class Factorio(World):
attack_traps_wanted = self.world.attack_traps[player].value
traps_wanted = ["Evolution Trap"] * evolution_traps_wanted + ["Attack Trap"] * attack_traps_wanted
self.world.random.shuffle(traps_wanted)
for tech_name in base_tech_table:
if traps_wanted and tech_name in useless_technologies:
self.world.itempool.append(self.create_item(traps_wanted.pop()))
@@ -71,11 +72,15 @@ class Factorio(World):
self.world.get_location(tech_name, player).place_locked_item(tech_item)
else:
self.world.itempool.append(tech_item)
map_basic_settings = self.world.world_gen[player].value["basic"]
if map_basic_settings.get("seed", None) is None: # allow seed 0
map_basic_settings["seed"] = self.world.slot_seeds[player].randint(0, 2 ** 32 - 1) # 32 bit uint
self.sending_visible = self.world.tech_tree_information[player] == TechTreeInformation.option_full
# used to be called "sending_visible"
if self.world.tech_tree_information[player] == TechTreeInformation.option_full:
# mark all locations as pre-hinted
self.world.start_location_hints[self.player].value.update(base_tech_table)
generate_output = generate_mod