Skip to main content

artifacts/models/
gathering_skill.rs

1use crate::models;
2use serde::{Deserialize, Serialize};
3
4#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
5#[cfg_attr(feature = "specta", derive(specta::Type))]
6#[derive(Default)]
7pub enum GatheringSkill {
8    #[serde(rename = "mining")]
9    #[default]
10    Mining,
11    #[serde(rename = "woodcutting")]
12    Woodcutting,
13    #[serde(rename = "fishing")]
14    Fishing,
15    #[serde(rename = "alchemy")]
16    Alchemy,
17}
18
19impl std::fmt::Display for GatheringSkill {
20    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
21        match self {
22            Self::Mining => write!(f, "mining"),
23            Self::Woodcutting => write!(f, "woodcutting"),
24            Self::Fishing => write!(f, "fishing"),
25            Self::Alchemy => write!(f, "alchemy"),
26        }
27    }
28}