summaryrefslogtreecommitdiff
path: root/bin/game
diff options
context:
space:
mode:
Diffstat (limited to 'bin/game')
-rw-r--r--bin/game/compat_1.2.nut8
-rw-r--r--bin/game/compat_1.3.nut8
2 files changed, 16 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);
+}
diff --git a/bin/game/compat_1.3.nut b/bin/game/compat_1.3.nut
index 656794c89..d58a34685 100644
--- a/bin/game/compat_1.3.nut
+++ b/bin/game/compat_1.3.nut
@@ -8,3 +8,11 @@
*/
GSLog.Info("1.3 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);
+}