src/ai/api/ai_industry.cpp
branchnoai
changeset 9798 28e94a3b2b06
parent 9795 679ba7cd8426
child 9810 a84fc1be9e3b
equal deleted inserted replaced
9797:5bb54b2a6f6f 9798:28e94a3b2b06
    42 
    42 
    43 	const Industry *i = ::GetIndustry(industry_id);
    43 	const Industry *i = ::GetIndustry(industry_id);
    44 	const IndustrySpec *indsp = ::GetIndustrySpec(i->type);
    44 	const IndustrySpec *indsp = ::GetIndustrySpec(i->type);
    45 
    45 
    46 	for (byte j = 0; j < lengthof(indsp->produced_cargo); j++)
    46 	for (byte j = 0; j < lengthof(indsp->produced_cargo); j++)
    47 		if (indsp->produced_cargo[j] == cargo_id) return i->production_rate[j];
    47 		if (indsp->produced_cargo[j] == cargo_id) return i->production_rate[j] * 8;
    48 
    48 
    49 	return -1;
    49 	return -1;
    50 }
    50 }
    51 
    51 
    52 /* static */ bool AIIndustry::IsCargoAccepted(IndustryID industry_id, CargoID cargo_id)
    52 /* static */ bool AIIndustry::IsCargoAccepted(IndustryID industry_id, CargoID cargo_id)