src/industry_cmd.cpp
changeset 8474 358b35762f02
parent 8472 88d932993efd
child 8483 65653bf20fdd
equal deleted inserted replaced
8473:773b817b64d0 8474:358b35762f02
   399 		SetDParam(0, indspec->name);
   399 		SetDParam(0, indspec->name);
   400 		return_cmd_error(STR_4800_IN_THE_WAY);
   400 		return_cmd_error(STR_4800_IN_THE_WAY);
   401 	}
   401 	}
   402 
   402 
   403 	if (flags & DC_EXEC) delete i;
   403 	if (flags & DC_EXEC) delete i;
   404 	return CommandCost();
   404 	return CommandCost(indspec->GetRemovalCost());
   405 }
   405 }
   406 
   406 
   407 static void TransportIndustryGoods(TileIndex tile)
   407 static void TransportIndustryGoods(TileIndex tile)
   408 {
   408 {
   409 	Industry *i = GetIndustryByTile(tile);
   409 	Industry *i = GetIndustryByTile(tile);
  2225 					this->raw_industry_cost_multiplier :
  2225 					this->raw_industry_cost_multiplier :
  2226 					this->cost_multiplier
  2226 					this->cost_multiplier
  2227 			)) >> 8;
  2227 			)) >> 8;
  2228 }
  2228 }
  2229 
  2229 
       
  2230 Money IndustrySpec::GetRemovalCost() const
       
  2231 {
       
  2232 	return (_price.remove_house * this->removal_cost_multiplier) >> 8;
       
  2233 }
       
  2234 
  2230 static CommandCost TerraformTile_Industry(TileIndex tile, uint32 flags, uint z_new, Slope tileh_new)
  2235 static CommandCost TerraformTile_Industry(TileIndex tile, uint32 flags, uint z_new, Slope tileh_new)
  2231 {
  2236 {
  2232 	if (AutoslopeEnabled()) {
  2237 	if (AutoslopeEnabled()) {
  2233 		/* We imitate here TTDP's behaviour:
  2238 		/* We imitate here TTDP's behaviour:
  2234 		 *  - Both new and old slope must not be steep.
  2239 		 *  - Both new and old slope must not be steep.