1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
use serde::{Deserialize, Serialize};

use abstutil::MapName;
use geom::Duration;
use map_model::osm;

#[derive(Serialize, Deserialize, PartialEq, Clone)]
pub struct Level {
    pub title: String,
    pub description: String,
    pub map: MapName,
    pub music: String,
    pub start: osm::NodeID,
    pub minimap_zoom: usize,
    pub time_limit: Duration,
    pub goal: usize,

    pub unlock_upzones: usize,
    pub unlock_vehicles: Vec<String>,
}

impl Level {
    pub fn all() -> Vec<Level> {
        vec![
            Level {
                title: "University District".to_string(),
                description: "Tear yourself away from all the bubble tea to deliver presents to \
                              some college students, whether they've been naughty or nice."
                    .to_string(),
                map: MapName::seattle("udistrict_ravenna"),
                music: "jingle_bells".to_string(),
                start: osm::NodeID(53162661),
                minimap_zoom: 1,
                time_limit: Duration::seconds(90.0),
                goal: 1000,

                unlock_upzones: 1,
                unlock_vehicles: vec!["sleigh".to_string()],
            },
            Level {
                title: "Wallingfjord".to_string(),
                description: "Stone and 45th have food aplenty, but can you manage deliveries to \
                              everyone tucked away in the neighborhood?"
                    .to_string(),
                map: MapName::seattle("wallingford"),
                music: "silent_night".to_string(),
                start: osm::NodeID(53218389),
                minimap_zoom: 2,
                time_limit: Duration::seconds(90.0),
                goal: 25,

                unlock_upzones: 2,
                unlock_vehicles: vec!["cargo bike".to_string()],
            },
            // TODO Super dense, starting point isn't even near apartments, run out of gifts after
            // a few buildings. Unexpectedly hard!
            Level {
                title: "South Pole Union".to_string(),
                description: "Don't get turned around in all of the construction while you \
                              deliver to the apartments here!"
                    .to_string(),
                map: MapName::seattle("slu"),
                music: "carol_bells".to_string(),
                start: osm::NodeID(53142423),
                minimap_zoom: 1,
                time_limit: Duration::seconds(90.0),
                goal: 25,

                unlock_upzones: 2,
                unlock_vehicles: vec![],
            },
            Level {
                title: "Montlake".to_string(),
                description: "With the Montlake Market closed, how will you manage to bring cheer \
                              to this sleepy little pocket of the city?"
                    .to_string(),
                map: MapName::seattle("montlake"),
                music: "dance_sugar_plum_fairy".to_string(),
                start: osm::NodeID(53084814),
                minimap_zoom: 1,
                time_limit: Duration::minutes(3),
                goal: 1000,

                unlock_upzones: 2,
                unlock_vehicles: vec![],
            },
            Level {
                title: "Magnolia".to_string(),
                description: "Struggle past the intense hills and restrictive zoning to tackle \
                              one of the lowest-density parts of Seattle!"
                    .to_string(),
                map: MapName::seattle("ballard"),
                music: "god_rest_ye_merry_gentlemen".to_string(),
                start: osm::NodeID(53117102),
                minimap_zoom: 2,
                time_limit: Duration::minutes(5),
                goal: 1000,

                unlock_upzones: 3,
                unlock_vehicles: vec![],
            },
            Level {
                title: "Phinney Ridge".to_string(),
                description: "...".to_string(),
                map: MapName::seattle("phinney"),
                music: "carol_bells".to_string(),
                start: osm::NodeID(53233319),
                minimap_zoom: 1,
                time_limit: Duration::minutes(5),
                goal: 1000,

                unlock_upzones: 3,
                unlock_vehicles: vec![],
            },
            Level {
                title: "Queen Anne".to_string(),
                description: "...".to_string(),
                map: MapName::seattle("qa"),
                music: "jingle_bells".to_string(),
                start: osm::NodeID(53234637),
                minimap_zoom: 1,
                time_limit: Duration::minutes(5),
                goal: 1000,

                unlock_upzones: 3,
                unlock_vehicles: vec![],
            },
        ]
    }
}