Label stores

This commit is contained in:
Dustin Carlino 2020-12-18 15:53:08 -08:00
parent 05f4eca10f
commit 31426db26a
3 changed files with 22 additions and 7 deletions

View File

@ -2,7 +2,8 @@
Logo?
Created by [Dustin Carlino](https://abstreet.org), [Yuwen Li](yuwen-li.com), &
Created by [Dustin Carlino](https://abstreet.org),
[Yuwen Li](https://www.yuwen-li.com/), &
[Michael Kirk](https://michaelkirk.github.io/)
- Play online (slower and no music -- download below if possible)
@ -49,15 +50,16 @@ and sleighs on the market to tune the vehicles in the game.
### Modding the game
You can adjust the difficulty of the levels or give yourself all the upzoning
power you want by editing `data/player/santa.json`. If you break something, just
delete the file to start over. If you come up with a better gameplay
progression, please share -- tuning a game is hard!
power you want by editing `data/player/santa.json` (sorry, not on the web
version). If you break something, just delete the file to start over. If you
come up with a better gameplay progression, please share -- tuning a game is
hard!
### Adding new maps
Missing your slice of Seattle, or want to run somewhere else? If you have a bit
of technical experience,
[follow this guide](https://dabreegster.github.io/abstreet/howto/new_city.html).
Otherwise, draw the map boundaries in [http://geojson.io] and
Otherwise, draw the map boundaries in <http://geojson.io> and
[send it to us](https://github.com/dabreegster/abstreet/issues/new) along with a
time limit, goal, and starting point on the map.

View File

@ -37,6 +37,12 @@ impl Buildings {
if upzones.contains(&b.id) {
buildings.insert(b.id, BldgState::Store);
batch.push(colors.store, b.polygon.clone());
batch.append(
Text::from(Line("Upzoned"))
.render_autocropped(ctx)
.scale(0.1)
.centered_on(b.label_center),
);
continue;
}
@ -58,7 +64,7 @@ impl Buildings {
// Call out non-single family homes
if num_housing_units > 1 {
batch.append(
Text::from(Line(num_housing_units.to_string()).fg(Color::RED))
Text::from(Line(num_housing_units.to_string()).fg(Color::BLACK))
.render_autocropped(ctx)
.scale(0.2)
.centered_on(b.label_center),
@ -66,7 +72,7 @@ impl Buildings {
}
continue;
}
} else if b.amenities.iter().any(|a| {
} else if let Some(amenity) = b.amenities.iter().find(|a| {
if let Some(at) = amenity_type(&a.amenity_type) {
at == "groceries" || at == "food" || at == "bar"
} else {
@ -75,6 +81,12 @@ impl Buildings {
}) {
buildings.insert(b.id, BldgState::Store);
batch.push(colors.store, b.polygon.clone());
batch.append(
Text::from(Line(amenity.names.get(app.opts.language.as_ref())))
.render_autocropped(ctx)
.scale(0.1)
.centered_on(b.label_center),
);
continue;
}

View File

@ -408,6 +408,7 @@ impl ColorScheme {
cs.unzoomed_residential = cs.driving_lane;
cs.unzoomed_interesting_intersection = cs.unzoomed_highway;
cs.stop_sign = Color::rgb_f(0.67, 0.55, 0.55);
cs.private_road = Color::hex("#9E757F");
cs.panel_bg = Color::hex("#003046").alpha(0.9);
cs.gui_style.panel_bg = cs.panel_bg;