mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Correctly attribute items to each player.
This commit is contained in:
@@ -352,8 +352,9 @@ def getPlayerTracker(tracker: UUID, team: int, player: int):
|
|||||||
|
|
||||||
# Add items to player inventory
|
# Add items to player inventory
|
||||||
for (ms_team, ms_player), locations_checked in room.multisave.get("location_checks", {}):
|
for (ms_team, ms_player), locations_checked in room.multisave.get("location_checks", {}):
|
||||||
|
# logging.info(f"{ms_team}, {ms_player}, {locations_checked}")
|
||||||
# Skip teams and players not matching the request
|
# Skip teams and players not matching the request
|
||||||
if ms_team != (team - 1) or ms_player != player:
|
if ms_team != (team - 1):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# If the player does not have the item, do nothing
|
# If the player does not have the item, do nothing
|
||||||
@@ -362,7 +363,10 @@ def getPlayerTracker(tracker: UUID, team: int, player: int):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
item, recipient = locations[location, ms_player]
|
item, recipient = locations[location, ms_player]
|
||||||
attribute_item_solo(inventory, item)
|
if recipient == player:
|
||||||
|
attribute_item_solo(inventory, item)
|
||||||
|
if ms_player != player:
|
||||||
|
continue
|
||||||
checks_done[player_location_to_area[location]] += 1
|
checks_done[player_location_to_area[location]] += 1
|
||||||
checks_done["Total"] += 1
|
checks_done["Total"] += 1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user