diff src/openttd.cpp @ 6486:12262d0c44ed draft

(svn r9667) -Feature: Add the concept of cities. A (configurable) proportion of towns can start off larger, and will grow twice as quickly as other towns. They can also be placed specifically in the scenario editor. Thanks to TheJosh for the initial patch and the idea.
author maedhros <maedhros@openttd.org>
date Wed, 18 Apr 2007 14:23:30 +0000
parents 666fc3ef3174
children 696f0e1b046e
line wrap: on
line diff
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -1913,6 +1913,19 @@
 		}
 	}
 
+	/* A patch option containing the proportion of towns that grow twice as
+	 * fast was added in version 54. From version 56 this is now saved in the
+	 * town as cities can be built specifically in the scenario editor. */
+	if (CheckSavegameVersion(56)) {
+		Town *t;
+
+		FOR_ALL_TOWNS(t) {
+			if (_patches.larger_towns != 0 && (t->index % _patches.larger_towns) == 0) {
+				t->larger_town = true;
+			}
+		}
+	}
+
 	return true;
 }