mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r23842) -Change [FS#5001, FS#5002]: do not let towns (ever) remove objects
This commit is contained in:
parent
f591787e4a
commit
60a52404e3
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue