nil_payload/request/cheat/
military.rs1use bon::Builder;
5use nil_core::continent::Coord;
6use nil_core::military::army::personnel::ArmyPersonnel;
7use nil_core::ruler::Ruler;
8use nil_core::world::config::WorldId;
9use serde::{Deserialize, Serialize};
10
11#[cfg(feature = "typescript")]
12use ts_rs::TS;
13
14#[derive(Builder, Clone, Debug, Deserialize, Serialize)]
15#[serde(rename_all = "camelCase")]
16#[cfg_attr(feature = "typescript", derive(TS))]
17#[cfg_attr(feature = "typescript", ts(export))]
18pub struct CheatGetIdleArmiesAtRequest {
19 #[builder(start_fn, into)]
20 pub world: WorldId,
21 #[builder(into)]
22 pub coord: Coord,
23}
24
25#[derive(Builder, Clone, Debug, Deserialize, Serialize)]
26#[serde(rename_all = "camelCase")]
27#[cfg_attr(feature = "typescript", derive(TS))]
28#[cfg_attr(feature = "typescript", ts(export))]
29pub struct CheatGetIdlePersonnelAtRequest {
30 #[builder(start_fn, into)]
31 pub world: WorldId,
32 #[builder(into)]
33 pub coord: Coord,
34}
35
36#[derive(Builder, Clone, Debug, Deserialize, Serialize)]
37#[serde(rename_all = "camelCase")]
38#[cfg_attr(feature = "typescript", derive(TS))]
39#[cfg_attr(feature = "typescript", ts(export))]
40pub struct CheatGetManeuversRequest {
41 #[builder(start_fn, into)]
42 pub world: WorldId,
43}
44
45#[derive(Builder, Clone, Debug, Deserialize, Serialize)]
46#[serde(rename_all = "camelCase")]
47#[cfg_attr(feature = "typescript", derive(TS))]
48#[cfg_attr(feature = "typescript", ts(export, optional_fields = nullable))]
49pub struct CheatGetManeuversOfRequest {
50 #[builder(start_fn, into)]
51 pub world: WorldId,
52 #[serde(default)]
53 #[builder(into)]
54 pub ruler: Option<Ruler>,
55}
56
57#[derive(Builder, Clone, Debug, Deserialize, Serialize)]
58#[serde(rename_all = "camelCase")]
59#[cfg_attr(feature = "typescript", derive(TS))]
60#[cfg_attr(feature = "typescript", ts(export, optional_fields = nullable))]
61pub struct CheatSpawnPersonnelRequest {
62 #[builder(start_fn, into)]
63 pub world: WorldId,
64 #[builder(into)]
65 pub coord: Coord,
66 #[builder(into)]
67 pub personnel: ArmyPersonnel,
68 #[serde(default)]
69 #[builder(into)]
70 pub ruler: Option<Ruler>,
71}