Add railtype and signals variables for signal vertical clearance

This commit is contained in:
Jonathan G Rennison
2023-04-04 20:29:22 +01:00
parent 0370f2e3f1
commit e02585f68e
14 changed files with 181 additions and 38 deletions

View File

@@ -101,6 +101,28 @@ static bool IsExpensiveRoadStopsVariable(uint16 variable)
}
}
static bool IsExpensiveRailtypeVariable(uint16 variable)
{
switch (variable) {
case A2VRI_RAILTYPE_SIGNAL_VERTICAL_CLEARANCE:
return true;
default:
return false;
}
}
static bool IsExpensiveSignalVariable(uint16 variable)
{
switch (variable) {
case A2VRI_SIGNALS_SIGNAL_VERTICAL_CLEARANCE:
return true;
default:
return false;
}
}
static bool IsExpensiveVariable(uint16 variable, GrfSpecFeature scope_feature)
{
switch (scope_feature) {
@@ -122,6 +144,12 @@ static bool IsExpensiveVariable(uint16 variable, GrfSpecFeature scope_feature)
case GSF_ROADSTOPS:
return IsExpensiveRoadStopsVariable(variable);
case GSF_RAILTYPES:
return IsExpensiveRailtypeVariable(variable);
case GSF_SIGNALS:
return IsExpensiveSignalVariable(variable);
default:
return false;
}