Move required Client Version to AutoWorld
This commit is contained in:
		
							parent
							
								
									a3a68de341
								
							
						
					
					
						commit
						739b563bc2
					
				
							
								
								
									
										5
									
								
								Main.py
								
								
								
								
							
							
						
						
									
										5
									
								
								Main.py
								
								
								
								
							| 
						 | 
				
			
			@ -497,10 +497,7 @@ def main(args, seed=None):
 | 
			
		|||
        minimum_versions = {"server": (0, 1, 1), "clients": client_versions}
 | 
			
		||||
        games = {}
 | 
			
		||||
        for slot in world.player_ids:
 | 
			
		||||
            if world.game[slot] == "Factorio":
 | 
			
		||||
                client_versions[slot] = (0, 1, 2)
 | 
			
		||||
            else:
 | 
			
		||||
                client_versions[slot] = (0, 0, 3)
 | 
			
		||||
            client_versions[slot] = world.worlds[slot].get_required_client_version()
 | 
			
		||||
            games[slot] = world.game[slot]
 | 
			
		||||
        connect_names = {base64.b64encode(rom_name).decode(): (team, slot) for
 | 
			
		||||
                         slot, team, rom_name in rom_names}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -45,3 +45,6 @@ class World(metaclass=AutoWorldRegister):
 | 
			
		|||
 | 
			
		||||
    def generate_output(self):
 | 
			
		||||
        pass
 | 
			
		||||
 | 
			
		||||
    def get_required_client_version(self) -> tuple:
 | 
			
		||||
        return 0, 0, 3
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -80,6 +80,9 @@ class Factorio(World):
 | 
			
		|||
 | 
			
		||||
        world.completion_condition[player] = lambda state: state.has('Victory', player)
 | 
			
		||||
 | 
			
		||||
    def get_required_client_version(self) -> tuple:
 | 
			
		||||
        return max((0, 1, 4), super(Factorio, self).get_required_client_version())
 | 
			
		||||
 | 
			
		||||
    options = factorio_options
 | 
			
		||||
 | 
			
		||||
def set_custom_technologies(world: MultiWorld, player: int):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue