src/industry_cmd.cpp
changeset 6950 14ecb0acdfb4
parent 6943 1914f26aee04
child 6970 b489d8ec5d4a
equal deleted inserted replaced
6949:5de26c8fe2ef 6950:14ecb0acdfb4
   352 		SetDParam(0, indspec->name);
   352 		SetDParam(0, indspec->name);
   353 		return_cmd_error(STR_4800_IN_THE_WAY);
   353 		return_cmd_error(STR_4800_IN_THE_WAY);
   354 	}
   354 	}
   355 
   355 
   356 	if (flags & DC_EXEC) DeleteIndustry(i);
   356 	if (flags & DC_EXEC) DeleteIndustry(i);
   357 	return 0;
   357 	return CommandCost();
   358 }
   358 }
   359 
   359 
   360 static void TransportIndustryGoods(TileIndex tile)
   360 static void TransportIndustryGoods(TileIndex tile)
   361 {
   361 {
   362 	Industry *i = GetIndustryByTile(tile);
   362 	Industry *i = GetIndustryByTile(tile);
  1503 		if (--num < 0) return_cmd_error(STR_0239_SITE_UNSUITABLE);
  1503 		if (--num < 0) return_cmd_error(STR_0239_SITE_UNSUITABLE);
  1504 	} while (!CheckIfIndustryTilesAreFree(tile, it = itt[num], p1));
  1504 	} while (!CheckIfIndustryTilesAreFree(tile, it = itt[num], p1));
  1505 
  1505 
  1506 	if (CreateNewIndustryHelper(tile, p1, flags, indspec, it) == NULL) return CMD_ERROR;
  1506 	if (CreateNewIndustryHelper(tile, p1, flags, indspec, it) == NULL) return CMD_ERROR;
  1507 
  1507 
  1508 	return (_price.build_industry >> 8) * indspec->cost_multiplier;
  1508 	return CommandCost((_price.build_industry >> 8) * indspec->cost_multiplier);
  1509 }
  1509 }
  1510 
  1510 
  1511 
  1511 
  1512 Industry *CreateNewIndustry(TileIndex tile, IndustryType type)
  1512 Industry *CreateNewIndustry(TileIndex tile, IndustryType type)
  1513 {
  1513 {