File diff r26746:18280281ac30 → r26747:6a13b72c8f80
src/industry_cmd.cpp
Show inline comments
 
@@ -2236,10 +2236,14 @@ static uint GetNumberOfIndustries()
 
		25,   // low
 
		55,   // normal
 
		80,   // high
 
		0,    // custom
 
	};
 

	
 
	assert(lengthof(numof_industry_table) == ID_END);
 
	uint difficulty = (_game_mode != GM_EDITOR) ? _settings_game.difficulty.industry_density : (uint)ID_VERY_LOW;
 

	
 
	if (difficulty == ID_CUSTOM) return std::min<uint>(IndustryPool::MAX_SIZE, _settings_game.game_creation.custom_industry_number);
 

	
 
	return std::min<uint>(IndustryPool::MAX_SIZE, ScaleByMapSize(numof_industry_table[difficulty]));
 
}