mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-25 23:43:25 +03:00
store offset in the permanent signal format
This commit is contained in:
parent
49e8ab3680
commit
eee179ce8a
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -2782,7 +2782,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "seattle_traffic_signals"
|
name = "seattle_traffic_signals"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/dabreegster/seattle_traffic_signals#9a3a77da15a7eefacc5553579c0b80b7eeae2ff4"
|
source = "git+https://github.com/dabreegster/seattle_traffic_signals#ccc37b56a1f879a15fc1e4402785cf9b21f12703"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"include_dir 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"include_dir 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.110 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.110 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -255,6 +255,7 @@ impl ControlTrafficSignal {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
.collect(),
|
.collect(),
|
||||||
|
offset_seconds: self.offset.inner_seconds() as usize,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -300,7 +301,7 @@ impl ControlTrafficSignal {
|
|||||||
ControlTrafficSignal {
|
ControlTrafficSignal {
|
||||||
id,
|
id,
|
||||||
phases,
|
phases,
|
||||||
offset: Duration::ZERO,
|
offset: Duration::seconds(raw.offset_seconds as f64),
|
||||||
turn_groups: TurnGroup::for_i(id, map),
|
turn_groups: TurnGroup::for_i(id, map),
|
||||||
}
|
}
|
||||||
.validate()
|
.validate()
|
||||||
|
Loading…
Reference in New Issue
Block a user