Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core: add correct flags to precollected items #2059

Closed
wants to merge 11 commits into from
2 changes: 1 addition & 1 deletion Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def write_multidata():
games[slot] = world.game[slot]
slot_info[slot] = NetUtils.NetworkSlot(group["name"], world.game[slot], world.player_types[slot],
group_members=sorted(group["players"]))
precollected_items = {player: [item.code for item in world_precollected if type(item.code) == int]
precollected_items = {player: [(item.code, item.flags) for item in world_precollected if type(item.code) == int]
for player, world_precollected in world.precollected_items.items()}
precollected_hints = {player: set() for player in range(1, world.players + 1 + len(world.groups))}

Expand Down
4 changes: 2 additions & 2 deletions MultiServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,8 @@ def _load(self, decoded_obj: dict, game_data_packages: typing.Dict[str, typing.A
for player, loc_data in decoded_obj["er_hint_data"].items()}

# load start inventory:
for slot, item_codes in decoded_obj["precollected_items"].items():
self.start_inventory[slot] = [NetworkItem(item_code, -2, 0) for item_code in item_codes]
for slot, items in decoded_obj["precollected_items"].items():
self.start_inventory[slot] = [NetworkItem(item[0], -2, 0, item[1]) for item in items]
kindasneaki marked this conversation as resolved.
Show resolved Hide resolved

for slot, hints in decoded_obj["precollected_hints"].items():
self.hints[0, slot].update(hints)
Expand Down