revenge of the player number offset
This commit is contained in:
		
							parent
							
								
									5b72fd4e36
								
							
						
					
					
						commit
						26eb44ef15
					
				| 
						 | 
					@ -451,7 +451,7 @@ def register_location_checks(ctx: Context, team: int, slot: int, locations):
 | 
				
			||||||
            for client in ctx.endpoints:
 | 
					            for client in ctx.endpoints:
 | 
				
			||||||
                if client.team == team and client.slot == slot:
 | 
					                if client.team == team and client.slot == slot:
 | 
				
			||||||
                    asyncio.create_task(ctx.send_msgs(client, [["HintPointUpdate", (get_client_points(ctx, client),)]]))
 | 
					                    asyncio.create_task(ctx.send_msgs(client, [["HintPointUpdate", (get_client_points(ctx, client),)]]))
 | 
				
			||||||
            ctx.save()
 | 
					        ctx.save()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def notify_team(ctx: Context, team: int, text: str):
 | 
					def notify_team(ctx: Context, team: int, text: str):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -161,7 +161,7 @@ def get_tracker(room: int):
 | 
				
			||||||
                 "Titans Mitts": "Progressive Glove"
 | 
					                 "Titans Mitts": "Progressive Glove"
 | 
				
			||||||
                 }
 | 
					                 }
 | 
				
			||||||
        links = {get_id(key): get_id(value) for key, value in links.items()}
 | 
					        links = {get_id(key): get_id(value) for key, value in links.items()}
 | 
				
			||||||
        inventory = {teamnumber: {playernumber: collections.Counter() for playernumber in range(len(team))}
 | 
					        inventory = {teamnumber: {playernumber: collections.Counter() for playernumber in range(1, len(team) + 1)}
 | 
				
			||||||
                     for teamnumber, team in enumerate(multidata["names"])}
 | 
					                     for teamnumber, team in enumerate(multidata["names"])}
 | 
				
			||||||
        for (team, player), locations_checked in room.multisave.get("location_checks", {}):
 | 
					        for (team, player), locations_checked in room.multisave.get("location_checks", {}):
 | 
				
			||||||
            for location in locations_checked:
 | 
					            for location in locations_checked:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -95,10 +95,9 @@ def run_server_process(room_id, ponyconfig: dict):
 | 
				
			||||||
            socketname = wssocket.getsockname()
 | 
					            socketname = wssocket.getsockname()
 | 
				
			||||||
            if wssocket.family == socket.AF_INET6:
 | 
					            if wssocket.family == socket.AF_INET6:
 | 
				
			||||||
                logging.info(f'Hosting game at [{get_public_ipv6()}]:{socketname[1]}')
 | 
					                logging.info(f'Hosting game at [{get_public_ipv6()}]:{socketname[1]}')
 | 
				
			||||||
                if ctx.port != socketname[1]:  # different port
 | 
					                with db_session:
 | 
				
			||||||
                    with db_session:
 | 
					                    room = Room.get(id=ctx.room_id)
 | 
				
			||||||
                        room = Room.get(id=ctx.room_id)
 | 
					                    room.last_port = socketname[1]
 | 
				
			||||||
                        room.last_port = socketname[1]
 | 
					 | 
				
			||||||
            elif wssocket.family == socket.AF_INET:
 | 
					            elif wssocket.family == socket.AF_INET:
 | 
				
			||||||
                logging.info(f'Hosting game at {get_public_ipv4()}:{socketname[1]}')
 | 
					                logging.info(f'Hosting game at {get_public_ipv4()}:{socketname[1]}')
 | 
				
			||||||
        ctx.auto_shutdown = 6 * 60
 | 
					        ctx.auto_shutdown = 6 * 60
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue