Skip to main content

nil_payload/request/npc/
bot.rs

1// Copyright (C) Call of Nil contributors
2// SPDX-License-Identifier: AGPL-3.0-only
3
4use bon::Builder;
5use nil_core::npc::bot::BotId;
6use nil_core::world::config::WorldId;
7use serde::{Deserialize, Serialize};
8
9#[cfg(feature = "typescript")]
10use ts_rs::TS;
11
12#[derive(Builder, Clone, Debug, Deserialize, Serialize)]
13#[serde(rename_all = "camelCase")]
14#[cfg_attr(feature = "typescript", derive(TS))]
15#[cfg_attr(feature = "typescript", ts(export))]
16pub struct GetBotCoordsRequest {
17  pub world: WorldId,
18  #[builder(into)]
19  pub id: BotId,
20}
21
22#[derive(Builder, Clone, Debug, Deserialize, Serialize)]
23#[serde(rename_all = "camelCase")]
24#[cfg_attr(feature = "typescript", derive(TS))]
25#[cfg_attr(feature = "typescript", ts(export))]
26pub struct GetPublicBotRequest {
27  pub world: WorldId,
28  #[builder(into)]
29  pub id: BotId,
30}
31
32#[derive(Builder, Clone, Debug, Deserialize, Serialize)]
33#[serde(rename_all = "camelCase")]
34#[cfg_attr(feature = "typescript", derive(TS))]
35#[cfg_attr(feature = "typescript", ts(export))]
36pub struct GetPublicBotsRequest {
37  pub world: WorldId,
38}