summaryrefslogtreecommitdiff
path: root/src/script/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/api')
-rw-r--r--src/script/api/script_town.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/api/script_town.cpp b/src/script/api/script_town.cpp
index 4cdd6a9d0..64f8e166e 100644
--- a/src/script/api/script_town.cpp
+++ b/src/script/api/script_town.cpp
@@ -170,7 +170,7 @@
break;
default:
- EnforcePrecondition(false, days_between_town_growth <= MAX_TOWN_GROWTH_TICKS);
+ EnforcePrecondition(false, (days_between_town_growth * DAY_TICKS / TOWN_GROWTH_TICKS) <= MAX_TOWN_GROWTH_TICKS);
/* Don't use growth_rate 0 as it means GROWTH_NORMAL */
growth_rate = max(days_between_town_growth * DAY_TICKS, 2u) - 1;
break;