From 5767d4f83a2cc949c8766aa2b3b300085bcd288f Mon Sep 17 00:00:00 2001 From: Rolf van Kleef Date: Tue, 24 Apr 2018 01:35:15 +0200 Subject: [PATCH] Tiny money fix, but not complete --- scripts/helpers/gamerules.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/helpers/gamerules.lua b/scripts/helpers/gamerules.lua index dbbc3e6..0437ca9 100644 --- a/scripts/helpers/gamerules.lua +++ b/scripts/helpers/gamerules.lua @@ -162,13 +162,14 @@ function gamerules.startTurn(state) end end state.currentTurnEffects = newEffects - state.properties.money = state.properties.money + gamerules.getMoneyPerTurn(state) + math.min ( -gamerules.getTotalResource(state, "work"), state.properties.population) beforeTurn.housing = gamerules.getTotalHousing(state) beforeTurn.happiness = gamerules.getHappiness(state) beforeTurn.work = gamerules.getAvailableWork(state) beforeTurn.power = gamerules.getExcessPower(state) beforeTurn.money = state.properties.money + + state.properties.money = state.properties.money + gamerules.getMoneyPerTurn(state) + math.min ( -gamerules.getTotalResource(state, "work"), state.properties.population) end function gamerules.endTurn(state)