@@ -98,7 +98,8 @@ async def connection_closed(self):
9898 def suggested_game (self ) -> str :
9999 if self .game :
100100 return self .game
101- return Utils .persistent_load ().get ("client" , {}).get ("last_manual_game" , "Manual_{\" game\" from game.json}_{\" creator\" from game.json}" )
101+ from .Game import game_name # This will at least give us the name of a manual they've installed
102+ return Utils .persistent_load ().get ("client" , {}).get ("last_manual_game" , game_name )
102103
103104 def get_location_by_name (self , name ) -> dict [str , Any ]:
104105 location = self .location_table .get (name )
@@ -205,6 +206,7 @@ class LocationsLayoutScrollable(ScrollView):
205206
206207 class TreeViewButton (Button , TreeViewNode ):
207208 victory : bool = False
209+ id : int = None
208210
209211 class TreeViewScrollView (ScrollView , TreeViewNode ):
210212 pass
@@ -423,6 +425,7 @@ def build_tracker_and_locations_table(self):
423425 for location_id in self .listed_locations [location_category ]:
424426 location_button = TreeViewButton (text = self .ctx .location_names [location_id ], size_hint = (None , None ), height = 30 , width = 400 )
425427 location_button .bind (on_press = lambda * args , loc_id = location_id : self .location_button_callback (loc_id , * args ))
428+ location_button .id = location_id
426429 category_layout .add_widget (location_button )
427430
428431 # if this is the category that Victory is in, display the Victory button
@@ -563,9 +566,7 @@ def update_tracker_and_locations_table(self, update_highlights=False):
563566 reachable_count += 1
564567 continue
565568
566- location = self .ctx .get_location_by_name (location_button .text )
567-
568- if ("victory" not in location or not location ["victory" ]) and location ["id" ] not in self .ctx .missing_locations :
569+ if location_button .id and location_button .id not in self .ctx .missing_locations :
569570 import logging
570571
571572 logging .info ("location button being removed: " + location_button .text )
0 commit comments