From 7a1a20db532f6946427cf4adbab5ee31a9787ead Mon Sep 17 00:00:00 2001 From: andy Date: Sat, 24 Jul 2021 00:42:14 +0000 Subject: [PATCH] imagine reading the warning message wrongly. not me --- src/ship/map/area.rs | 48 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/src/ship/map/area.rs b/src/ship/map/area.rs index a26aa19..2b686ce 100644 --- a/src/ship/map/area.rs +++ b/src/ship/map/area.rs @@ -208,6 +208,54 @@ impl MapArea { // MapArea::TestMapEp4 => 10, } } + + pub fn to_episode(self) -> Episode { + match self { + MapArea::Pioneer2Ep1 => Episode::One, + MapArea::Forest1 => Episode::One, + MapArea::Forest2 => Episode::One, + MapArea::Caves1 => Episode::One, + MapArea::Caves2 => Episode::One, + MapArea::Caves3 => Episode::One, + MapArea::Mines1 => Episode::One, + MapArea::Mines2 => Episode::One, + MapArea::Ruins1 => Episode::One, + MapArea::Ruins2 => Episode::One, + MapArea::Ruins3 => Episode::One, + MapArea::Dragon => Episode::One, + MapArea::DeRolLe => Episode::One, + MapArea::VolOpt => Episode::One, + MapArea::DarkFalz => Episode::One, + MapArea::Pioneer2Ep2 => Episode::Two, + MapArea::VrTempleAlpha => Episode::Two, + MapArea::VrTempleBeta => Episode::Two, + MapArea::VrSpaceshipAlpha => Episode::Two, + MapArea::VrSpaceshipBeta => Episode::Two, + MapArea::Cca => Episode::Two, + MapArea::JungleAreaNorth => Episode::Two, + MapArea::JungleAreaEast => Episode::Two, + MapArea::Mountain => Episode::Two, + MapArea::Seaside => Episode::Two, + MapArea::SeabedUpper => Episode::Two, + MapArea::SeabedLower => Episode::Two, + MapArea::GalGryphon => Episode::Two, + MapArea::OlgaFlow => Episode::Two, + MapArea::BarbaRay => Episode::Two, + MapArea::GolDragon => Episode::Two, + MapArea::SeasideNight => Episode::Two, + MapArea::Tower => Episode::Two, + MapArea::Pioneer2Ep4 => Episode::Four, + MapArea::CraterEast => Episode::Four, + MapArea::CraterWest => Episode::Four, + MapArea::CraterSouth => Episode::Four, + MapArea::CraterNorth => Episode::Four, + MapArea::CraterInterior => Episode::Four, + MapArea::SubDesert1 => Episode::Four, + MapArea::SubDesert2 => Episode::Four, + MapArea::SubDesert3 => Episode::Four, + MapArea::SaintMillion => Episode::Four, + } + } }