mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
WebHost: Fix 500 server errors for hints involving ItemLink slots on tracker pages (#4198)
* Also makes adjustments to the style for these slots by italicizing its names (including multi-tracker). * Player-specific trackers do not link to ItemLink player trackers (they do not exist). * Fixes a bug on Factorio multi-tracker when item links exist.
This commit is contained in:

committed by
GitHub

parent
9ba613277e
commit
5141f36e95
@@ -423,6 +423,7 @@ def render_generic_tracker(tracker_data: TrackerData, team: int, player: int) ->
|
||||
template_name_or_list="genericTracker.html",
|
||||
game_specific_tracker=game in _player_trackers,
|
||||
room=tracker_data.room,
|
||||
get_slot_info=tracker_data.get_slot_info,
|
||||
team=team,
|
||||
player=player,
|
||||
player_name=tracker_data.get_room_long_player_names()[team, player],
|
||||
@@ -446,6 +447,7 @@ def render_generic_multiworld_tracker(tracker_data: TrackerData, enabled_tracker
|
||||
enabled_trackers=enabled_trackers,
|
||||
current_tracker="Generic",
|
||||
room=tracker_data.room,
|
||||
get_slot_info=tracker_data.get_slot_info,
|
||||
all_slots=tracker_data.get_all_slots(),
|
||||
room_players=tracker_data.get_all_players(),
|
||||
locations=tracker_data.get_room_locations(),
|
||||
@@ -497,7 +499,7 @@ if "Factorio" in network_data_package["games"]:
|
||||
(team, player): collections.Counter({
|
||||
tracker_data.item_id_to_name["Factorio"][item_id]: count
|
||||
for item_id, count in tracker_data.get_player_inventory_counts(team, player).items()
|
||||
}) for team, players in tracker_data.get_all_slots().items() for player in players
|
||||
}) for team, players in tracker_data.get_all_players().items() for player in players
|
||||
if tracker_data.get_player_game(team, player) == "Factorio"
|
||||
}
|
||||
|
||||
@@ -506,6 +508,7 @@ if "Factorio" in network_data_package["games"]:
|
||||
enabled_trackers=enabled_trackers,
|
||||
current_tracker="Factorio",
|
||||
room=tracker_data.room,
|
||||
get_slot_info=tracker_data.get_slot_info,
|
||||
all_slots=tracker_data.get_all_slots(),
|
||||
room_players=tracker_data.get_all_players(),
|
||||
locations=tracker_data.get_room_locations(),
|
||||
@@ -638,6 +641,7 @@ if "A Link to the Past" in network_data_package["games"]:
|
||||
enabled_trackers=enabled_trackers,
|
||||
current_tracker="A Link to the Past",
|
||||
room=tracker_data.room,
|
||||
get_slot_info=tracker_data.get_slot_info,
|
||||
all_slots=tracker_data.get_all_slots(),
|
||||
room_players=tracker_data.get_all_players(),
|
||||
locations=tracker_data.get_room_locations(),
|
||||
|
Reference in New Issue
Block a user