summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/object_cmd.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp
index 9f1a8377f..9ba2ba83c 100644
--- a/src/object_cmd.cpp
+++ b/src/object_cmd.cpp
@@ -457,6 +457,9 @@ static CommandCost ClearTile_Object(TileIndex tile, DoCommandFlag flags)
CommandCost cost(EXPENSES_CONSTRUCTION, spec->GetClearCost() * ta.w * ta.h / 5);
if (spec->flags & OBJECT_FLAG_CLEAR_INCOME) cost.MultiplyCost(-1); // They get an income!
+ /* Towns can't remove any objects. */
+ if (_current_company == OWNER_TOWN) return CMD_ERROR;
+
/* Water can remove everything! */
if (_current_company != OWNER_WATER) {
if ((flags & DC_NO_WATER) && IsTileOnWater(tile)) {