equal
deleted
inserted
replaced
1 /* $Id$ */ |
1 /* $Id$ */ |
2 |
2 |
3 #include "stdafx.h" |
3 #include "stdafx.h" |
4 #include "openttd.h" |
4 #include "openttd.h" |
5 #include "clear_map.h" |
5 #include "clear_map.h" |
|
6 #include "functions.h" |
6 #include "industry_map.h" |
7 #include "industry_map.h" |
7 #include "station_map.h" |
8 #include "station_map.h" |
8 #include "table/strings.h" |
9 #include "table/strings.h" |
9 #include "table/sprites.h" |
10 #include "table/sprites.h" |
10 #include "functions.h" |
|
11 #include "map.h" |
11 #include "map.h" |
12 #include "tile.h" |
12 #include "tile.h" |
13 #include "viewport.h" |
13 #include "viewport.h" |
14 #include "command.h" |
14 #include "command.h" |
15 #include "industry.h" |
15 #include "industry.h" |
1877 |
1877 |
1878 /* 3% chance that we start a new industry */ |
1878 /* 3% chance that we start a new industry */ |
1879 if (CHANCE16(3, 100)) { |
1879 if (CHANCE16(3, 100)) { |
1880 MaybeNewIndustry(Random()); |
1880 MaybeNewIndustry(Random()); |
1881 } else if (!_patches.smooth_economy && GetIndustryArraySize() > 0) { |
1881 } else if (!_patches.smooth_economy && GetIndustryArraySize() > 0) { |
1882 i = GetIndustry(RandomRange(GetIndustryArraySize())); |
1882 i = GetRandomIndustry(); |
1883 if (IsValidIndustry(i)) ChangeIndustryProduction(i); |
1883 if (i != NULL) ChangeIndustryProduction(i); |
1884 } |
1884 } |
1885 |
1885 |
1886 _current_player = old_player; |
1886 _current_player = old_player; |
1887 |
1887 |
1888 // production-change |
1888 // production-change |