dfraw_json_parser 0.17.5

Library which parses Dwarf Fortress raw files into JSON
Documentation
use serde::{Deserialize, Serialize};

/// The tokens for the shrubs
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, Default, specta::Type)]
pub enum ShrubToken {
    /// The spring season
    Spring,
    /// The summer season
    Summer,
    /// The autumn season
    Autumn,
    /// The winter season
    Winter,
    /// The growth duration
    GrowDuration,
    /// The value of the shrub
    Value,
    /// The tile used for the shrub once it is picked
    PickedTile,
    /// The tile used for the shrub once it is dead and picked
    DeadPickedTile,
    /// The tile used for the shrub
    ShrubTile,
    /// The tile used for the dead shrub
    DeadShrubTile,
    /// The cluster size the shrubs will spawn in
    ClusterSize,
    /// The color of the shrub once it is picked
    PickedColor,
    /// The color of the shrub once it is dead and picked
    DeadPickedColor,
    /// The color of the shrub
    ShrubColor,
    /// The color of the dead shrub
    DeadShrubColor,
    /// The depth level the shrub will drown at
    ShrubDrownLevel,
    /// The shrub can be brewed
    Drink,
    /// The shrub can be milled
    Mill,
    /// The shrub can be spun
    Thread,
    /// The shrub has seeds
    Seed,
    /// The shrub can have a liquid extracted from it using a still and vial
    ExtractStillVial,
    /// The shrub can have a liquid extracted from it using a vial alone
    ExtractVial,
    /// The shrub can have a liquid extracted from it using a barrel
    ExtractBarrel,
    /// An unknown token
    #[default]
    Unknown,
}

/// The tokens for the seasons
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, Default, specta::Type)]
pub enum SeasonToken {
    /// The spring season
    Spring,
    /// The summer season
    Summer,
    /// The autumn season
    Autumn,
    /// The winter season
    Winter,
    /// An unknown season
    #[default]
    Unknown,
}