(svn r15190) -Feature: Allow terraforming of the tiles at the edges of the map.
This commit is contained in:
@@ -190,22 +190,22 @@
|
||||
|
||||
/* static */ bool AITile::RaiseTile(TileIndex tile, int32 slope)
|
||||
{
|
||||
EnforcePrecondition(false, ::IsValidTile(tile));
|
||||
EnforcePrecondition(false, tile < ::MapSize());
|
||||
|
||||
return AIObject::DoCommand(tile, slope, 1, CMD_TERRAFORM_LAND);
|
||||
}
|
||||
|
||||
/* static */ bool AITile::LowerTile(TileIndex tile, int32 slope)
|
||||
{
|
||||
EnforcePrecondition(false, ::IsValidTile(tile));
|
||||
EnforcePrecondition(false, tile < ::MapSize());
|
||||
|
||||
return AIObject::DoCommand(tile, slope, 0, CMD_TERRAFORM_LAND);
|
||||
}
|
||||
|
||||
/* static */ bool AITile::LevelTiles(TileIndex start_tile, TileIndex end_tile)
|
||||
{
|
||||
EnforcePrecondition(false, ::IsValidTile(start_tile));
|
||||
EnforcePrecondition(false, ::IsValidTile(end_tile));
|
||||
EnforcePrecondition(false, start_tile < ::MapSize());
|
||||
EnforcePrecondition(false, end_tile < ::MapSize());
|
||||
|
||||
return AIObject::DoCommand(end_tile, start_tile, 0, CMD_LEVEL_LAND);
|
||||
}
|
||||
|
@@ -291,7 +291,7 @@ public:
|
||||
* for example: SLOPE_N | SLOPE_W (= SLOPE_NW)
|
||||
* @param tile The tile to raise.
|
||||
* @param slope Corners to raise (SLOPE_xxx).
|
||||
* @pre AIMap::IsValidTile(tile).
|
||||
* @pre tile < AIMap::GetMapSize().
|
||||
* @exception AIError::ERR_AREA_NOT_CLEAR
|
||||
* @exception AIError::ERR_TOO_CLOSE_TO_EDGE
|
||||
* @exception AITile::ERR_TILE_TOO_HIGH
|
||||
@@ -304,7 +304,7 @@ public:
|
||||
* for example: SLOPE_N | SLOPE_W (= SLOPE_NW)
|
||||
* @param tile The tile to lower.
|
||||
* @param slope Corners to lower (SLOPE_xxx).
|
||||
* @pre AIMap::IsValidTile(tile).
|
||||
* @pre tile < AIMap::GetMapSize().
|
||||
* @exception AIError::ERR_AREA_NOT_CLEAR
|
||||
* @exception AIError::ERR_TOO_CLOSE_TO_EDGE
|
||||
* @exception AITile::ERR_TILE_TOO_LOW
|
||||
|
Reference in New Issue
Block a user