Skip to main content

nil_payload/cheat/
npc.rs

1// Copyright (C) Call of Nil contributors
2// SPDX-License-Identifier: AGPL-3.0-only
3
4use nil_core::ethic::Ethics;
5use nil_core::infrastructure::Infrastructure;
6use nil_core::npc::bot::BotId;
7use nil_core::ruler::Ruler;
8use nil_core::world::config::WorldId;
9use serde::{Deserialize, Serialize};
10
11#[derive(Clone, Debug, Deserialize, Serialize)]
12#[serde(rename_all = "camelCase")]
13pub struct CheatGetEthicsRequest {
14  pub world: WorldId,
15  pub ruler: Ruler,
16}
17
18#[derive(Clone, Debug, Deserialize, Serialize)]
19#[serde(rename_all = "camelCase")]
20pub struct CheatSetBotEthicsRequest {
21  pub world: WorldId,
22  pub id: BotId,
23  #[serde(default)]
24  pub ethics: Option<Ethics>,
25}
26
27#[derive(Clone, Debug, Deserialize, Serialize)]
28#[serde(rename_all = "camelCase")]
29pub struct CheatSpawnBotRequest {
30  pub world: WorldId,
31  pub name: String,
32  #[serde(default)]
33  pub infrastructure: Option<Infrastructure>,
34}