/* Make sure there are no adjacent or incompatible ship docking areas */
TileIndex tile_adj;
Axis axis_cur = DiagDirToAxis(direction);
if (axis_cur == AXIS_Y) {
tile_adj = tile_cur + TileDiffXY(-2, 0);
if (IsTileType(tile_adj, MP_STATION) && IsOilRig(tile_adj)) return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
if (IsTileType(tile_adj, MP_INDUSTRY) && GetIndustryGfx(tile_adj) == GFX_OILRIG_1) return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
}
tile_adj = tile_cur + (axis_cur == AXIS_X ? TileDiffXY(0, -1) : TileDiffXY(1, 0));
if (IsDockTile(tile_adj)) {
Station *st = Station::GetByTile(tile_adj);
tile_adj = st->dock_tile;
Axis axis_adj = DiagDirToAxis(GetDockDirection(tile_adj));
if (axis_cur != axis_adj) return_cmd_error(STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK);
}
tile_adj = tile_cur - (axis_cur == AXIS_X ? TileDiffXY(0, -1) : TileDiffXY(1, 0));
if (IsDockTile(tile_adj)) {
Station *st = Station::GetByTile(tile_adj);
tile_adj = st->dock_tile;
Axis axis_adj = DiagDirToAxis(GetDockDirection(tile_adj));
if (axis_cur != axis_adj) return_cmd_error(STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK);
}