(svn r11534) -Feature(newgrf): Implement property 23h for Industries.

This will add a cost to the removal of an industry using the cheat magic bulldozer.
Note that the removal of regular or newgrf industries without specified removal cost will have no cost applied to.
This is a difference from original spec, where a default base cost is added.
This commit is contained in:
belugas
2007-11-27 17:13:49 +00:00
parent 1682d5d679
commit b10eea628d
4 changed files with 21 additions and 3 deletions

View File

@@ -401,7 +401,7 @@ static CommandCost ClearTile_Industry(TileIndex tile, byte flags)
}
if (flags & DC_EXEC) delete i;
return CommandCost();
return CommandCost(indspec->GetRemovalCost());
}
static void TransportIndustryGoods(TileIndex tile)
@@ -2227,6 +2227,11 @@ Money IndustrySpec::GetConstructionCost() const
)) >> 8;
}
Money IndustrySpec::GetRemovalCost() const
{
return (_price.remove_house * this->removal_cost_multiplier) >> 8;
}
static CommandCost TerraformTile_Industry(TileIndex tile, uint32 flags, uint z_new, Slope tileh_new)
{
if (AutoslopeEnabled()) {