initiative_core/world/place/region/geography/
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 GeographyType {
7    Archipelago,
8    Barrens,
9    Coastline,
10    Continent,
11    Desert,
12    Forest,
13    Jungle,
14    Lake,
15    Marsh,
16    Mesa,
17    Moor,
18    Mountain,
19    Ocean,
20    Plain,
21    Plateau,
22    Reef,
23    Sea,
24    Swamp,
25    Tundra,
26    Wasteland,
27    World,
28}
29
30impl GeographyType {
31    pub const fn get_emoji(&self) -> Option<&'static str> {
32        match self {
33            Self::Archipelago => Some("🏝"),
34            Self::Barrens | Self::Desert | Self::Wasteland => Some("🏜"),
35            Self::Coastline | Self::Lake | Self::Sea | Self::Ocean => Some("🌊"),
36            Self::Forest | Self::Jungle => Some("🌳"),
37            Self::Mountain => Some("⛰"),
38            Self::Tundra => Some("❄"),
39            Self::World => Some("🌐"),
40            Self::Continent
41            | Self::Marsh
42            | Self::Mesa
43            | Self::Moor
44            | Self::Plain
45            | Self::Plateau
46            | Self::Reef
47            | Self::Swamp => None,
48        }
49    }
50}