1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
use initiative_macros::WordList;
use serde::{Deserialize, Serialize};

#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize, WordList)]
#[serde(into = "&'static str", try_from = "&str")]
pub enum TravelType {
    Bridge,
    DutyHouse,
    Ferry,
    Gate,
    Lighthouse,
    Market,
    Pier,
    Portal,
    Shipyard,
}

impl TravelType {
    pub const fn get_emoji(&self) -> Option<&'static str> {
        match self {
            Self::Bridge => Some("🌉"),
            Self::DutyHouse | Self::Market => Some("🪙"),
            Self::Ferry => Some("â›´"),
            Self::Gate => Some("🚪"),
            Self::Lighthouse | Self::Pier | Self::Shipyard => Some("⛵"),
            Self::Portal => None,
        }
    }
}