From b255b8cf1526865c308bc39c72f4b18f8dbb6c22 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Fri, 8 Jun 2018 17:52:01 +0300 Subject: [PATCH] You will always generate at least 1 science per turn, so that you don't get strange numbers on the Tech button --- core/src/com/unciv/logic/civilization/CivilizationInfo.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/com/unciv/logic/civilization/CivilizationInfo.kt b/core/src/com/unciv/logic/civilization/CivilizationInfo.kt index 5284ae2b00..7608850efc 100644 --- a/core/src/com/unciv/logic/civilization/CivilizationInfo.kt +++ b/core/src/com/unciv/logic/civilization/CivilizationInfo.kt @@ -59,7 +59,11 @@ class CivilizationInfo { statsForTurn.culture += statsForTurn.happiness / 2 if (statsForTurn.gold < 0) statsForTurn.science += statsForTurn.gold - if(statsForTurn.science<0) statsForTurn.science=0f + + // if we have - or 0, then the techs will never be complete and the tech button + // will show a negative number of turns and int.max, respectively + if(statsForTurn.science<1) statsForTurn.science=1f + return statsForTurn }