equal
deleted
inserted
replaced
3 /** @file station_cmd.c |
3 /** @file station_cmd.c |
4 */ |
4 */ |
5 |
5 |
6 #include "stdafx.h" |
6 #include "stdafx.h" |
7 #include "openttd.h" |
7 #include "openttd.h" |
8 #include "bridge_map.h" |
|
9 #include "debug.h" |
8 #include "debug.h" |
10 #include "functions.h" |
9 #include "functions.h" |
11 #include "station_map.h" |
10 #include "station_map.h" |
12 #include "table/sprites.h" |
11 #include "table/sprites.h" |
13 #include "table/strings.h" |
12 #include "table/strings.h" |
781 uint z; |
780 uint z; |
782 int allowed_z = -1; |
781 int allowed_z = -1; |
783 int flat_z; |
782 int flat_z; |
784 |
783 |
785 BEGIN_TILE_LOOP(tile_cur, w, h, tile) |
784 BEGIN_TILE_LOOP(tile_cur, w, h, tile) |
786 if (MayHaveBridgeAbove(tile_cur) && IsBridgeAbove(tile_cur)) { |
|
787 return_cmd_error(STR_5007_MUST_DEMOLISH_BRIDGE_FIRST); |
|
788 } |
|
789 |
|
790 if (!EnsureNoVehicle(tile_cur)) return CMD_ERROR; |
785 if (!EnsureNoVehicle(tile_cur)) return CMD_ERROR; |
791 |
786 |
792 tileh = GetTileSlope(tile_cur, &z); |
787 tileh = GetTileSlope(tile_cur, &z); |
793 |
788 |
794 /* Prohibit building if |
789 /* Prohibit building if |