Docs / Making content / HTML textures
The route and the timetable
Everything about the current trip lives in omsi.vehicle.route.
| path | meaning |
|---|---|
route.active |
true when the bus has a timetable (a duty) |
route.source |
where the stops come from: "timetable", "ibis" or "none" |
route.line |
the line text |
route.destination |
the text on the destination sign |
route.stops[i] |
one stop: index, name, arrival, departure ("HH:MM"), arrivalSec, departureSec (seconds after midnight), served, current |
route.current |
the stop the bus is at or heading for (same fields as a stop) |
route.terminus |
the last stop (same fields) |
route.nextIndex |
index of the next stop. null when active is false |
route.delaySec |
delay in seconds. Negative means early |
route.ibis.line, .suffix, .routeIndex, .terminusIndex, .terminusCode |
the raw numbers the IBIS itself holds |
A few things worth knowing:
servedistrueonce a stop has been handled. When the last stop of a trip is served, the trip is over. A page can use that to start the return trip.route.stopscan be empty. If the bus has no timetable and nobody typed a route into the IBIS, there is simply nothing to show. Checkstops.lengthbefore you draw.- Without a duty (
activeisfalse) the game doesn't advance the stops on its own. A page that wants to show progress then has to keep its own counter.
Something wrong or missing? Fix it on GitHub or open an issue.