Skip to main content

nil_payload/response/cheat/
npc.rs

1// Copyright (C) Call of Nil contributors
2// SPDX-License-Identifier: AGPL-3.0-only
3
4use derive_more::{Deref, DerefMut, From, Into};
5use nil_core::ethic::Ethics;
6use nil_core::npc::bot::BotId;
7use serde::{Deserialize, Serialize};
8
9#[cfg(feature = "axum")]
10use nil_payload_macros::IntoJsonResponse;
11
12#[cfg(feature = "typescript")]
13use ts_rs::TS;
14
15#[derive(Clone, Debug, Deref, DerefMut, From, Into, Deserialize, Serialize)]
16#[cfg_attr(feature = "axum", derive(IntoJsonResponse))]
17#[cfg_attr(feature = "typescript", derive(TS))]
18#[cfg_attr(feature = "typescript", ts(export))]
19pub struct CheatGetEthicsResponse(pub Option<Ethics>);
20
21#[derive(Clone, Debug, Deref, DerefMut, From, Into, Deserialize, Serialize)]
22#[cfg_attr(feature = "axum", derive(IntoJsonResponse))]
23#[cfg_attr(feature = "typescript", derive(TS))]
24#[cfg_attr(feature = "typescript", ts(export))]
25pub struct CheatSpawnBotResponse(pub BotId);