Delay A delay
What onDelayed gives when a timetable train runs late: which train, which service, how many minutes and where to.
Do czego: To announce or keep track of delays.
trains.IC.onDelayed { Delay d ->
announce "Service ${d.service} is ${d.minutes} minutes late"
}Właściwości
service → String
Its service's number this run.
This run's service number, such as “IC 2341”.
trains.IC.onDelayed { Delay d -> log d.service }minutes → int
How many minutes late.
How many minutes late, on the model clock.
trains.IC.onDelayed { Delay d -> if (d.minutes >= 10) say "a long delay" }place → Place
Where the service goes, when that is a station or yard.
Where the run goes, or null when that is one block.
trains.IC.onDelayed { Delay d -> log d.place?.name }