summaryrefslogtreecommitdiff
path: root/bin/game/compat_1.2.nut
diff options
context:
space:
mode:
Diffstat (limited to 'bin/game/compat_1.2.nut')
-rw-r--r--bin/game/compat_1.2.nut8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/game/compat_1.2.nut b/bin/game/compat_1.2.nut
index f9a63e698..6126809c8 100644
--- a/bin/game/compat_1.2.nut
+++ b/bin/game/compat_1.2.nut
@@ -8,3 +8,11 @@
*/
GSLog.Info("1.2 API compatability in effect.");
+
+GSTown._SetGrowthRate <- GSTown.SetGrowthRate;
+GSTown.SetGrowthRate <- function(town_id, days_between_town_growth)
+{
+ /* Growth rate 0 caused resetting the custom growth rate. While this was undocumented, it was used nevertheless (ofc). */
+ if (days_between_town_growth == 0) days_between_town_growth = GSTown.TOWN_GROWTH_NORMAL;
+ return GSTown._SetGrowthRate(town_id, days_between_town_growth);
+}