Make visible_sending part of AutoWorld.

This commit is contained in:
CaitSith2 2021-10-09 20:38:53 -07:00
parent eb602aedc3
commit f8deb1bd7f
3 changed files with 8 additions and 3 deletions

View File

@ -252,12 +252,11 @@ def main(args, seed=None):
precollected_hints = {player: set() for player in range(1, world.players + 1)}
# for now special case Factorio tech_tree_information
sending_visible_players = set()
for player in world.get_game_players("Factorio"):
if world.tech_tree_information[player].value == 2:
sending_visible_players.add(player)
for slot in world.player_ids:
slot_data[slot] = world.worlds[slot].fill_slot_data()
if world.worlds[slot].sending_visible:
sending_visible_players.add(slot)
def precollect_hint(location):
hint = NetUtils.Hint(location.item.player, location.player, location.address,

View File

@ -114,6 +114,9 @@ class World(metaclass=AutoWorldRegister):
item_names: Set[str] # set of all potential item names
location_names: Set[str] # set of all potential location names
# If there is visibility in what is being sent, this is where it will be known.
sending_visible: bool = False
def __init__(self, world: MultiWorld, player: int):
self.world = world
self.player = player

View File

@ -66,6 +66,9 @@ class Factorio(World):
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] == Options.TechTreeInformation.option_full
generate_output = generate_mod
def create_regions(self):