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