pub const TERRAINS: [&str; 9] = [
"flat",
"ledge",
"cliff",
"slope",
"dune",
"shore",
"rooftop",
"cave_floor",
"water",
];
pub const SURFACES: [&str; 8] = [
"rock", "snow", "sand", "grass", "wood", "roof", "water", "ice",
];
pub const WEATHERS: [&str; 8] = [
"none",
"dust",
"snow",
"rain",
"fireflies",
"leaves",
"stars",
"confetti",
];
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct ArchetypeInfo {
pub id: &'static str,
pub implemented: bool,
pub terrain: &'static [&'static str],
pub surface: &'static [&'static str],
pub weather: &'static [&'static str],
pub platforms: &'static [&'static str],
}
pub const ARCHETYPE_INFO: [ArchetypeInfo; 9] = [
ArchetypeInfo {
id: "canyon",
implemented: true,
terrain: &["ledge", "cliff"],
surface: &["rock"],
weather: &["none"],
platforms: &["rock_ledge"],
},
ArchetypeInfo {
id: "forest",
implemented: false,
terrain: &["flat", "ledge"],
surface: &["grass", "wood"],
weather: &["none", "fireflies", "leaves", "rain"],
platforms: &["log", "tree_branch"],
},
ArchetypeInfo {
id: "mountains",
implemented: false,
terrain: &["ledge", "cliff", "slope"],
surface: &["rock", "snow"],
weather: &["none", "snow", "stars"],
platforms: &["rock_ledge"],
},
ArchetypeInfo {
id: "shore",
implemented: false,
terrain: &["shore", "water", "flat"],
surface: &["sand", "wood", "water"],
weather: &["none", "rain", "stars"],
platforms: &["pier"],
},
ArchetypeInfo {
id: "city_rooftops",
implemented: false,
terrain: &["rooftop", "flat"],
surface: &["roof"],
weather: &["none", "rain", "stars", "confetti"],
platforms: &["rooftop_edge"],
},
ArchetypeInfo {
id: "desert",
implemented: false,
terrain: &["dune", "slope", "flat"],
surface: &["sand"],
weather: &["none", "dust", "stars"],
platforms: &["dune_crest"],
},
ArchetypeInfo {
id: "snowfield",
implemented: false,
terrain: &["slope", "flat", "ledge"],
surface: &["snow", "ice"],
weather: &["none", "snow", "stars"],
platforms: &["ice_shelf"],
},
ArchetypeInfo {
id: "night_sky",
implemented: false,
terrain: &["ledge", "flat"],
surface: &["rock", "grass"],
weather: &["none", "stars"],
platforms: &["floating_island", "rock_ledge"],
},
ArchetypeInfo {
id: "cave",
implemented: false,
terrain: &["cave_floor", "ledge"],
surface: &["rock"],
weather: &["none", "dust"],
platforms: &["rock_ledge"],
},
];
pub fn archetype(id: &str) -> Option<&'static ArchetypeInfo> {
ARCHETYPE_INFO.iter().find(|a| a.id == id)
}