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.

(cherry picked from commit 1c620b349f)
This commit is contained in:
Michael Lutz
2023-09-10 17:28:53 +02:00
committed by Jonathan G Rennison
parent 5cc623cb3c
commit 1637f6f6b0
4 changed files with 36 additions and 1 deletions

View File

@@ -223,7 +223,9 @@ static uint32 GetAirportTileIDAtOffset(TileIndex tile, const Station *st, uint32
*/
AirportTileResolverObject::AirportTileResolverObject(const AirportTileSpec *ats, TileIndex tile, Station *st,
CallbackID callback, uint32 callback_param1, uint32 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];
}