nil_payload/request/cheat/
player.rs1use bon::Builder;
5use nil_core::player::PlayerId;
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, optional_fields = nullable))]
13pub struct CheatGetPlayerRequest {
14 #[builder(start_fn, into)]
15 pub world: WorldId,
16 #[serde(default)]
17 #[builder(into)]
18 pub player: Option<PlayerId>,
19}
20
21#[derive(Builder, Clone, Debug, Deserialize, Serialize)]
22#[serde(rename_all = "camelCase")]
23#[cfg_attr(feature = "typescript", derive(ts_rs::TS))]
24#[cfg_attr(feature = "typescript", ts(export))]
25pub struct CheatGetPlayersRequest {
26 #[builder(start_fn, into)]
27 pub world: WorldId,
28}