From 60a52404e3e4686da8604dbd3709a31830c6ce3f Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 22 Jan 2012 21:26:42 +0000 Subject: (svn r23842) -Change [FS#5001, FS#5002]: do not let towns (ever) remove objects --- src/object_cmd.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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)) { -- cgit v1.2.3-70-g09d2