| ... | ... | @@ -225,6 +225,29 @@ |
|
|
|
</details>
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
### Game Pause Changed
|
|
|
|
| Socket | Description | User | Emitters |
|
|
|
|
|--------|-------------|------|----------|
|
|
|
|
| `gamePauseChanged` | Listener will trigger when the rooms pause status changes. | All | [`pauseGame`](#pause-game) |
|
|
|
|
|
|
|
|
<details>
|
|
|
|
<summary><b>Response</b></summary>
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
statusCode: 200,
|
|
|
|
message: '"The challenge room state chanded to paused" or "The challenge room state chanded to unpaused"',
|
|
|
|
isPaused: boolean,
|
|
|
|
challengeStartDate: "string (timestamp)",
|
|
|
|
challengeEndDate: "string (timestamp)",
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
</details>
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
<br>
|
| ... | ... | @@ -335,3 +358,24 @@ Requires `token`. |
|
|
|
Requires gamemaster `token`.
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
### Pause Game
|
|
|
|
| Socket | Description | User | Listeners |
|
|
|
|
|--------|-------------|------|-----------|
|
|
|
|
| `pauseGame` | Changes challenge room's pause status and extends game times with given pause time. | Gamemaster | [`gamePauseChanged`](#game-pause-changed)
|
|
|
|
|
|
|
|
<details>
|
|
|
|
<summary><b>Required payload</b></summary>
|
|
|
|
|
|
|
|
Requires gamemaster `token`.
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
isPaused: boolean,
|
|
|
|
pauseTime: number (millisecods)
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
</details>
|
|
|
|
|
|
|
|
--- |