Feature: [NewGRF] Related Act2 objects for airports and airport tiles.

Airports are similar two stations and industries, both of which have the town as related object.
Airport tiles are similar to industry tiles, which have the industry as related object.
This seems a sensible structure, so let's make it Airport Tile -> Airport -> Town.
This commit is contained in:
Michael Lutz
2023-09-10 17:28:53 +02:00
parent a6f2f3c042
commit 1c620b349f
4 changed files with 36 additions and 1 deletions

View File

@@ -214,7 +214,9 @@ static uint32_t GetAirportTileIDAtOffset(TileIndex tile, const Station *st, uint
*/
AirportTileResolverObject::AirportTileResolverObject(const AirportTileSpec *ats, TileIndex tile, Station *st,
CallbackID callback, uint32_t callback_param1, uint32_t callback_param2)
: ResolverObject(ats->grf_prop.grffile, callback, callback_param1, callback_param2), tiles_scope(*this, ats, tile, st)
: ResolverObject(ats->grf_prop.grffile, callback, callback_param1, callback_param2),
tiles_scope(*this, ats, tile, st),
airport_scope(*this, tile, st, st != nullptr ? st->airport.type : (byte)AT_DUMMY, st != nullptr ? st->airport.layout : 0)
{
this->root_spritegroup = ats->grf_prop.spritegroup[0];
}