summaryrefslogtreecommitdiff
path: root/src/town_cmd.cpp
diff options
context:
space:
mode:
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();