civ_map_generator 0.1.10

A civilization map generator
Documentation
use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct TechColumn {
    /// The column number of the tech in the tech tree.
    ///
    /// It starts at 0. So the total columns which the tech tree has will be the maximum column number + 1.
    pub column_number: u8,
    pub era: String,
    pub tech_cost: u32,
    pub building_cost: u32,
    pub wonder_cost: u32,
    pub techs: Vec<TechnologyInfo>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct TechnologyInfo {
    pub name: String,
    #[serde(default)]
    pub cost: u32,
    /// The row number of the tech in the tech tree.
    ///
    /// It starts at 1. So the total rows which the tech tree has will be the maximum row number.
    pub row: u8,
    #[serde(default)]
    pub column: u8,
    #[serde(default)]
    pub era: String,
    #[serde(default)]
    pub uniques: Vec<String>,
    #[serde(default)]
    pub prerequisites: Vec<String>,
    pub quote: String,
}