Commit Graph

6178 Commits

Author SHA1 Message Date
Dustin Carlino
9f2737b2b5 Don't offer the census-based scenario outside of the US or on oneshot test maps, since it won't work. 2021-03-16 19:03:03 -07:00
Michael Kirk
4418c94fd6 fixup! minimap controls: agent toggles and meters into one row 2021-03-16 18:28:50 -07:00
Michael Kirk
e0aa2ad279 fix jitter as agent meters update 2021-03-16 18:28:50 -07:00
Michael Kirk
264f1f939f minimap controls: agent toggles and meters into one row
Some ancillary changes:

Made the GeomBatchStack public and extracted the ImageSource
functionality from ButtonBuilder to Image.
2021-03-16 18:28:50 -07:00
Dustin Carlino
2e7d6eeb34 Fix the progress bar in the UI; now the line-rewriting more or less
works! #523
2021-03-16 18:08:58 -07:00
Dustin Carlino
c1d110d506 Fix the double </osm> issue with osmio. #523 2021-03-16 12:43:30 -07:00
Dustin Carlino
9c526d1000 Fix the spazzy download progress bar; I forgot to flush stdout. #523 2021-03-16 12:36:02 -07:00
Dustin Carlino
77709a24d6 Refactor a method to asynchronously download a file on native, with a simple progress bar. #523
Use it in the updater and all the importer tools. Only place it's not
used yet is parking_mapper and the in-game updater.  [rebuild]

Also make the RunCommand state understand the control code for erasing
the current line. It... sort of works.
2021-03-15 19:51:45 -07:00
Michael Kirk
810c89eeb1
meter shows "finished trips vs baseline" instead of time (#565) 2021-03-15 17:10:08 -07:00
Dustin Carlino
359960c1db Prepare the new map importer to work in the release. [rebuild] 2021-03-15 14:16:18 -07:00
Dustin Carlino
c0e49f815f Make the UI load the newly imported map, scraping its name from the other tool. #523
For this to work, RunCommand has to be much more careful about getting
all output when the command is done.
2021-03-15 13:54:14 -07:00
Dustin Carlino
f87c1c3b1b Manage the temporary files in the importer better, and don't re-download
pbf. #523

But now we don't know which map to switch to in the UI!
2021-03-15 11:43:06 -07:00
Dustin Carlino
ef95252f4b Make clip_osm correctly retain ways that cross the boundary. #523 2021-03-15 11:07:11 -07:00
Dustin Carlino
04e0e2aa02 Cache the geofabrik index file in data/input/shared. #523 2021-03-15 10:58:11 -07:00
Dustin Carlino
a8b72691dc new release 2021-03-14 20:39:56 -07:00
Dustin Carlino
a0f1be139b Add Linux dependencies to the github workflow. I believe they're brought in by the new dependency on clipboard. [rebuild] [release] 2021-03-14 19:49:55 -07:00
Dustin Carlino
edf3914e4d Disable the new map importer for this week's release; it's not ready yet. [rebuild] [release] 2021-03-14 17:43:18 -07:00
Dustin Carlino
be4935a316 If the map was imported successfully, switch to it. #525 2021-03-13 15:43:10 -08:00
Dustin Carlino
014d3184cc Use the subprocess crate to nonblockingly read output from a command. #523 2021-03-13 14:49:01 -08:00
Dustin Carlino
1477262f69 Just split out RunCommand. #523 2021-03-13 14:04:21 -08:00
Dustin Carlino
42a3852784 Actually, we can show command output just fine. The problem was trying
to render text with embedded newlines. #523
2021-03-13 13:49:33 -08:00
Dustin Carlino
944b2c337a Get the importer UI working finally! #523
Improved the target dir finding, and hacking around some of the command
output not rendering.
2021-03-13 13:41:34 -08:00
Dustin Carlino
4e665b6214 Run the one-step importer from the UI. Don't attempt a proper loading
screen yet. #523

Not working yet; one_step assumes paths to binaries, and it's now wrong.
2021-03-13 13:33:27 -08:00
Dustin Carlino
c252e4a82d Grab GeoJSON from the system clipboard on native. #523 2021-03-13 12:54:14 -08:00
Dustin Carlino
607ccd0e78 Start a native-only UI to run the one-step importer. #523 2021-03-13 12:41:44 -08:00
Dustin Carlino
ac297f75c4 Hack around the double </osm> bug in clip_map. #523 2021-03-13 11:39:18 -08:00
Dustin Carlino
59fdc30981 Create a tool to go from just a GeoJSON boundary to the full imported map, in one step, by gluing together a bunch of other tools. #523
Breaks in a few places along the way, but the basic idea is there.
2021-03-13 11:26:33 -08:00
Dustin Carlino
27a07b02a6 Use the osmio crate to convert OSM pbf to xml, clipping it in the
process. #523

Tested really quickly, might not be working right yet. The .xml output
seems to have a duplicate '</osm>' for some reason.
2021-03-13 10:06:19 -08:00
Dustin Carlino
0d8cc27961 Move per-gameplay panels from top-center to top-right. Left align time. #551 2021-03-12 17:48:35 -08:00
Dustin Carlino
b6536122e0 Fold the score panel used by the 2 challenge modes into the gameplay mode-specific top-center panel. #551 2021-03-12 17:48:35 -08:00
Dustin Carlino
229f2d5dca Fix merge 2021-03-12 17:48:35 -08:00
Dustin Carlino
d7d994066a A few adjustments to the consolidated panels: #551
- invert the histogram icon colors
- stretch out the time bar
- put the time bar above the finished trips counter
2021-03-12 17:48:35 -08:00
Dustin Carlino
7920d7d496 Recalculate the minimap panels as sim time changes, now that agent counters live there. #558 2021-03-12 17:48:35 -08:00
Dustin Carlino
880a293093 Make the time panel height override stickier. Otherwise it jumps height quite noticeably when pausing/resuming. #551 2021-03-12 17:48:35 -08:00
Dustin Carlino
59e9735318 Force actdev top panels to have the same height. #551 2021-03-12 17:48:35 -08:00
Dustin Carlino
da1c133a67 Adjust actdev panel layout to work on narrow screens. #551 2021-03-12 17:48:35 -08:00
Dustin Carlino
69b248cd66 Move agent counters to the minimap, removing the top-right agent panel entirely. #551
Adjust the tutorial for these changes.
2021-03-12 17:48:35 -08:00
Dustin Carlino
5b386af6ba Move most things out of the top-right agent meter panel to reclaim more horizontal space. #551
1) Move finished trips to the top-left time panel.
2) Move "tentative results" and "recording trips" controls (only
   occasionally used) to the top-left time panel.
3) Move the "more data" button to the minimap.
2021-03-12 17:48:35 -08:00
Dustin Carlino
8ac62fed47 Trying out some UI changes suggested by Martin:
- Increase day mode panel opacity to 95% to help text legibility
- Combine the time/speed panels, and remove the sunrise/sunset icons
- 4 mode colors matching actdev, also changing night mode residential
  buildings
2021-03-12 17:48:35 -08:00
Dustin Carlino
95b1d884cf Rename Map::new to be more clear that it should only be used in non-UI
tools. There's one place in the UI that doesn't work on the web!
2021-03-12 06:38:17 -08:00
Dustin Carlino
c6044fa54c Fix the debugging of map serialization sizes; Map::new isn't called
anymore, because of async map loading.
2021-03-11 19:46:09 -08:00
Dustin Carlino
72418ee6b6 Change the loading screen sidebar to list things the player ought to go try. Previously it was meant to be recent changes, but it's way too much work to also update that every few weeks. 2021-03-11 12:33:17 -08:00
Dustin Carlino
522b902453 Improve the traffic signal timing UI. There's a choice between fixed and
variable timing, but currently you have to remember to toggle it; the
two extra spinners get ignored otherwise. The new version is still
confusing, but I think it's an improvement.
2021-03-11 11:39:58 -08:00
Dustin Carlino
8be24bf007 Use AsRef<str> in more widgetry methods, getting rid of &format at many
call-sites. #253

To make some of these work, changed Label to store a String. Ultimately
it gets transformed into Text, so we need to allocate eventually.
2021-03-11 11:29:18 -08:00
Dustin Carlino
9c2c8bbd8f Change some uses of Into<String> to AsRef<str>, to avoid allocations. #253
I manually audited all uses. I kept Into<String> when we really do wind
up storing a String.
2021-03-11 11:29:18 -08:00
Dustin Carlino
f5eca6ff02
Seemingly fix squished loading screens at startup by always using inner_size. (#561) 2021-03-11 09:48:39 -08:00
Dustin Carlino
f254bb53cc Measure intersection delay more intuitively. #549
Before: time starts when the vehicle reaches the front of the queue and
first requests their turn

After: time starts when the vehicle first becomes blocked on the queue
leading to the intersection.

Regenerate prebaked data.
2021-03-10 16:38:35 -08:00
Dustin Carlino
f0de4e4583 Don't use Bezier curves for right/left turns at tiny intersections. They
wind up looping back on themselves in a nonsensical way, causing
vehicles to visually glitch when moving through.

This was started in 081819d86b, but it
used to gridlock 2 maps. All the recent roundabout fixes seems to have
resolved those! And adjusting offstreet parking for two maps.

But wallingford does regress; plunging forward for now.
2021-03-10 15:58:16 -08:00
Dustin Carlino
bf8f51ae05 Consistently count hours for a time. There was some disagreement between
recorded analytics and code that later summed things up, making the
relative throughput layer more confusing than it is already. #85
2021-03-10 13:59:38 -08:00
Dustin Carlino
957d08e8b9 Add tooltips to the relative throughput layer, to get exact before/after counts of the data being displayed. #85
(The before counts are still bucketed on the hour mark)
2021-03-10 13:24:56 -08:00