nil_payload/request/cheat/
npc.rs1use bon::Builder;
5use nil_core::ethic::Ethics;
6use nil_core::infrastructure::Infrastructure;
7use nil_core::npc::bot::BotId;
8use nil_core::ruler::Ruler;
9use nil_core::world::config::WorldId;
10use serde::{Deserialize, Serialize};
11
12#[cfg(feature = "typescript")]
13use ts_rs::TS;
14
15#[derive(Builder, Clone, Debug, Deserialize, Serialize)]
16#[serde(rename_all = "camelCase")]
17#[cfg_attr(feature = "typescript", derive(TS))]
18#[cfg_attr(feature = "typescript", ts(export))]
19pub struct CheatGetEthicsRequest {
20 pub world: WorldId,
21 #[builder(into)]
22 pub ruler: Ruler,
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, optional_fields = nullable))]
29pub struct CheatSetBotEthicsRequest {
30 pub world: WorldId,
31 #[builder(into)]
32 pub id: BotId,
33 #[serde(default)]
34 #[builder(into)]
35 pub ethics: Option<Ethics>,
36}
37
38#[derive(Builder, Clone, Debug, Deserialize, Serialize)]
39#[serde(rename_all = "camelCase")]
40#[cfg_attr(feature = "typescript", derive(TS))]
41#[cfg_attr(feature = "typescript", ts(export, optional_fields = nullable))]
42pub struct CheatSpawnBotRequest {
43 pub world: WorldId,
44 pub name: String,
45 #[serde(default)]
46 pub infrastructure: Option<Infrastructure>,
47}