src/ai/api/ai_marine.hpp
author truebrain
Wed, 23 Apr 2008 12:05:32 +0000
branchnoai
changeset 10308 0c81dfce3e9b
parent 10096 780921b39016
child 10851 23a10fdcbd93
permissions -rw-r--r--
(svn r12849) [NoAI] -Fix: when .hpp.sq doesn't exists, don't run diff (tnx to Yexo)
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
     1
/* $Id$ */
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
     2
9829
80fbe02a4184 (svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents: 9801
diff changeset
     3
/** @file ai_marine.hpp Everything to query and build marine. */
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
     4
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
     5
#ifndef AI_MARINE_HPP
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
     6
#define AI_MARINE_HPP
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
     7
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
     8
#include "ai_object.hpp"
10094
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
     9
#include "ai_error.hpp"
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    10
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    11
/**
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    12
 * Class that handles all marine related functions.
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    13
 */
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    14
class AIMarine : public AIObject {
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    15
public:
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    16
	static const char *GetClassName() { return "AIMarine"; }
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    17
10096
780921b39016 (svn r12627) [NoAI] -Fix: last few commits missed some comments around enums
truebrain
parents: 10094
diff changeset
    18
	/**
780921b39016 (svn r12627) [NoAI] -Fix: last few commits missed some comments around enums
truebrain
parents: 10094
diff changeset
    19
	 * All marine related error messages.
780921b39016 (svn r12627) [NoAI] -Fix: last few commits missed some comments around enums
truebrain
parents: 10094
diff changeset
    20
	 */
10094
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
    21
	enum ErrorMessages {
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
    22
		/** Base for marine related errors */
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
    23
		ERR_MARINE_BASE = AIError::ERR_CAT_MARINE << AIError::ERR_CAT_BIT_SIZE,
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
    24
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
    25
		/** Infrastructure must be built on water */
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
    26
		ERR_MARINE_MUST_BE_BUILT_ON_WATER,                  // [STR_3801_MUST_BE_BUILT_ON_WATER]
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
    27
	};
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
    28
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    29
	/**
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    30
	 * Checks whether the given tile is actually a tile with a water depot.
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
    31
	 * @param tile The tile to check.
9801
03a3eebd7fb7 (svn r12307) [NoAI] -Codechange: as followup on r12303 (trunk), use ::IsValidTile to check if a tile is inside the map, instead of all our custom ways
truebrain
parents: 9737
diff changeset
    32
	 * @pre AIMap::IsValidTile(tile).
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
    33
	 * @return True if and only if the tile has a water depot.
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    34
	 */
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    35
	static bool IsWaterDepotTile(TileIndex tile);
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    36
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    37
	/**
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    38
	 * Checks whether the given tile is actually a tile with a dock.
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
    39
	 * @param tile The tile to check.
9801
03a3eebd7fb7 (svn r12307) [NoAI] -Codechange: as followup on r12303 (trunk), use ::IsValidTile to check if a tile is inside the map, instead of all our custom ways
truebrain
parents: 9737
diff changeset
    40
	 * @pre AIMap::IsValidTile(tile).
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
    41
	 * @return True if and only if the tile has a dock.
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    42
	 */
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    43
	static bool IsDockTile(TileIndex tile);
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    44
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    45
	/**
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    46
	 * Checks whether the given tile is actually a tile with a buoy.
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
    47
	 * @param tile The tile to check.
9801
03a3eebd7fb7 (svn r12307) [NoAI] -Codechange: as followup on r12303 (trunk), use ::IsValidTile to check if a tile is inside the map, instead of all our custom ways
truebrain
parents: 9737
diff changeset
    48
	 * @pre AIMap::IsValidTile(tile).
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
    49
	 * @return True if and only if the tile has a buoy.
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    50
	 */
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    51
	static bool IsBuoyTile(TileIndex tile);
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    52
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    53
	/**
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    54
	 * Checks whether the given tile is actually a tile with a lock.
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
    55
	 * @param tile The tile to check.
9801
03a3eebd7fb7 (svn r12307) [NoAI] -Codechange: as followup on r12303 (trunk), use ::IsValidTile to check if a tile is inside the map, instead of all our custom ways
truebrain
parents: 9737
diff changeset
    56
	 * @pre AIMap::IsValidTile(tile).
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
    57
	 * @return True if and only if the tile has a lock.
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    58
	 */
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    59
	static bool IsLockTile(TileIndex tile);
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    60
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    61
	/**
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    62
	 * Checks whether the given tile is actually a tile with a canal.
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
    63
	 * @param tile The tile to check.
9801
03a3eebd7fb7 (svn r12307) [NoAI] -Codechange: as followup on r12303 (trunk), use ::IsValidTile to check if a tile is inside the map, instead of all our custom ways
truebrain
parents: 9737
diff changeset
    64
	 * @pre AIMap::IsValidTile(tile).
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
    65
	 * @return True if and only if the tile has a canal.
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    66
	 */
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    67
	static bool IsCanalTile(TileIndex tile);
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    68
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    69
	/**
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    70
	 * Builds a water depot on tile.
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
    71
	 * @param tile The tile where the water depot will be build.
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
    72
	 * @param vertical If true, depot will be vertical, else horizontal.
9801
03a3eebd7fb7 (svn r12307) [NoAI] -Codechange: as followup on r12303 (trunk), use ::IsValidTile to check if a tile is inside the map, instead of all our custom ways
truebrain
parents: 9737
diff changeset
    73
	 * @pre AIMap::IsValidTile(tile).
10094
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
    74
	 * @exception AIError::ERR_AREA_NOT_CLEAR
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
    75
	 * @exception AIError::ERR_SITE_UNSUITABLE
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
    76
	 * @exception AIMarine::ERR_MARINE_MUST_BE_BUILT_ON_WATER
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
    77
	 * @return Whether the water depot has been/can be build or not.
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    78
	 */
9737
ee408edf3851 (svn r12216) [NoAI] -Codechange: made most functions 'static', which removes the need to create an instance to get, for example, engine information, and therefor heavily simplifying AI creation (Morloth)
truebrain
parents: 9691
diff changeset
    79
	static bool BuildWaterDepot(TileIndex tile, bool vertical);
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    80
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    81
	/**
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    82
	 * Builds a dock where tile is the tile still on land.
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
    83
	 * @param tile The tile still on land of the dock.
9801
03a3eebd7fb7 (svn r12307) [NoAI] -Codechange: as followup on r12303 (trunk), use ::IsValidTile to check if a tile is inside the map, instead of all our custom ways
truebrain
parents: 9737
diff changeset
    84
	 * @pre AIMap::IsValidTile(tile).
10094
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
    85
	 * @exception AIError::ERR_AREA_NOT_CLEAR
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
    86
	 * @exception AIError::ERR_SITE_UNSUITABLE
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
    87
	 * @exception AIStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
    88
	 * @exception AIStation::ERR_STATION_TOO_MANY_STATIONS
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
    89
	 * @return Whether the dock has been/can be build or not.
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    90
	 */
9737
ee408edf3851 (svn r12216) [NoAI] -Codechange: made most functions 'static', which removes the need to create an instance to get, for example, engine information, and therefor heavily simplifying AI creation (Morloth)
truebrain
parents: 9691
diff changeset
    91
	static bool BuildDock(TileIndex tile);
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    92
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    93
	/**
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
    94
	 * Builds a buoy on tile.
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
    95
	 * @param tile The tile where the buoy will be build.
9801
03a3eebd7fb7 (svn r12307) [NoAI] -Codechange: as followup on r12303 (trunk), use ::IsValidTile to check if a tile is inside the map, instead of all our custom ways
truebrain
parents: 9737
diff changeset
    96
	 * @pre AIMap::IsValidTile(tile).
10094
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
    97
	 * @exception AIError::ERR_AREA_NOT_CLEAR
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
    98
	 * @exception AIError::ERR_SITE_UNSUITABLE
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
    99
	 * @exception AIStation::ERR_STATION_TOO_MANY_STATIONS
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
   100
	 * @return Whether the buoy has been/can be build or not.
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   101
	 */
9737
ee408edf3851 (svn r12216) [NoAI] -Codechange: made most functions 'static', which removes the need to create an instance to get, for example, engine information, and therefor heavily simplifying AI creation (Morloth)
truebrain
parents: 9691
diff changeset
   102
	static bool BuildBuoy(TileIndex tile);
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   103
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   104
	/**
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   105
	 * Builds a lock on tile.
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
   106
	 * @param tile The tile where the lock will be build.
9801
03a3eebd7fb7 (svn r12307) [NoAI] -Codechange: as followup on r12303 (trunk), use ::IsValidTile to check if a tile is inside the map, instead of all our custom ways
truebrain
parents: 9737
diff changeset
   107
	 * @pre AIMap::IsValidTile(tile).
10094
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
   108
	 * @exception AIError::ERR_LAND_SLOPED_WRONG
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
   109
	 * @exception AIError::ERR_SITE_UNSUITABLE
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
   110
	 * @return Whether the lock has been/can be build or not.
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   111
	 */
9737
ee408edf3851 (svn r12216) [NoAI] -Codechange: made most functions 'static', which removes the need to create an instance to get, for example, engine information, and therefor heavily simplifying AI creation (Morloth)
truebrain
parents: 9691
diff changeset
   112
	static bool BuildLock(TileIndex tile);
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   113
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   114
	/**
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   115
	 * Builds a canal on tile.
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
   116
	 * @param tile The tile where the canal will be build.
9801
03a3eebd7fb7 (svn r12307) [NoAI] -Codechange: as followup on r12303 (trunk), use ::IsValidTile to check if a tile is inside the map, instead of all our custom ways
truebrain
parents: 9737
diff changeset
   117
	 * @pre AIMap::IsValidTile(tile).
10094
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
   118
	 * @exception AIError::ERR_AREA_NOT_CLEAR
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
   119
	 * @exception AIError::ERR_LAND_SLOPED_WRONG
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
   120
	 * @exception AIError::ERR_OWNED_BY_ANOTHER_COMPANY
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
   121
	 * @exception AIError::ERR_ALREADY_BUILT
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
   122
	 * @return Whether the canal has been/can be build or not.
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   123
	 */
9737
ee408edf3851 (svn r12216) [NoAI] -Codechange: made most functions 'static', which removes the need to create an instance to get, for example, engine information, and therefor heavily simplifying AI creation (Morloth)
truebrain
parents: 9691
diff changeset
   124
	static bool BuildCanal(TileIndex tile);
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   125
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   126
	/**
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   127
	 * Removes a water depot.
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
   128
	 * @param tile Any tile of the water depot.
9801
03a3eebd7fb7 (svn r12307) [NoAI] -Codechange: as followup on r12303 (trunk), use ::IsValidTile to check if a tile is inside the map, instead of all our custom ways
truebrain
parents: 9737
diff changeset
   129
	 * @pre AIMap::IsValidTile(tile).
10094
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
   130
	 * @exception AIError::ERR_OWNED_BY_ANOTHER_COMPANY
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
   131
	 * @return Whether the water depot has been/can be removed or not.
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   132
	 */
9737
ee408edf3851 (svn r12216) [NoAI] -Codechange: made most functions 'static', which removes the need to create an instance to get, for example, engine information, and therefor heavily simplifying AI creation (Morloth)
truebrain
parents: 9691
diff changeset
   133
	static bool RemoveWaterDepot(TileIndex tile);
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   134
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   135
	/**
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   136
	 * Removes a dock.
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
   137
	 * @param tile Any tile of the dock.
9801
03a3eebd7fb7 (svn r12307) [NoAI] -Codechange: as followup on r12303 (trunk), use ::IsValidTile to check if a tile is inside the map, instead of all our custom ways
truebrain
parents: 9737
diff changeset
   138
	 * @pre AIMap::IsValidTile(tile).
10094
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
   139
	 * @exception AIError::ERR_OWNED_BY_ANOTHER_COMPANY
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
   140
	 * @return Whether the dock has been/can be removed or not.
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   141
	 */
9737
ee408edf3851 (svn r12216) [NoAI] -Codechange: made most functions 'static', which removes the need to create an instance to get, for example, engine information, and therefor heavily simplifying AI creation (Morloth)
truebrain
parents: 9691
diff changeset
   142
	static bool RemoveDock(TileIndex tile);
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   143
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   144
	/**
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   145
	 * Removes a buoy.
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
   146
	 * @param tile Any tile of the buoy.
9801
03a3eebd7fb7 (svn r12307) [NoAI] -Codechange: as followup on r12303 (trunk), use ::IsValidTile to check if a tile is inside the map, instead of all our custom ways
truebrain
parents: 9737
diff changeset
   147
	 * @pre AIMap::IsValidTile(tile).
10094
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
   148
	 * @exception AIError::ERR_OWNED_BY_ANOTHER_COMPANY
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
   149
	 * @return Whether the buoy has been/can be removed or not.
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   150
	 */
9737
ee408edf3851 (svn r12216) [NoAI] -Codechange: made most functions 'static', which removes the need to create an instance to get, for example, engine information, and therefor heavily simplifying AI creation (Morloth)
truebrain
parents: 9691
diff changeset
   151
	static bool RemoveBuoy(TileIndex tile);
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   152
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   153
	/**
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   154
	 * Removes a lock.
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
   155
	 * @param tile Any tile of the lock.
9801
03a3eebd7fb7 (svn r12307) [NoAI] -Codechange: as followup on r12303 (trunk), use ::IsValidTile to check if a tile is inside the map, instead of all our custom ways
truebrain
parents: 9737
diff changeset
   156
	 * @pre AIMap::IsValidTile(tile).
10094
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
   157
	 * @exception AIError::ERR_OWNED_BY_ANOTHER_COMPANY
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
   158
	 * @return Whether the lock has been/can be removed or not.
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   159
	 */
9737
ee408edf3851 (svn r12216) [NoAI] -Codechange: made most functions 'static', which removes the need to create an instance to get, for example, engine information, and therefor heavily simplifying AI creation (Morloth)
truebrain
parents: 9691
diff changeset
   160
	static bool RemoveLock(TileIndex tile);
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   161
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   162
	/**
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   163
	 * Removes a canal.
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
   164
	 * @param tile Any tile of the canal.
9801
03a3eebd7fb7 (svn r12307) [NoAI] -Codechange: as followup on r12303 (trunk), use ::IsValidTile to check if a tile is inside the map, instead of all our custom ways
truebrain
parents: 9737
diff changeset
   165
	 * @pre AIMap::IsValidTile(tile).
10094
e737405b06dd (svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents: 9836
diff changeset
   166
	 * @exception AIError::ERR_OWNED_BY_ANOTHER_COMPANY
9836
54afebfded49 (svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents: 9829
diff changeset
   167
	 * @return Whether the canal has been/can be removed or not.
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   168
	 */
9737
ee408edf3851 (svn r12216) [NoAI] -Codechange: made most functions 'static', which removes the need to create an instance to get, for example, engine information, and therefor heavily simplifying AI creation (Morloth)
truebrain
parents: 9691
diff changeset
   169
	static bool RemoveCanal(TileIndex tile);
9691
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   170
};
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   171
1231d4e5f5aa (svn r10679) [NoAI] -Add: added AIMarine, which takes care of Ships, Docks, ...
truelight
parents:
diff changeset
   172
#endif /* AI_MARINE_HPP */