# ai_marine.hpp

Go to the documentation of this file.

    00001 /* $Id: ai_marine.hpp 15520 2009-02-19 09:01:34Z yexo $ */
    00002
    00005 #ifndef AI_MARINE_HPP
    00006 #define AI_MARINE_HPP
    00007
    00008 #include "ai_object.hpp"
    00009 #include "ai_error.hpp"
    00010
    00014 class AIMarine : public AIObject {
    00015 public:
    00016   static const char *GetClassName() { return "AIMarine"; }
    00017
    00021   enum ErrorMessages {
    00023     ERR_MARINE_BASE = AIError::ERR_CAT_MARINE << AIError::ERR_CAT_BIT_SIZE,
    00024
    00026     ERR_MARINE_MUST_BE_BUILT_ON_WATER,                  // [STR_3801_MUST_BE_BUILT_ON_WATER]
    00027   };
    00028
    00035   static bool IsWaterDepotTile(TileIndex tile);
    00036
    00043   static bool IsDockTile(TileIndex tile);
    00044
    00051   static bool IsBuoyTile(TileIndex tile);
    00052
    00059   static bool IsLockTile(TileIndex tile);
    00060
    00067   static bool IsCanalTile(TileIndex tile);
    00068
    00080   static bool AreWaterTilesConnected(TileIndex tile_from, TileIndex tile_to);
    00081
    00094   static bool BuildWaterDepot(TileIndex tile, TileIndex front);
    00095
    00108   static bool BuildDock(TileIndex tile, StationID station_id);
    00109
    00119   static bool BuildBuoy(TileIndex tile);
    00120
    00129   static bool BuildLock(TileIndex tile);
    00130
    00141   static bool BuildCanal(TileIndex tile);
    00142
    00150   static bool RemoveWaterDepot(TileIndex tile);
    00151
    00159   static bool RemoveDock(TileIndex tile);
    00160
    00168   static bool RemoveBuoy(TileIndex tile);
    00169
    00177   static bool RemoveLock(TileIndex tile);
    00178
    00186   static bool RemoveCanal(TileIndex tile);
    00187 };
    00188
    00189 #endif /* AI_MARINE_HPP */