Changeset - r16443:851551db6d99
[Not reviewed]
master
0 1 0
alberth - 14 years ago 2010-11-13 15:08:47
alberth@openttd.org
(svn r21169) -Feature: Do not build industries during economic recession.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/industry_cmd.cpp
Show inline comments
 
@@ -2100,13 +2100,13 @@ void IndustryBuildData::TryBuildNewIndus
 
		if (difference > 0) {
 
			total_prob += difference;
 
			count++;
 
		}
 
	}
 

	
 
	if (missing <= 0 || total_prob == 0) count = 0; // Skip creation of an industry.
 
	if (EconomyIsInRecession() || missing <= 0 || total_prob == 0) count = 0; // Skip creation of an industry.
 

	
 
	if (count >= 1) {
 
		/* Pick a weighted random industry to build.
 
		 * For the case that count == 1, there is no need to draw a random number. */
 
		IndustryType it;
 
		/* Select an industry type to build (weighted random). */
0 comments (0 inline, 0 general)