Network remove roominfo players (#661)
This commit is contained in:
parent
74fe03414c
commit
247f674749
|
@ -540,14 +540,14 @@ async def process_server_cmd(ctx: CommonContext, args: dict):
|
||||||
f" for each location checked. Use !hint for more information.")
|
f" for each location checked. Use !hint for more information.")
|
||||||
ctx.hint_cost = int(args['hint_cost'])
|
ctx.hint_cost = int(args['hint_cost'])
|
||||||
ctx.check_points = int(args['location_check_points'])
|
ctx.check_points = int(args['location_check_points'])
|
||||||
|
players = args.get("players", [])
|
||||||
if len(args['players']) < 1:
|
if len(players) < 1:
|
||||||
logger.info('No player connected')
|
logger.info('No player connected')
|
||||||
else:
|
else:
|
||||||
args['players'].sort()
|
players.sort()
|
||||||
current_team = -1
|
current_team = -1
|
||||||
logger.info('Connected Players:')
|
logger.info('Connected Players:')
|
||||||
for network_player in args['players']:
|
for network_player in players:
|
||||||
if network_player.team != current_team:
|
if network_player.team != current_team:
|
||||||
logger.info(f' Team #{network_player.team + 1}')
|
logger.info(f' Team #{network_player.team + 1}')
|
||||||
current_team = network_player.team
|
current_team = network_player.team
|
||||||
|
|
|
@ -630,6 +630,7 @@ async def on_client_connected(ctx: Context, client: Client):
|
||||||
await ctx.send_msgs(client, [{
|
await ctx.send_msgs(client, [{
|
||||||
'cmd': 'RoomInfo',
|
'cmd': 'RoomInfo',
|
||||||
'password': bool(ctx.password),
|
'password': bool(ctx.password),
|
||||||
|
# TODO remove around 0.4
|
||||||
'players': players,
|
'players': players,
|
||||||
# TODO convert to list of games present in 0.4
|
# TODO convert to list of games present in 0.4
|
||||||
'games': [ctx.games[x] for x in range(1, len(ctx.games) + 1)],
|
'games': [ctx.games[x] for x in range(1, len(ctx.games) + 1)],
|
||||||
|
|
|
@ -63,7 +63,6 @@ Sent to clients when they connect to an Archipelago server.
|
||||||
| permissions | dict\[str, [Permission](#Permission)\[int\]\] | Mapping of permission name to [Permission](#Permission), keys are: "forfeit", "collect" and "remaining". |
|
| permissions | dict\[str, [Permission](#Permission)\[int\]\] | Mapping of permission name to [Permission](#Permission), keys are: "forfeit", "collect" and "remaining". |
|
||||||
| hint_cost | int | The amount of points it costs to receive a hint from the server. |
|
| hint_cost | int | The amount of points it costs to receive a hint from the server. |
|
||||||
| location_check_points | int | The amount of hint points you receive per item/location check completed. ||
|
| location_check_points | int | The amount of hint points you receive per item/location check completed. ||
|
||||||
| players | list\[[NetworkPlayer](#NetworkPlayer)\] | Sent only if the client is properly authenticated (see [Archipelago Connection Handshake](#Archipelago-Connection-Handshake)). Information on the players currently connected to the server. |
|
|
||||||
| games | list\[str\] | List of games present in this multiworld. |
|
| games | list\[str\] | List of games present in this multiworld. |
|
||||||
| datapackage_version | int | Sum of individual games' datapackage version. Deprecated. Use `datapackage_versions` instead. |
|
| datapackage_version | int | Sum of individual games' datapackage version. Deprecated. Use `datapackage_versions` instead. |
|
||||||
| datapackage_versions | dict\[str, int\] | Data versions of the individual games' data packages the server will send. Used to decide which games' caches are outdated. See [Data Package Contents](#Data-Package-Contents). |
|
| datapackage_versions | dict\[str, int\] | Data versions of the individual games' data packages the server will send. Used to decide which games' caches are outdated. See [Data Package Contents](#Data-Package-Contents). |
|
||||||
|
@ -146,7 +145,7 @@ The arguments for RoomUpdate are identical to [RoomInfo](#RoomInfo) barring:
|
||||||
| Name | Type | Notes |
|
| Name | Type | Notes |
|
||||||
| ---- | ---- | ----- |
|
| ---- | ---- | ----- |
|
||||||
| hint_points | int | New argument. The client's current hint points. |
|
| hint_points | int | New argument. The client's current hint points. |
|
||||||
| players | list\[[NetworkPlayer](#NetworkPlayer)\] | Changed argument. Always sends all players, whether connected or not. |
|
| players | list\[[NetworkPlayer](#NetworkPlayer)\] | Send in the event of an alias rename. Always sends all players, whether connected or not. |
|
||||||
| checked_locations | list\[int\] | May be a partial update, containing new locations that were checked, especially from a coop partner in the same slot. |
|
| checked_locations | list\[int\] | May be a partial update, containing new locations that were checked, especially from a coop partner in the same slot. |
|
||||||
| missing_locations | list\[int\] | Should never be sent as an update, if needed is the inverse of checked_locations. |
|
| missing_locations | list\[int\] | Should never be sent as an update, if needed is the inverse of checked_locations. |
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue