From 0971ffd15008f83e35ac52d945672dd1c2c9db56 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Wed, 23 Dec 2020 12:37:31 -0700 Subject: [PATCH] Combine the JoinTeam event to the UpdatePlayer event --- server/docs/events/JoinTeam.md | 14 -------------- server/docs/events/UpdatePlayer.md | 8 ++++++-- 2 files changed, 6 insertions(+), 16 deletions(-) delete mode 100644 server/docs/events/JoinTeam.md diff --git a/server/docs/events/JoinTeam.md b/server/docs/events/JoinTeam.md deleted file mode 100644 index 3657caa..0000000 --- a/server/docs/events/JoinTeam.md +++ /dev/null @@ -1,14 +0,0 @@ -# `JoinTeam`: - -## Description: -This event is triggered by the client when the user attempts to join a team from the lobby. - -## Request Payload: -| Property | Type | Description -| -------- | ---- | ----------- -| team | int | The team to join. Accepted values are: `1`, and `2`, any other value will throw an error. -| role | String | The role the player is assuming. This can be `"writer"` or `"guesser"`, any other value will throw an error. - -## Response Payload: (`JoinTeam`) -| Property | Type | Description -| -------- | ---- | ----------- \ No newline at end of file diff --git a/server/docs/events/UpdatePlayer.md b/server/docs/events/UpdatePlayer.md index 18e10a6..74f6772 100644 --- a/server/docs/events/UpdatePlayer.md +++ b/server/docs/events/UpdatePlayer.md @@ -1,10 +1,14 @@ # `UpdatePlayer`: ## Description: -This event is sent from the server and is a result of a player joining/changing team, this event is also fired when a new player joins the game. +This event is sent as a result of a player joining/changing team, this event is also fired when a new player joins the game. The client sends the event to update what team/role they are on. ## Request Payload: -The client cannot send this event and only receives it. +| Property | Type | Description +| -------- | ---- | ----------- +| name | String | The player's name +| team | Integer | The team to join. Accepted values are: `1`, and `2`, any other value will throw an error. +| role | String | The role the player is assuming. This can be `"writer"` or `"guesser"`, any other value will throw an error. ## Response Payload: | Property | Type | Description