|
|
@ -3,6 +3,7 @@ use serde::{Serialize, Deserialize}; |
|
|
|
use std::collections::HashMap;
|
|
|
|
use thiserror::Error;
|
|
|
|
use crate::ship::room::Episode;
|
|
|
|
use std::fmt;
|
|
|
|
|
|
|
|
#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize)]
|
|
|
|
pub enum MapArea {
|
|
|
@ -256,6 +257,60 @@ impl MapArea { |
|
|
|
MapArea::SaintMillion => Episode::Four,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn as_string(&self) -> &str{
|
|
|
|
match self {
|
|
|
|
MapArea::Pioneer2Ep1 => "Pioneer 2",
|
|
|
|
MapArea::Forest1 => "Forest 1",
|
|
|
|
MapArea::Forest2 => "Forest 2",
|
|
|
|
MapArea::Caves1 => "Caves 1",
|
|
|
|
MapArea::Caves2 => "Caves 2",
|
|
|
|
MapArea::Caves3 => "Caves 3",
|
|
|
|
MapArea::Mines1 => "Mines 1",
|
|
|
|
MapArea::Mines2 => "Mines 2",
|
|
|
|
MapArea::Ruins1 => "Ruins 1",
|
|
|
|
MapArea::Ruins2 => "Ruins 2",
|
|
|
|
MapArea::Ruins3 => "Ruins 3",
|
|
|
|
MapArea::Dragon => "Dragon",
|
|
|
|
MapArea::DeRolLe => "De Rol Le",
|
|
|
|
MapArea::VolOpt => "Vol Opt",
|
|
|
|
MapArea::DarkFalz => "Dark Falz",
|
|
|
|
MapArea::Pioneer2Ep2 => "Pioneer 2",
|
|
|
|
MapArea::VrTempleAlpha => "Vr Temple Alpha",
|
|
|
|
MapArea::VrTempleBeta => "Vr Temple Beta",
|
|
|
|
MapArea::VrSpaceshipAlpha => "Vr Spaceship Alpha",
|
|
|
|
MapArea::VrSpaceshipBeta => "Vr Spaceship Beta",
|
|
|
|
MapArea::Cca => "CCA",
|
|
|
|
MapArea::JungleAreaNorth => "Jungle Area North",
|
|
|
|
MapArea::JungleAreaEast => "Jungle Area East",
|
|
|
|
MapArea::Mountain => "Mountain",
|
|
|
|
MapArea::Seaside => "Seaside",
|
|
|
|
MapArea::SeabedUpper => "Seabed Upper",
|
|
|
|
MapArea::SeabedLower => "Seabed Lower",
|
|
|
|
MapArea::GalGryphon => "Gal Gryphon",
|
|
|
|
MapArea::OlgaFlow => "Olga Flow",
|
|
|
|
MapArea::BarbaRay => "Barba Ray",
|
|
|
|
MapArea::GolDragon => "Gol Dragon",
|
|
|
|
MapArea::SeasideNight => "Seaside Night",
|
|
|
|
MapArea::Tower => "Tower",
|
|
|
|
MapArea::Pioneer2Ep4 => "Pioneer 2",
|
|
|
|
MapArea::CraterEast => "Crater East",
|
|
|
|
MapArea::CraterWest => "Crater West",
|
|
|
|
MapArea::CraterSouth => "Crater South",
|
|
|
|
MapArea::CraterNorth => "Crater North",
|
|
|
|
MapArea::CraterInterior => "Crater Interior",
|
|
|
|
MapArea::SubDesert1 => "Sub Desert 1",
|
|
|
|
MapArea::SubDesert2 => "Sub Desert 2",
|
|
|
|
MapArea::SubDesert3 => "Sub Desert 3",
|
|
|
|
MapArea::SaintMillion => "Saint Million",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl fmt::Display for MapArea {
|
|
|
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
|
|
write!(f, "{}", self.as_string())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|