YAPF: Prevent user for configuring signal penalties to negative values
Warn if signal penalty polynomial goes negative, and clamp to non-negative
This commit is contained in:
@@ -47,6 +47,7 @@ static bool ImprovedBreakdownsSettingChanged(int32 p1);
|
||||
static bool DayLengthChanged(int32 p1);
|
||||
static bool SimulatedWormholeSignalsChanged(int32 p1);
|
||||
static bool EnableSingleVehSharedOrderGuiChanged(int32 p1);
|
||||
static bool CheckYapfRailSignalPenalties(int32 p1);
|
||||
|
||||
static bool UpdateClientName(int32 p1);
|
||||
static bool UpdateServerPassword(int32 p1);
|
||||
@@ -3078,6 +3079,7 @@ def = 10
|
||||
min = 1
|
||||
max = 100
|
||||
cat = SC_EXPERT
|
||||
proc = CheckYapfRailSignalPenalties
|
||||
|
||||
[SDT_VAR]
|
||||
base = GameSettings
|
||||
@@ -3088,6 +3090,7 @@ def = 500
|
||||
min = -1000000
|
||||
max = 1000000
|
||||
cat = SC_EXPERT
|
||||
proc = CheckYapfRailSignalPenalties
|
||||
|
||||
[SDT_VAR]
|
||||
base = GameSettings
|
||||
@@ -3098,6 +3101,7 @@ def = -100
|
||||
min = -1000000
|
||||
max = 1000000
|
||||
cat = SC_EXPERT
|
||||
proc = CheckYapfRailSignalPenalties
|
||||
|
||||
[SDT_VAR]
|
||||
base = GameSettings
|
||||
@@ -3108,6 +3112,7 @@ def = 5
|
||||
min = -1000000
|
||||
max = 1000000
|
||||
cat = SC_EXPERT
|
||||
proc = CheckYapfRailSignalPenalties
|
||||
|
||||
[SDT_VAR]
|
||||
base = GameSettings
|
||||
|
Reference in New Issue
Block a user