Changeset - r27765:44ffddcdb601
[Not reviewed]
master
0 1 0
Jonathan G Rennison - 10 months ago 2023-08-01 18:06:41
j.g.rennison@gmail.com
Fix #11164: Duplicate town names when using the many random towns function
1 file changed with 5 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/town_cmd.cpp
Show inline comments
 
@@ -2256,6 +2256,11 @@ bool GenerateTowns(TownLayout layout)
 

	
 
	SetGeneratingWorldProgress(GWP_TOWN, total);
 

	
 
	/* Pre-populate the town names list with the names of any towns already on the map */
 
	for (const Town *town : Town::Iterate()) {
 
		town_names.insert(town->GetCachedName());
 
	}
 

	
 
	/* First attempt will be made at creating the suggested number of towns.
 
	 * Note that this is really a suggested value, not a required one.
 
	 * We would not like the system to lock up just because the user wanted 100 cities on a 64*64 map, would we? */
0 comments (0 inline, 0 general)