Skip to main content

nil_payload/request/
round.rs

1// Copyright (C) Call of Nil contributors
2// SPDX-License-Identifier: AGPL-3.0-only
3
4use nil_core::world::config::WorldId;
5use serde::{Deserialize, Serialize};
6
7#[cfg(feature = "typescript")]
8use ts_rs::TS;
9
10#[derive(Clone, Debug, Deserialize, Serialize)]
11#[serde(rename_all = "camelCase")]
12#[cfg_attr(feature = "typescript", derive(TS))]
13#[cfg_attr(feature = "typescript", ts(export))]
14pub struct GetRoundRequest {
15  pub world: WorldId,
16}
17
18#[derive(Clone, Debug, Deserialize, Serialize)]
19#[serde(rename_all = "camelCase")]
20#[cfg_attr(feature = "typescript", derive(TS))]
21#[cfg_attr(feature = "typescript", ts(export))]
22pub struct SetPlayerReadyRequest {
23  pub world: WorldId,
24  pub is_ready: bool,
25}
26
27#[derive(Clone, Debug, Deserialize, Serialize)]
28#[serde(rename_all = "camelCase")]
29#[cfg_attr(feature = "typescript", derive(TS))]
30#[cfg_attr(feature = "typescript", ts(export))]
31pub struct StartRoundRequest {
32  pub world: WorldId,
33}