From 1500b8449cafa48f0b4b20aa6f85b700b55f592a Mon Sep 17 00:00:00 2001
From: x <okp57855@psoxs.com>
Date: Sun, 5 Aug 2018 21:58:01 +1200
Subject: [PATCH] SF subsidy fixes

---
 devNotes/twine JS.txt            | 2 +-
 src/js/economyJS.tw              | 2 +-
 src/uncategorized/costsReport.tw | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt
index e218df1664f..1d417f82fb4 100644
--- a/devNotes/twine JS.txt	
+++ b/devNotes/twine JS.txt	
@@ -2083,7 +2083,7 @@ window.getCost = function(array) {
 	}
 
 	if(State.variables.SFMODToggle === 1 && State.variables.SubsidyActive === 1) {
-		costs += ((100000*(State.variables.SFTroops/10))*1+(State.variables.arcologies[0].prosperity/100)*1+(State.variables.SFU/100));
+		costs += Math.ceil((1000*(State.variables.SFTroops/10))*1+(State.variables.arcologies[0].prosperity/100)*1+(State.variables.SFU/100));
 	}
 	
 	// clean up
diff --git a/src/js/economyJS.tw b/src/js/economyJS.tw
index 92cf814e287..583d7888a21 100644
--- a/src/js/economyJS.tw
+++ b/src/js/economyJS.tw
@@ -317,7 +317,7 @@ window.getCost = function(array) {
 	}
 
 	if(State.variables.SFMODToggle === 1 && State.variables.SubsidyActive === 1) {
-		costs += ((100000*(State.variables.SFTroops/10))*1+(State.variables.arcologies[0].prosperity/100)*1+(State.variables.SFU/100));
+		costs += Math.ceil((1000*(State.variables.SFTroops/10))*1+(State.variables.arcologies[0].prosperity/100)*1+(State.variables.SFU/100));
 	}
 
 	// clean up
diff --git a/src/uncategorized/costsReport.tw b/src/uncategorized/costsReport.tw
index acc1fadba3d..e9dfaffc690 100644
--- a/src/uncategorized/costsReport.tw
+++ b/src/uncategorized/costsReport.tw
@@ -48,7 +48,7 @@
 <</if>>
 
 <<if $SFMODToggle === 1 && $SubsidyActive === 1>>
-	<<print cashFormat(((100000*(V.SFTroops/10))*1+(V.arcologies[0].prosperity/100)*1+(V.SFU/100)))>> to support $securityForceName untill it becomes self-sufficient.
+	<br>__$SFNameCaps subsidy:__ <<print cashFormat(Math.ceil((10000*($SFTroops/10))*1+($arcologies[0].prosperity/100)*1+($SFU/100)))>>
 <</if>>
 <<if $mercenaries > 0>>
 	<<set _mercCosts = $mercenaries*2000>>
-- 
GitLab