--- a/src/industry_cmd.cpp Wed Jan 09 16:40:02 2008 +0000
+++ b/src/industry_cmd.cpp Wed Jan 09 16:55:48 2008 +0000
@@ -400,7 +400,7 @@
}
if (flags & DC_EXEC) delete i;
- return CommandCost(indspec->GetRemovalCost());
+ return CommandCost(EXPENSES_CONSTRUCTION, indspec->GetRemovalCost());
}
static void TransportIndustryGoods(TileIndex tile)
@@ -1590,8 +1590,6 @@
{
const IndustrySpec *indspec;
- SET_EXPENSES_TYPE(EXPENSES_OTHER);
-
indspec = GetIndustrySpec(p1);
/* Check if the to-be built/founded industry is available for this climate. */
@@ -1646,7 +1644,7 @@
if (CreateNewIndustryHelper(tile, p1, flags, indspec, num) == NULL) return CMD_ERROR;
}
- return CommandCost(indspec->GetConstructionCost());
+ return CommandCost(EXPENSES_OTHER, indspec->GetConstructionCost());
}
@@ -2263,10 +2261,10 @@
if (HasBit(itspec->callback_flags, CBM_INDT_AUTOSLOPE)) {
/* If the callback fails, allow autoslope. */
uint16 res = GetIndustryTileCallback(CBID_INDUSTRY_AUTOSLOPE, 0, 0, gfx, GetIndustryByTile(tile), tile);
- if ((res == 0) || (res == CALLBACK_FAILED)) return _price.terraform;
+ if ((res == 0) || (res == CALLBACK_FAILED)) return CommandCost(EXPENSES_CONSTRUCTION, _price.terraform);
} else {
/* allow autoslope */
- return _price.terraform;
+ return CommandCost(EXPENSES_CONSTRUCTION, _price.terraform);
}
}
}