dont lose logs in editor

This commit is contained in:
Dustin Carlino 2018-09-27 14:55:59 -07:00
parent 6e0f58f4c6
commit c1427a044c
2 changed files with 8 additions and 1 deletions

View File

@ -54,3 +54,7 @@ SidewalkSpot
Awkward to turn neighborhoods into buildings/streets; we kind of need the
quadtree and stuff for that, which is the Renderable layer right now.
Originally there was a separate geometry layer, probably for stuff like this.
## Scores
Alright, getting much closer to this being a game! Let's return to the idea of utility functions for agents.

View File

@ -73,6 +73,9 @@ impl UIWrapper {
rng_seed: Option<u8>,
kml: Option<String>,
) -> UIWrapper {
// Do this first, so anything logged by sim::load isn't lost.
let logs = DisplayLogs::new();
flame::start("setup");
let (map, edits, control_map, sim) = sim::load(
load,
@ -126,7 +129,7 @@ impl UIWrapper {
turn_cycler: TurnCyclerState::new(),
draw_neighborhoods: DrawNeighborhoodState::new(),
scenarios: ScenarioManager::new(),
logs: DisplayLogs::new(),
logs,
active_plugin: None,