mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-30 23:54:35 +01:00
Codechange: Implement tile proc handler to test for building bridge over tile.
This commit is contained in:
committed by
Peter Nelson
parent
77503776b6
commit
f30f808b50
@@ -2626,6 +2626,11 @@ CommandCost CmdConvertRoad(DoCommandFlags flags, TileIndex tile, TileIndex area_
|
||||
return found_convertible_road ? cost : error;
|
||||
}
|
||||
|
||||
static CommandCost CheckBuildAbove_Road(TileIndex tile, DoCommandFlags flags, Axis, int)
|
||||
{
|
||||
if (!IsRoadDepot(tile)) return CommandCost();
|
||||
return Command<CMD_LANDSCAPE_CLEAR>::Do(flags, tile);
|
||||
}
|
||||
|
||||
/** Tile callback functions for road tiles */
|
||||
extern const TileTypeProcs _tile_type_road_procs = {
|
||||
@@ -2643,4 +2648,5 @@ extern const TileTypeProcs _tile_type_road_procs = {
|
||||
VehicleEnter_Road, // vehicle_enter_tile_proc
|
||||
GetFoundation_Road, // get_foundation_proc
|
||||
TerraformTile_Road, // terraform_tile_proc
|
||||
CheckBuildAbove_Road, // check_build_above_proc
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user