mirror of https://github.com/OpenTTD/OpenTTD
Codechange: remove overloading on UpdateServiceInterval
One UpdateServiceInterval has two parameters to update the service interval for a vehicle type, the other for all vehicle types at once. Rename the latter to help with function resolution for the introduction of variants.pull/9401/head
parent
cdf9caf8ea
commit
f029fd0f3b
|
@ -833,7 +833,7 @@ static void UpdateConsists(int32 new_value)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check service intervals of vehicles, newvalue is value of % or day based servicing */
|
/* Check service intervals of vehicles, newvalue is value of % or day based servicing */
|
||||||
static void UpdateServiceInterval(int32 new_value)
|
static void UpdateAllServiceInterval(int32 new_value)
|
||||||
{
|
{
|
||||||
bool update_vehicles;
|
bool update_vehicles;
|
||||||
VehicleDefaultSettings *vds;
|
VehicleDefaultSettings *vds;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
; company changes them, it changes for all players.
|
; company changes them, it changes for all players.
|
||||||
|
|
||||||
[pre-amble]
|
[pre-amble]
|
||||||
static void UpdateServiceInterval(int32 new_value);
|
static void UpdateAllServiceInterval(int32 new_value);
|
||||||
static bool CanUpdateServiceInterval(VehicleType type, int32 &new_value);
|
static bool CanUpdateServiceInterval(VehicleType type, int32 &new_value);
|
||||||
static void UpdateServiceInterval(VehicleType type, int32 new_value);
|
static void UpdateServiceInterval(VehicleType type, int32 new_value);
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ var = vehicle.servint_ispercent
|
||||||
def = false
|
def = false
|
||||||
str = STR_CONFIG_SETTING_SERVINT_ISPERCENT
|
str = STR_CONFIG_SETTING_SERVINT_ISPERCENT
|
||||||
strhelp = STR_CONFIG_SETTING_SERVINT_ISPERCENT_HELPTEXT
|
strhelp = STR_CONFIG_SETTING_SERVINT_ISPERCENT_HELPTEXT
|
||||||
post_cb = UpdateServiceInterval
|
post_cb = UpdateAllServiceInterval
|
||||||
|
|
||||||
[SDT_VAR]
|
[SDT_VAR]
|
||||||
var = vehicle.servint_trains
|
var = vehicle.servint_trains
|
||||||
|
|
Loading…
Reference in New Issue