Changeset - r7203:5d66395afdfa
[Not reviewed]
master
0 1 0
maedhros - 17 years ago 2007-07-08 18:41:34
maedhros@openttd.org
(svn r10481) -Codechange: Show a news message with the new industry when primary industry prospecting succeeds.
1 file changed with 8 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/industry_cmd.cpp
Show inline comments
 
@@ -1549,7 +1549,14 @@ CommandCost CmdBuildIndustry(TileIndex t
 
			if (Random() <= indspec->prospecting_chance) {
 
				for (int i = 0; i < 5000; i++) {
 
					const IndustryTileTable *it = indspec->table[RandomRange(indspec->num_table)];
 
					if (CreateNewIndustryHelper(RandomTile(), p1, flags, indspec, it) != NULL) break;
 
					const Industry *ind = CreateNewIndustryHelper(RandomTile(), p1, flags, indspec, it);
 
					if (ind != NULL) {
 
						SetDParam(0, indspec->name);
 
						SetDParam(1, ind->town->index);
 
						AddNewsItem(indspec->new_industry_text,
 
								NEWS_FLAGS(NM_THIN, NF_VIEWPORT | NF_TILE, NT_OPENCLOSE, 0), ind->xy, 0);
 
						break;
 
					}
 
				}
 
			}
 
		}
0 comments (0 inline, 0 general)