Remove remaining ALTTP import from CommonClient.py and fix /missing in FactorioClient.py
This commit is contained in:
		
							parent
							
								
									14cadbf80d
								
							
						
					
					
						commit
						b0c1a7acce
					
				|  | @ -14,8 +14,7 @@ from Utils import Version | |||
| 
 | ||||
| # logging note: | ||||
| # logging.* gets send to only the text console, logger.* gets send to the WebUI as well, if it's initialized. | ||||
| from worlds import network_data_package | ||||
| from worlds.alttp import Items, Regions | ||||
| from worlds import network_data_package, AutoWorldRegister | ||||
| 
 | ||||
| logger = logging.getLogger("Client") | ||||
| 
 | ||||
|  | @ -54,7 +53,7 @@ class ClientCommandProcessor(CommandProcessor): | |||
|         """List all missing location checks, from your local game state""" | ||||
|         count = 0 | ||||
|         checked_count = 0 | ||||
|         for location, location_id in Regions.lookup_name_to_id.items(): | ||||
|         for location, location_id in AutoWorldRegister.world_types[self.ctx.game].item_name_to_id.items(): | ||||
|             if location_id < 0: | ||||
|                 continue | ||||
|             if location_id not in self.ctx.locations_checked: | ||||
|  | @ -92,6 +91,8 @@ class CommonContext(): | |||
|     starting_reconnect_delay = 5 | ||||
|     current_reconnect_delay = starting_reconnect_delay | ||||
|     command_processor = ClientCommandProcessor | ||||
|     game: None | ||||
| 
 | ||||
|     def __init__(self, server_address, password, found_items: bool): | ||||
|         # server state | ||||
|         self.server_address = server_address | ||||
|  |  | |||
|  | @ -64,6 +64,7 @@ class FactorioCommandProcessor(ClientCommandProcessor): | |||
| 
 | ||||
| class FactorioContext(CommonContext): | ||||
|     command_processor = FactorioCommandProcessor | ||||
|     game = "Factorio" | ||||
| 
 | ||||
|     def __init__(self, *args, **kwargs): | ||||
|         super(FactorioContext, self).__init__(*args, **kwargs) | ||||
|  |  | |||
|  | @ -57,6 +57,8 @@ class LttPCommandProcessor(ClientCommandProcessor): | |||
| 
 | ||||
| class Context(CommonContext): | ||||
|     command_processor = LttPCommandProcessor | ||||
|     game = "A Link to the Past" | ||||
| 
 | ||||
|     def __init__(self, snes_address, server_address, password, found_items): | ||||
|         super(Context, self).__init__(server_address, password, found_items) | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue