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  #[builder(start_fn, into)]
18  pub world: WorldId,
19  #[builder(into)]
20  pub id: BotId,
21}
22
23#[derive(Builder, Clone, Debug, Deserialize, Serialize)]
24#[serde(rename_all = "camelCase")]
25#[cfg_attr(feature = "typescript", derive(TS))]
26#[cfg_attr(feature = "typescript", ts(export))]
27pub struct GetPublicBotRequest {
28  #[builder(start_fn, into)]
29  pub world: WorldId,
30  #[builder(into)]
31  pub id: BotId,
32}
33
34#[derive(Builder, Clone, Debug, Deserialize, Serialize)]
35#[serde(rename_all = "camelCase")]
36#[cfg_attr(feature = "typescript", derive(TS))]
37#[cfg_attr(feature = "typescript", ts(export))]
38pub struct GetPublicBotsRequest {
39  #[builder(start_fn, into)]
40  pub world: WorldId,
41}