Skip to content

Commit

Permalink
HOLD UP THIS IS SO SHORT NOW
Browse files Browse the repository at this point in the history
  • Loading branch information
NewSoupVi committed Aug 12, 2024
1 parent 2f7ca1d commit 0fc1e8a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ def main(args, seed=None, baked_server_options: Optional[Dict[str, object]] = No
player: getattr(multiworld.worlds[player].options, "start_inventory_from_pool", fallback_inventory).value.copy()
for player in multiworld.player_ids
}
target_per_player = {player: sum(target_items.values()) for player, target_items in depletion_pool.items()}
target_per_player = {
player: sum(target_items.values()) for player, target_items in depletion_pool.items() if target_items
if depletion_pool[player]
}
overall_target = sum(target_per_player.values())

if overall_target:
Expand All @@ -170,14 +173,9 @@ def main(args, seed=None, baked_server_options: Optional[Dict[str, object]] = No
else:
new_itempool.append(item)

unfound_items_per_player = {
player: {item: count for item, count in remaining_items.items() if count > 0} # Cull entries with value 0
for player, remaining_items in depletion_pool.items()
}

# Create filler in place of the removed items, warn if any items couldn't be found in the multiworld itempool
for player, target in target_per_player.items():
unfound_items = unfound_items_per_player[player]
unfound_items = {item: count for item, count in depletion_pool[player].items() if count}

if unfound_items:
player_name = multiworld.get_player_name(player)
Expand Down

0 comments on commit 0fc1e8a

Please sign in to comment.