Secret-Hitler-Online-Server/docs/events.html
2020-10-21 21:43:44 -06:00

236 lines
No EOL
5.4 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Secret Hitler Online Documentation</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/dark.min.css">
</head>
<body style="max-width: 1000px;">
<h2 id="legend">Legend For Sources:</h2>
<ul>
<li>Origin - The client that triggered the server-side event</li>
<li>Room - All connected clients to the game</li>
<li>Others - All connected clients to the game, except the Origin</li>
<li>Not Sent - This indicates that the event is not sent clients at all</li>
<li>Fascist - This is only received by the fascist players</li>
<li>Liberal - This is only received by the liberal players</li>
<li>President - This is only received by the currently active president</li>
<li>Chancellor - This is only received by the currently active chancellor</li>
</ul>
<hr>
<h2 id="events">Event List:</h2>
<table>
<thead>
<tr>
<td>Event From Client</td>
<td>Response Event</td>
<td>Response Sent To</td>
<td colspan="2">Description</td>
</tr>
</thead>
<tbody>
<tr>
<td><code><a href="#">ChancellorNomination</a></code></td>
<td><code><a href="#"></a></code></td>
<td>
Success:
<br>
Fail:
</td>
<td colspan="2"></td>
</tr>
<tr>
<td><code><a href="#">ChancellorPolicy</a></code></td>
<td><code><a href="#"></a></code></td>
<td>
Success:
<br>
Fail:
</td>
<td colspan="2"></td>
</tr>
<tr>
<td><code><a href="#">ExecutePlayer</a></code></td>
<td><code><a href="#"></a></code></td>
<td>
Success:
<br>
Fail:
</td>
<td colspan="2"></td>
</tr>
<tr>
<td><code><a href="#">ExecutiveConfirmation</a></code></td>
<td><code><a href="#"></a></code></td>
<td>
Success:
<br>
Fail:
</td>
<td colspan="2"></td>
</tr>
<tr>
<td><code><a href="#">GetPlayerList</a></code></td>
<td><code><a href="#">PlayerList</a></code></td>
<td>
Success: Origin
<br>
Fail: Origin
</td>
<td colspan="2">
This is just to get the list of players, there's nothing
else to it.
</td>
</tr>
<tr>
<td><code><a href="#">HostGame</a></code></td>
<td><code><a href="#">HostInformation</a></code></td>
<td>
Success: Origin
<br>
Fail: Origin
</td>
<td colspan="2">Creates a game. This will rarely ever fail.</td>
</tr>
<tr>
<td><code><a href="#">InvestigateParty</a></code></td>
<td><code><a href="#"></a></code></td>
<td>
Success:
<br>
Fail:
</td>
<td colspan="2"></td>
</tr>
<tr>
<td><code><a href="#">JoinGame</a></code></td>
<td><code><a href="#">GameJoined</a></code></td>
<td>
Success: Origin
<br>
Fail: Origin
</td>
<td colspan="2">
Indicates if the client joined a game or not.
</td>
</tr>
<tr>
<td><code><a href="#">JoinGame</a></code></td>
<td><code><a href="#">NewPlayer</a></code></td>
<td>
Success: Others
<br>
Fail: Not Sent
</td>
<td colspan="2">
Alerts players already in the game of the newly joined
player.
</td>
</tr>
<tr>
<td><code><a href="#">RemovePlayer</a></code></td>
<td><code><a href="#">PlayerRemoved</a></code></td>
<td>
Success: Room
<br>
Fail: Origin
</td>
<td colspan="2">
When the host kicks a player from the lobby this event is
sent out to alert all the players of the player's removal
so the UI can be updated as needed.
</td>
</tr>
<tr>
<td><code><a href="#">KillGame</a></code></td>
<td><code><a href="#">GameKilled</a></code></td>
<td>
Success: Room
<br>
Fail: Origin
</td>
<td colspan="2">
This event is sent out to everyone in the room when the host
leaves the game.
</td>
</tr>
<tr>
<td><code><a href="#">NextPresident</a></code></td>
<td><code><a href="#"></a></code></td>
<td>
Success:
<br>
Fail:
</td>
<td colspan="2"></td>
</tr>
<tr>
<td><code><a href="#">PresidentPolicies</a></code></td>
<td><code><a href="#"></a></code></td>
<td>
Success:
<br>
Fail:
</td>
<td colspan="2"></td>
</tr>
<tr>
<td><code><a href="#">StartGame</a></code></td>
<td><code><a href="#">Starting</a></code></td>
<td>
Success: Room
<br>
Fail: Origin
</td>
<td colspan="2">
This is in response to the host attempting to start the
game. If this is successful, we are then begining into the
game loop.
</td>
</tr>
<tr>
<td><code><a href="#">VetoConfirm</a></code></td>
<td><code><a href="#"></a></code></td>
<td>
Success:
<br>
Fail:
</td>
<td colspan="2"></td>
</tr>
<tr>
<td><code><a href="#">VetoRequest</a></code></td>
<td><code><a href="#"></a></code></td>
<td>
Success:
<br>
Fail:
</td>
<td colspan="2"></td>
</tr>
<tr>
<td><code><a href="#">Vote</a></code></td>
<td><code><a href="#"></a></code></td>
<td>
Success:
<br>
Fail:
</td>
<td colspan="2"></td>
</tr>
<tr hidden>
<td><code><a href="#"></a></code></td>
<td><code><a href="#"></a></code></td>
<td>
Success:
<br>
Fail:
</td>
<td colspan="2"></td>
</tr>
</tbody>
</table>
</body>
</html>