|
|
#include "stdafx.h"
|
|
|
#include "openttd.h"
|
|
|
#include "table/sprites.h"
|
|
|
#include "table/strings.h"
|
|
|
#include "functions.h"
|
|
|
#include "map.h"
|
|
|
#include "tile.h"
|
|
|
#include "vehicle.h"
|
|
|
#include "viewport.h"
|
|
|
#include "command.h"
|
|
|
#include "town.h"
|
|
|
#include "news.h"
|
|
|
#include "sound.h"
|
|
|
#include "depot.h"
|
|
|
#include "vehicle_gui.h"
|
|
|
|
|
|
static void FloodVehicle(Vehicle *v);
|
|
|
|
|
|
static bool IsClearWaterTile(TileIndex tile)
|
|
|
{
|
|
|
TileInfo ti;
|
|
|
FindLandscapeHeightByTile(&ti, tile);
|
|
|
return (ti.type == MP_WATER && ti.tileh == 0 && ti.map5 == 0);
|
|
|
}
|
|
|
|
|
|
/** Build a ship depot.
|
|
|
* @param x,y tile coordinates where ship depot is built
|
|
|
* @param p1 depot direction (0 through 3), where 0 is NW, 1 is NE, etc.
|
|
|
* @param p2 unused
|