initiative_core/world/place/location/landmark/
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 LandmarkType {
7    Farm,
8    Fountain,
9    Garden,
10    Harbor,
11    Mine,
12    #[alias = "statue"]
13    Monument,
14    Ruin,
15    Street,
16    Wall,
17}
18
19impl LandmarkType {
20    pub const fn get_emoji(&self) -> Option<&'static str> {
21        match self {
22            Self::Farm | Self::Garden => Some("🌱"),
23            Self::Fountain => Some("⛲"),
24            Self::Harbor => Some("⛵"),
25            Self::Mine => Some("⚒"),
26            Self::Ruin => Some("🏚"),
27            Self::Street => Some("🏘"),
28            Self::Wall => Some("🧱"),
29            Self::Monument => Some("🗽"),
30        }
31    }
32}