1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-09-01 10:59:12 +00:00

(svn r23842) -Change [FS#5001, FS#5002]: do not let towns (ever) remove objects

This commit is contained in:
rubidium
2012-01-22 21:26:42 +00:00
parent f591787e4a
commit 60a52404e3

View File

@@ -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)) {