File diff r6265:05ea4f089b8d → r6266:c52af85b611c
src/industry_cmd.cpp
Show inline comments
 
@@ -1728,35 +1728,31 @@ static const byte _new_industry_rand[4][
 
	{21, 21, 21, 24, 22, 22, 22, 22, 23, 23, 16, 16, 16,  4,  4, 19, 19, 19, 13, 13, 20, 20, 20, 11, 11, 11, 17, 17, 17, 10, 10, 10},
 
	{30, 30, 30, 36, 36, 31, 31, 31, 27, 27, 27, 28, 28, 28, 26, 26, 26, 34, 34, 34, 35, 35, 35, 29, 29, 29, 32, 32, 32, 33, 33, 33},
 
};
 

	
 
static void MaybeNewIndustry(uint32 r)
 
{
 
	int type;
 
	int type =_new_industry_rand[_opt.landscape][GB(r, 16, 5)];
 
	int j;
 
	Industry *i;
 

	
 
	type = _new_industry_rand[_opt.landscape][GB(r, 16, 5)];
 
	const IndustrySpec *ind_spc = GetIndustrySpec(type);;
 

	
 
	if (type == IT_OIL_WELL && _cur_year > 1950) return;
 
	if (type == IT_OIL_RIG  && _cur_year < 1960) return;
 

	
 
	j = 2000;
 
	for (;;) {
 
		i = CreateNewIndustry(RandomTile(), type);
 
		if (i != NULL) break;
 
		if (--j == 0) return;
 
	}
 

	
 
	SetDParam(0, GetIndustrySpec(type)->name);
 
	SetDParam(0, ind_spc->name);
 
	SetDParam(1, i->town->index);
 
	AddNewsItem(
 
		(type != IT_FOREST && type != IT_FRUIT_PLANTATION && type != IT_RUBBER_PLANTATION && type != IT_COTTON_CANDY) ?
 
			STR_482D_NEW_UNDER_CONSTRUCTION : STR_482E_NEW_BEING_PLANTED_NEAR,
 
		NEWS_FLAGS(NM_THIN, NF_VIEWPORT|NF_TILE, NT_ECONOMY,0), i->xy, 0
 
	);
 
	AddNewsItem(ind_spc->new_industry_text,
 
		NEWS_FLAGS(NM_THIN, NF_VIEWPORT|NF_TILE, NT_ECONOMY,0), i->xy, 0);
 
}
 

	
 
static void ChangeIndustryProduction(Industry *i)
 
{
 
	bool only_decrease = false;
 
	StringID str = STR_NULL;