| 238 | } |
| 239 | |
| 240 | static bool CanUpdateServiceInterval(VehicleType, int32_t &new_value) |
| 241 | { |
| 242 | VehicleDefaultSettings *vds; |
| 243 | if (_game_mode == GM_MENU || !Company::IsValidID(_current_company)) { |
| 244 | vds = &_settings_client.company.vehicle; |
| 245 | } else { |
| 246 | vds = &Company::Get(_current_company)->settings.vehicle; |
| 247 | } |
| 248 | |
| 249 | /* Test if the interval is valid */ |
| 250 | int32_t interval = GetServiceIntervalClamped(new_value, vds->servint_ispercent); |
| 251 | return new_value == 0 || interval == new_value; |
| 252 | } |
| 253 | |
| 254 | static void UpdateServiceInterval(VehicleType type, int32_t new_value) |
| 255 | { |
nothing calls this directly
no test coverage detected