Skip to main content

nil_server_types/
world.rs

1// Copyright (C) Call of Nil contributors
2// SPDX-License-Identifier: AGPL-3.0-only
3
4use crate::round::RoundDuration;
5use jiff::Zoned;
6use nil_core::continent::ContinentSize;
7use nil_core::player::PlayerId;
8use nil_core::round::RoundId;
9use nil_core::world::config::WorldConfig;
10use serde::{Deserialize, Serialize};
11
12#[derive(Clone, Debug, Deserialize, Serialize)]
13#[serde(rename_all = "camelCase")]
14pub struct RemoteWorld {
15  pub config: WorldConfig,
16  pub description: Option<String>,
17  pub created_by: PlayerId,
18  pub created_at: Zoned,
19  pub updated_at: Zoned,
20  pub has_password: bool,
21  pub current_round: RoundId,
22  pub round_duration: Option<RoundDuration>,
23  pub active_players: usize,
24  pub total_players: usize,
25  pub continent_size: ContinentSize,
26}