@@ -74,13 +74,13 @@
/* static */ bool AIMarine::BuildWaterDepot(TileIndex tile, TileIndex front)
{
EnforcePrecondition(false, ::IsValidTile(tile));
EnforcePrecondition(false, ::IsValidTile(front));
EnforcePrecondition(false, (::TileX(front) == ::TileX(tile)) != (::TileY(front) == ::TileY(tile)));
return AIObject::DoCommand(tile, ::TileY(front) == ::TileY(tile), 0, CMD_BUILD_SHIP_DEPOT);
return AIObject::DoCommand(tile, ::TileX(front) == ::TileX(tile), 0, CMD_BUILD_SHIP_DEPOT);
}
/* static */ bool AIMarine::BuildDock(TileIndex tile, StationID station_id)
EnforcePrecondition(false, station_id == AIStation::STATION_NEW || station_id == AIStation::STATION_JOIN_ADJACENT || AIStation::IsValidStation(station_id));
@@ -104,12 +104,13 @@ public:
* @pre AIMap::IsValidTile(front).
* @exception AIError::ERR_AREA_NOT_CLEAR
* @exception AIError::ERR_SITE_UNSUITABLE
* @exception AIMarine::ERR_MARINE_MUST_BE_BUILT_ON_WATER
* @return Whether the water depot has been/can be build or not.
* @note A WaterDepot is 1 tile in width, and 2 tiles in length.
* @note The depot will be built towards the south from 'tile', not necessarily towards 'front'.
*/
static bool BuildWaterDepot(TileIndex tile, TileIndex front);
/**
* Builds a dock where tile is the tile still on land.
* @param tile The tile still on land of the dock.
Status change: