From 564f4680f0c098ef3807caac8c527dc24ef101fe Mon Sep 17 00:00:00 2001 From: Jones <Jones> Date: Sat, 26 Jan 2019 10:00:57 +0100 Subject: [PATCH] EconomyJS and Neighbor tweaks --- src/js/economyJS.js | 5 +---- src/uncategorized/neighborsDevelopment.tw | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/js/economyJS.js b/src/js/economyJS.js index 3864095f42c..39c9cd6e1fb 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -954,14 +954,11 @@ window.corpValue = function() { // A positive q means adding shares to the market, negative means removing them window.corpSharePrice = function(q) { - if(!q) { - q = 0; - } const V = State.variables; if(V.corpIncorporated === 0) { return 0; } else { - return Math.trunc(1000 * (corpValue() / (V.personalShares + V.publicShares + q))); + return Math.trunc(1000 * (corpValue() / (V.personalShares + V.publicShares + (q || 0)))); } }; diff --git a/src/uncategorized/neighborsDevelopment.tw b/src/uncategorized/neighborsDevelopment.tw index 9621f282fdc..28e88254bd3 100644 --- a/src/uncategorized/neighborsDevelopment.tw +++ b/src/uncategorized/neighborsDevelopment.tw @@ -683,9 +683,7 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(Math.trunc((0.1*$arcol <</if>> <<if $arcologies[$i].FSSupremacist != "unset">> <<if $corpIncorporated == 1>> - <<if def $corpSpecRaces>> - <<if $corpSpecRaces.includes($arcologies[$i].FSSupremacistRace)>> - <<else>> + <<if !$corpSpecRaces.includes($arcologies[$i].FSSupremacistRace)>> It's a @@.lightgreen;good market@@ for your corporation's racially inferior slaves, improving sales and helping social progress. <<set $arcologies[$i].FSSupremacist += 1>> <<set $corpCash += _corpBonus, @@ -693,7 +691,6 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(Math.trunc((0.1*$arcol <</if>> <</if>> <</if>> - <</if>> <</if>> <<if $arcologies[$i].FSSubjugationist != "unset">> -- GitLab