VarAction2: Improve handling of feature changes with parent scopes

This commit is contained in:
Jonathan G Rennison
2023-03-11 16:05:28 +00:00
parent 205cb2d3ea
commit 57c5cc32d0
5 changed files with 98 additions and 43 deletions

View File

@@ -30,6 +30,24 @@ std::map<const DeterministicSpriteGroup *, DeterministicSpriteGroupShadowCopy> _
std::map<const RandomizedSpriteGroup *, RandomizedSpriteGroupShadowCopy> _randomized_sg_shadows;
bool _grfs_loaded_with_sg_shadow_enable = false;
GrfSpecFeature GetGrfSpecFeatureForParentScope(GrfSpecFeature feature)
{
switch (feature) {
case GSF_STATIONS:
case GSF_BRIDGES:
case GSF_HOUSES:
case GSF_INDUSTRIES:
case GSF_OBJECTS:
case GSF_ROADSTOPS:
return GSF_FAKE_TOWNS;
case GSF_INDUSTRYTILES:
return GSF_INDUSTRIES;
default:
return feature;
}
}
/**
* ResolverObject (re)entry point.