From 9c99d9ef5bf1eac483d34e0435cec51871ff974d Mon Sep 17 00:00:00 2001
From: Svornost <11434-svornost@users.noreply.gitgud.io>
Date: Mon, 14 Dec 2020 22:24:08 -0800
Subject: [PATCH] Little fixes - missing semicolon, etc.

---
 src/Mods/SecExp/js/secExpBC.js |  4 ++--
 src/js/economyJS.js            | 12 ++++--------
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/src/Mods/SecExp/js/secExpBC.js b/src/Mods/SecExp/js/secExpBC.js
index 3a3c9fe42af..46d090fd112 100644
--- a/src/Mods/SecExp/js/secExpBC.js
+++ b/src/Mods/SecExp/js/secExpBC.js
@@ -106,11 +106,11 @@ App.SecExp.generalBC = function() {
 				V.SecExp.units.mercs.free = 30;
 			}
 		}
-		
+
 		for (const squad of App.SecExp.unit.humanSquads()) {
 			App.SecExp.unit.fixBroken(squad);
 		}
-		
+
 		if (V.SecExp.defaultNames) {
 			V.SecExp.units.slaves.defaultName = V.SecExp.defaultNames.slaves;
 			V.SecExp.units.mercs.defaultName = V.SecExp.defaultNames.mercs;
diff --git a/src/js/economyJS.js b/src/js/economyJS.js
index 4816d267ae7..090b370b6f3 100644
--- a/src/js/economyJS.js
+++ b/src/js/economyJS.js
@@ -620,7 +620,7 @@ globalThis.calculateCosts = (function() {
 
 	// security expansion
 	function getSecurityExpansionCost() {
-		let secExpCost = 0, soldierMod = 1.5; // V.SecExp.edicts.defense.soldierWages === 1
+		let secExpCost = 0;
 		if (V.secExpEnabled > 0) {
 			const unitModifier = function(x) {
 				if (x === 'slaves') {
@@ -629,16 +629,12 @@ globalThis.calculateCosts = (function() {
 					return 1.5;
 				}
 				return 1;
-			}
-			
+			};
+
 			secExpCost += App.SecExp.upkeep.edictsCash();
 			secExpCost += App.SecExp.upkeep.SF();
 			secExpCost += App.SecExp.upkeep.buildings();
-			if (V.SecExp.edicts.defense.soldierWages === 0) {
-				soldierMod = 1;
-			} else if (V.SecExp.edicts.defense.soldierWages === 2) {
-				soldierMod = 2;
-			}
+			const soldierMod = 1 + V.SecExp.edicts.defense.soldierWages * 0.5; // 1.0, 1.5, 2.0
 
 			for (const unit of App.SecExp.unit.list().slice(1)) {
 				for (const squad of V.SecExp.units[unit].squads) {
-- 
GitLab