* Get the number of ticks in the current timetable display unit. * @return The number of ticks per day, second, or tick, to match the timetable display. */
| 63 | * @return The number of ticks per day, second, or tick, to match the timetable display. |
| 64 | */ |
| 65 | static inline TimerGameTick::Ticks TicksPerTimetableUnit() |
| 66 | { |
| 67 | switch (_settings_client.gui.timetable_mode) { |
| 68 | case TimetableMode::Days: |
| 69 | return Ticks::DAY_TICKS; |
| 70 | case TimetableMode::Seconds: |
| 71 | return Ticks::TICKS_PER_SECOND; |
| 72 | case TimetableMode::Ticks: |
| 73 | return 1; |
| 74 | default: |
| 75 | NOT_REACHED(); |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | /** |
| 80 | * Determine if a vehicle should be shown as late or early, using a threshold depending on the timetable display setting. |
no test coverage detected