initiative_core/world/place/building/travel/
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 TravelType {
7    Bridge,
8    DutyHouse,
9    Ferry,
10    Gate,
11    Lighthouse,
12    Market,
13    Pier,
14    Portal,
15    Shipyard,
16}
17
18impl TravelType {
19    pub const fn get_emoji(&self) -> Option<&'static str> {
20        match self {
21            Self::Bridge => Some("🌉"),
22            Self::DutyHouse | Self::Market => Some("🪙"),
23            Self::Ferry => Some("â›´"),
24            Self::Gate => Some("🚪"),
25            Self::Lighthouse | Self::Pier | Self::Shipyard => Some("⛵"),
26            Self::Portal => None,
27        }
28    }
29}