Skip to main content

nil_payload/request/
continent.rs

1// Copyright (C) Call of Nil contributors
2// SPDX-License-Identifier: AGPL-3.0-only
3
4use nil_core::continent::Coord;
5use nil_core::world::config::WorldId;
6use serde::{Deserialize, Serialize};
7
8#[cfg(feature = "typescript")]
9use ts_rs::TS;
10
11#[derive(Clone, Debug, Deserialize, Serialize)]
12#[serde(rename_all = "camelCase")]
13#[cfg_attr(feature = "typescript", derive(TS))]
14#[cfg_attr(feature = "typescript", ts(export))]
15pub struct GetContinentSizeRequest {
16  pub world: WorldId,
17}
18
19#[derive(Clone, Debug, Deserialize, Serialize)]
20#[serde(rename_all = "camelCase")]
21#[cfg_attr(feature = "typescript", derive(TS))]
22#[cfg_attr(feature = "typescript", ts(export))]
23pub struct GetPublicFieldRequest {
24  pub world: WorldId,
25  pub coord: Coord,
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 GetPublicFieldsRequest {
32  pub world: WorldId,
33  pub coords: Vec<Coord>,
34}