vintage_schematics/convert/
mods.rs

1//! The set of supported mods.
2use serde::{Deserialize, Serialize};
3use strum::{EnumIter, EnumString, IntoStaticStr};
4
5#[derive(
6	Copy, Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, EnumIter, EnumString, IntoStaticStr, Serialize, Deserialize,
7)]
8pub enum Mod {
9	WoolAndMore,
10	Bricklayers,
11	VanillaVariants,
12	MaterialNeeds,
13}
14
15impl Mod {
16	#[must_use]
17	pub const fn name(self) -> &'static str {
18		match self {
19			Self::WoolAndMore => "Wool & More",
20			Self::Bricklayers => "Bricklayers",
21			Self::VanillaVariants => "Vanilla Variants",
22			Self::MaterialNeeds => "Material Needs",
23		}
24	}
25
26	#[must_use]
27	pub const fn url(self) -> &'static str {
28		match self {
29			Self::WoolAndMore => "https://mods.vintagestory.at/show/mod/14220",
30			Self::Bricklayers => "https://mods.vintagestory.at/bricklayers",
31			Self::VanillaVariants => "https://mods.vintagestory.at/vanvar",
32			Self::MaterialNeeds => "https://mods.vintagestory.at/materialneeds",
33		}
34	}
35
36	#[must_use]
37	pub const fn description(self) -> &'static str {
38		match self {
39			Self::WoolAndMore => "Adds more wool colours.",
40			Self::Bricklayers => "Adds stone and brick blocks.",
41			Self::VanillaVariants => "Adds variants of vanilla blocks.",
42			Self::MaterialNeeds => "Adds coloured plaster blocks.",
43		}
44	}
45}