VarAction2: Mark applicable rail station variables as expensive
This commit is contained in:
@@ -37,6 +37,20 @@ static bool IsExpensiveVehicleVariable(uint16 variable)
|
||||
}
|
||||
}
|
||||
|
||||
static bool IsExpensiveStationVariable(uint16 variable)
|
||||
{
|
||||
switch (variable) {
|
||||
case 0x66:
|
||||
case 0x67:
|
||||
case 0x68:
|
||||
case 0x6A:
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static bool IsExpensiveIndustryTileVariable(uint16 variable)
|
||||
{
|
||||
switch (variable) {
|
||||
@@ -89,6 +103,7 @@ static bool IsExpensiveRoadStopsVariable(uint16 variable)
|
||||
static bool IsExpensiveVariable(uint16 variable, GrfSpecFeature feature, VarSpriteGroupScope var_scope)
|
||||
{
|
||||
if ((feature >= GSF_TRAINS && feature <= GSF_AIRCRAFT) && IsExpensiveVehicleVariable(variable)) return true;
|
||||
if (feature == GSF_STATIONS && var_scope == VSG_SCOPE_SELF && IsExpensiveStationVariable(variable)) return true;
|
||||
if (feature == GSF_INDUSTRYTILES && var_scope == VSG_SCOPE_SELF && IsExpensiveIndustryTileVariable(variable)) return true;
|
||||
if (feature == GSF_OBJECTS && var_scope == VSG_SCOPE_SELF && IsExpensiveObjectVariable(variable)) return true;
|
||||
if (feature == GSF_ROADSTOPS && var_scope == VSG_SCOPE_SELF && IsExpensiveRoadStopsVariable(variable)) return true;
|
||||
|
Reference in New Issue
Block a user