@@ -99,6 +99,11 @@ in that spot and update its state through [lobby/updated](#updated).
9999A member simply spectating and not waiting to play will have a null ` joinQueuePosition ` .
100100To leave an ally team or the join queue and become a spectator, a user should use [ lobby/spectate] ( #spectate ) .
101101
102+ Clients can send a [ lobby/updateClientStatus] ( #updateClientStatus ) request to notify others if they are ready
103+ and if they need to download some assets, like engine, map or game. When a user becomes a player (at lobby creation,
104+ through ` joinAllyTeam ` or with the join queue), the server will automatically assign them a default status
105+ ` {"isReady": false, "assetStatus": "ready"} ` . If this is incorrect the client should send a request to correct it.
106+
102107
103108### Lobby updates
104109
@@ -136,6 +141,7 @@ In practice, this event should rarely be seen.
136141- [ unsubscribeList] ( #unsubscribelist )
137142- [ update] ( #update )
138143- [ updateBot] ( #updatebot )
144+ - [ updateClientStatus] ( #updateclientstatus )
139145- [ updated] ( #updated )
140146- [ voteEnded] ( #voteended )
141147- [ voteSubmit] ( #votesubmit )
@@ -2965,6 +2971,156 @@ Possible Failed Reasons: `not_in_lobby`, `invalid_bot`, `internal_error`, `unaut
29652971
29662972---
29672973
2974+ ## UpdateClientStatus
2975+
2976+ Update the player's status
2977+
2978+ - Endpoint Type: ** Request** -> ** Response**
2979+ - Source: ** User**
2980+ - Target: ** Server**
2981+ - Required Scopes: ` tachyon.lobby `
2982+
2983+ ### Request
2984+
2985+ <details >
2986+ <summary >JSONSchema</summary >
2987+
2988+ ``` json
2989+ {
2990+ "title" : " LobbyUpdateClientStatusRequest" ,
2991+ "tachyon" : {
2992+ "source" : " user" ,
2993+ "target" : " server" ,
2994+ "scopes" : [" tachyon.lobby" ]
2995+ },
2996+ "type" : " object" ,
2997+ "properties" : {
2998+ "type" : { "const" : " request" },
2999+ "messageId" : { "type" : " string" },
3000+ "commandId" : { "const" : " lobby/updateClientStatus" },
3001+ "data" : {
3002+ "title" : " LobbyUpdateClientStatusRequestData" ,
3003+ "type" : " object" ,
3004+ "properties" : {
3005+ "isReady" : { "type" : " boolean" },
3006+ "assetStatus" : { "enum" : [" missing" , " downloading" , " ready" ] }
3007+ }
3008+ }
3009+ },
3010+ "required" : [" type" , " messageId" , " commandId" , " data" ]
3011+ }
3012+
3013+ ```
3014+ </details >
3015+
3016+ <details >
3017+ <summary >Example</summary >
3018+
3019+ ``` json
3020+ {
3021+ "type" : " request" ,
3022+ "messageId" : " do" ,
3023+ "commandId" : " lobby/updateClientStatus" ,
3024+ "data" : {
3025+ "isReady" : false ,
3026+ "assetStatus" : " missing"
3027+ }
3028+ }
3029+ ```
3030+ </details >
3031+
3032+ #### TypeScript Definition
3033+ ``` ts
3034+ export interface LobbyUpdateClientStatusRequest {
3035+ type: " request" ;
3036+ messageId: string ;
3037+ commandId: " lobby/updateClientStatus" ;
3038+ data: LobbyUpdateClientStatusRequestData ;
3039+ }
3040+ export interface LobbyUpdateClientStatusRequestData {
3041+ isReady? : boolean ;
3042+ assetStatus? : " missing" | " downloading" | " ready" ;
3043+ }
3044+ ```
3045+ ### Response
3046+
3047+ <details >
3048+ <summary >JSONSchema</summary >
3049+
3050+ ``` json
3051+ {
3052+ "title" : " LobbyUpdateClientStatusResponse" ,
3053+ "tachyon" : {
3054+ "source" : " server" ,
3055+ "target" : " user" ,
3056+ "scopes" : [" tachyon.lobby" ]
3057+ },
3058+ "anyOf" : [
3059+ {
3060+ "title" : " LobbyUpdateClientStatusOkResponse" ,
3061+ "type" : " object" ,
3062+ "properties" : {
3063+ "type" : { "const" : " response" },
3064+ "messageId" : { "type" : " string" },
3065+ "commandId" : { "const" : " lobby/updateClientStatus" },
3066+ "status" : { "const" : " success" }
3067+ },
3068+ "required" : [" type" , " messageId" , " commandId" , " status" ]
3069+ },
3070+ {
3071+ "title" : " LobbyUpdateClientStatusFailResponse" ,
3072+ "type" : " object" ,
3073+ "properties" : {
3074+ "type" : { "const" : " response" },
3075+ "messageId" : { "type" : " string" },
3076+ "commandId" : { "const" : " lobby/updateClientStatus" },
3077+ "status" : { "const" : " failed" },
3078+ "reason" : {
3079+ "enum" : [
3080+ " not_in_lobby" ,
3081+ " not_a_player" ,
3082+ " internal_error" ,
3083+ " unauthorized" ,
3084+ " invalid_request" ,
3085+ " command_unimplemented"
3086+ ]
3087+ },
3088+ "details" : { "type" : " string" }
3089+ },
3090+ "required" : [" type" , " messageId" , " commandId" , " status" , " reason" ]
3091+ }
3092+ ]
3093+ }
3094+
3095+ ```
3096+ </details >
3097+
3098+ <details >
3099+ <summary >Example</summary >
3100+
3101+ ``` json
3102+ {
3103+ "type" : " response" ,
3104+ "messageId" : " in esse est cillum irure" ,
3105+ "commandId" : " lobby/updateClientStatus" ,
3106+ "status" : " success"
3107+ }
3108+ ```
3109+ </details >
3110+
3111+ #### TypeScript Definition
3112+ ``` ts
3113+ export interface LobbyUpdateClientStatusOkResponse {
3114+ type: " response" ;
3115+ messageId: string ;
3116+ commandId: " lobby/updateClientStatus" ;
3117+ status: " success" ;
3118+ }
3119+ ```
3120+ Possible Failed Reasons: ` not_in_lobby ` , ` not_a_player ` , ` internal_error ` , ` unauthorized ` , ` invalid_request ` , ` command_unimplemented `
3121+
3122+ ---
3123+
29683124## Updated
29693125
29703126Sent by the server whenever something in the lobby changes. Uses json patch (RFC-7386)
@@ -3057,7 +3213,15 @@ Sent by the server whenever something in the lobby changes. Uses json patch (RFC
30573213 },
30583214 "allyTeam" : { "type" : " string" },
30593215 "team" : { "type" : " string" },
3060- "player" : { "type" : " string" }
3216+ "player" : { "type" : " string" },
3217+ "isReady" : { "type" : " boolean" },
3218+ "assetStatus" : {
3219+ "enum" : [
3220+ " missing" ,
3221+ " downloading" ,
3222+ " ready"
3223+ ]
3224+ }
30613225 },
30623226 "required" : [" id" ]
30633227 },
@@ -3340,6 +3504,8 @@ export interface LobbyUpdatedEventData {
33403504 allyTeam? : string ;
33413505 team? : string ;
33423506 player? : string ;
3507+ isReady? : boolean ;
3508+ assetStatus? : " missing" | " downloading" | " ready" ;
33433509 } | null ;
33443510 };
33453511 spectators? : {
0 commit comments