initiative_core/world/place/building/government/
mod.rs

1use initiative_macros::WordList;
2use serde::{Deserialize, Serialize};
3
4#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize, WordList)]
5#[serde(into = "&'static str", try_from = "&str")]
6pub enum GovernmentType {
7    Court,
8    // Dungeon,
9    Embassy,
10    #[alias = "watch-house"]
11    Guardhouse,
12    Palace,
13    #[alias = "jail"]
14    Prison,
15}
16
17impl GovernmentType {
18    pub const fn get_emoji(&self) -> Option<&'static str> {
19        match self {
20            Self::Embassy => Some("🚩"),
21            Self::Guardhouse | Self::Prison => Some("🛡"),
22            Self::Court | Self::Palace => Some("🏰"),
23        }
24    }
25}