Codechange: Implement tile proc handler to test for building bridge over tile.

This commit is contained in:
Peter Nelson
2025-08-14 19:35:32 +01:00
committed by Peter Nelson
parent 77503776b6
commit f30f808b50
12 changed files with 77 additions and 40 deletions
+6
View File
@@ -3076,6 +3076,11 @@ static CommandCost TerraformTile_Track(TileIndex tile, DoCommandFlags flags, int
return Command<CMD_LANDSCAPE_CLEAR>::Do(flags, tile);
}
static CommandCost CheckBuildAbove_Track(TileIndex tile, DoCommandFlags flags, Axis, int)
{
if (IsPlainRail(tile)) return CommandCost();
return Command<CMD_LANDSCAPE_CLEAR>::Do(flags, tile);
}
extern const TileTypeProcs _tile_type_rail_procs = {
DrawTile_Track, // draw_tile_proc
@@ -3092,4 +3097,5 @@ extern const TileTypeProcs _tile_type_rail_procs = {
VehicleEnter_Track, // vehicle_enter_tile_proc
GetFoundation_Track, // get_foundation_proc
TerraformTile_Track, // terraform_tile_proc
CheckBuildAbove_Track, // check_build_above_proc
};