From b1f41a0afb460071db2dbbfcb64140488f073382 Mon Sep 17 00:00:00 2001 From: frosch Date: Tue, 12 Nov 2013 17:56:35 +0000 Subject: (svn r25967) -Add: [NoGo] GSTown::TOWN_GROWTH_NORMAL to reset a town growth rate set previously via GSTown::SetGrowthRate. --- bin/game/compat_1.2.nut | 8 ++++++++ bin/game/compat_1.3.nut | 8 ++++++++ 2 files changed, 16 insertions(+) (limited to 'bin') 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); +} -- cgit v1.2.3-70-g09d2