summaryrefslogtreecommitdiff
path: root/src/town_cmd.cpp
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-10-30 11:13:12 +0100
committerErich Eckner <git@eckner.net>2022-01-16 21:58:15 +0100
commit0c5ba5b7bf9a9dfa78c026f4da656940a460f47d (patch)
treed2a44494bbd70425b8f9e0e22b8c4e4dd8223001 /src/town_cmd.cpp
parent523901887827768d6bff347ddb57787b295cc9e1 (diff)
downloadopenttd-0c5ba5b7bf9a9dfa78c026f4da656940a460f47d.tar.xz
underground patch applied
Diffstat (limited to 'src/town_cmd.cpp')
-rw-r--r--src/town_cmd.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index 405a83cce..450582941 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -12,6 +12,7 @@
#include "road_internal.h" /* Cleaning up road bits */
#include "road_cmd.h"
#include "landscape.h"
+#include "layer_func.h"
#include "viewport_func.h"
#include "viewport_kdtree.h"
#include "cmd_helper.h"
@@ -2328,6 +2329,9 @@ static inline bool CanBuildHouseHere(TileIndex tile, bool noslope)
Slope slope = GetTileSlope(tile);
if ((noslope && slope != SLOPE_FLAT) || IsSteepSlope(slope)) return false;
+ /* Недопустимо строительство объекта под землей */
+ if (IsUnderground(tile)) return false;
+
/* at least one RoadTypes allow building the house here? */
if (!RoadTypesAllowHouseHere(tile)) return false;
@@ -2761,6 +2765,8 @@ CommandCost CmdRenameTown(DoCommandFlag flags, TownID town_id, const std::string
InvalidateWindowData(WC_TOWN_DIRECTORY, 0, TDIWD_FORCE_RESORT);
ClearAllStationCachedNames();
ClearAllIndustryCachedNames();
+ InvalidateWindowClassesData(WC_TOWN_VIEW);
+ InvalidateWindowClassesData(WC_INDUSTRY_VIEW);
UpdateAllStationVirtCoords();
}
return CommandCost();