(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).

This commit is contained in:
rubidium
2008-01-09 16:55:48 +00:00
parent 98b4fa7c07
commit 0365c1f33b
27 changed files with 190 additions and 294 deletions

View File

@@ -32,7 +32,7 @@ static CommandCost ClearTile_Clear(TileIndex tile, byte flags)
&_price.clear_roughland,
&_price.clear_roughland,
};
CommandCost price;
CommandCost price(EXPENSES_CONSTRUCTION);
if (!IsClearGround(tile, CLEAR_GRASS) || GetClearDensity(tile) != 0) {
price.AddCost(*clear_price_table[GetClearGround(tile)]);