@ -12,6 +12,7 @@ static void UpdateAllServiceInterval(int32_t new_value);
static bool CanUpdateServiceInterval(VehicleType type, int32_t &new_value);
static void UpdateServiceInterval(VehicleType type, int32_t new_value);
static void SettingsValueAbsolute(const IntSettingDesc &sd, uint first_param, int32_t value);
static void ServiceIntervalSettingsValueText(const IntSettingDesc &sd, uint first_param, int32_t value);
static void GetDefaultServiceInterval(VehicleType type, int32_t &new_value);
static const SettingVariant _company_settings_table[] = {
@ -96,10 +97,11 @@ max = MAX_SERVINT_DAYS
interval = 1
str = STR_CONFIG_SETTING_SERVINT_TRAINS
strhelp = STR_CONFIG_SETTING_SERVINT_TRAINS_HELPTEXT
strval = STR_CONFIG_SETTING_SERVINT_VALUE
strval = STR_CONFIG_SETTING_SERVINT_VALUE _DAYS
pre_cb = [](auto &new_value) { return CanUpdateServiceInterval(VEH_TRAIN, new_value); }
post_cb = [](auto new_value) { UpdateServiceInterval(VEH_TRAIN, new_value); }
def_cb = [](auto &new_value) { GetDefaultServiceInterval(VEH_TRAIN, new_value); }
val_cb = ServiceIntervalSettingsValueText
[SDT_VAR]
var = vehicle.servint_roadveh
@ -111,10 +113,11 @@ max = MAX_SERVINT_DAYS
interval = 1
str = STR_CONFIG_SETTING_SERVINT_ROAD_VEHICLES
strhelp = STR_CONFIG_SETTING_SERVINT_ROAD_VEHICLES_HELPTEXT
strval = STR_CONFIG_SETTING_SERVINT_VALUE
strval = STR_CONFIG_SETTING_SERVINT_VALUE _DAYS
pre_cb = [](auto &new_value) { return CanUpdateServiceInterval(VEH_ROAD, new_value); }
post_cb = [](auto new_value) { UpdateServiceInterval(VEH_ROAD, new_value); }
def_cb = [](auto &new_value) { GetDefaultServiceInterval(VEH_ROAD, new_value); }
val_cb = ServiceIntervalSettingsValueText
[SDT_VAR]
var = vehicle.servint_ships
@ -126,10 +129,11 @@ max = MAX_SERVINT_DAYS
interval = 1
str = STR_CONFIG_SETTING_SERVINT_SHIPS
strhelp = STR_CONFIG_SETTING_SERVINT_SHIPS_HELPTEXT
strval = STR_CONFIG_SETTING_SERVINT_VALUE
strval = STR_CONFIG_SETTING_SERVINT_VALUE _DAYS
pre_cb = [](auto &new_value) { return CanUpdateServiceInterval(VEH_SHIP, new_value); }
post_cb = [](auto new_value) { UpdateServiceInterval(VEH_SHIP, new_value); }
def_cb = [](auto &new_value) { GetDefaultServiceInterval(VEH_SHIP, new_value); }
val_cb = ServiceIntervalSettingsValueText
[SDT_VAR]
var = vehicle.servint_aircraft
@ -141,7 +145,8 @@ max = MAX_SERVINT_DAYS
interval = 1
str = STR_CONFIG_SETTING_SERVINT_AIRCRAFT
strhelp = STR_CONFIG_SETTING_SERVINT_AIRCRAFT_HELPTEXT
strval = STR_CONFIG_SETTING_SERVINT_VALUE
strval = STR_CONFIG_SETTING_SERVINT_VALUE _DAYS
pre_cb = [](auto &new_value) { return CanUpdateServiceInterval(VEH_AIRCRAFT, new_value); }
post_cb = [](auto new_value) { UpdateServiceInterval(VEH_AIRCRAFT, new_value); }
def_cb = [](auto &new_value) { GetDefaultServiceInterval(VEH_AIRCRAFT, new_value); }
val_cb = ServiceIntervalSettingsValueText