diff --git a/src/Mods/SecExp/js/authorityReport.js b/src/Mods/SecExp/js/authorityReport.js index be3e4d7be55a9681ad75919ad0fd2b06abf6423a..1d7a1d9e42e26c891ba7c73fba77a08ab069d671 100644 --- a/src/Mods/SecExp/js/authorityReport.js +++ b/src/Mods/SecExp/js/authorityReport.js @@ -97,7 +97,7 @@ App.SecExp.authorityReport = function() { const activeUnits = App.SecExp.battle.activeUnits(); if (activeUnits >= 4) { - t = `Your military is `; + r.push(`Your military is`); if (activeUnits >= 9) { r.push(`massive; commanding so many troops greatly`); } else if (activeUnits >= 7) { @@ -105,7 +105,7 @@ App.SecExp.authorityReport = function() { } else if (activeUnits >= 4) { r.push(`at a decent size; commanding a small army`); } - r.push(t += ` increases your authority.`); + r.push(`increases your authority.`); authGrowth += (12 * activeUnits); } @@ -163,35 +163,35 @@ App.SecExp.authorityReport = function() { if (V.SecExp.settings.rebellion.enabled === 1) { const authorityEffects = function(group) { - let t, bonus; + let text, bonus; if (V.SecExp.core.authority <= 3000) { - t = `Your very low authority allows ${group} to think too freely.`; + text = `Your very low authority allows ${group} to think too freely.`; bonus = 30; } else if (V.SecExp.core.authority <= 6000) { - t = `Your low authority allows ${group} to think too freely.`; + text = `Your low authority allows ${group} to think too freely.`; bonus = 25; } else if (V.SecExp.core.authority <= 9000) { - t = `Your moderate authority allows ${group} to think a bit too freely.`; + text = `Your moderate authority allows ${group} to think a bit too freely.`; bonus = 20; } else if (V.SecExp.core.authority <= 12000) { - t = `Your good authority does not allow ${group} to think too freely.`; + text = `Your good authority does not allow ${group} to think too freely.`; bonus = 15; } else if (V.SecExp.core.authority <= 15000) { - t = `Your high authority does not allow ${group} to think too freely.`; + text = `Your high authority does not allow ${group} to think too freely.`; bonus = 10; } else if (V.SecExp.core.authority <= 18000) { - t = `Your very high authority does not allow ${group} to think too freely.`; + text = `Your very high authority does not allow ${group} to think too freely.`; bonus = 5; } else { - t = `Your absolute authority does not allow ${group} to have a single free thought.`; + text = `Your absolute authority does not allow ${group} to have a single free thought.`; bonus = 1; } - return {text: t, bonus: bonus}; + return {text, bonus}; }; let slave, citizen; const CSratio = V.ACitizens / V.ASlaves; - t = `<br><br> <strong>Slaves security analysis:</strong> `; + r.push(`<br><br><strong>Slaves security analysis:</strong>`); r.push(t + authorityEffects('slaves').text); slave = authorityEffects('slaves').bonus; if (CSratio <= 0.4) { r.push(`There are a lot more slaves than citizens, making some doubt their masters are strong enough to stop them.`); @@ -250,8 +250,8 @@ App.SecExp.authorityReport = function() { slave += 5; } - t = `<br><br><strong>Citizens security analysis:</strong>`; - r.push(t + authorityEffects('your citizens').text); citizen = authorityEffects('your citizens').bonus; + r.push(`<br><br><strong>Citizens security analysis:</strong>`); + r.push(authorityEffects('your citizens').text); citizen = authorityEffects('your citizens').bonus; if (V.SecExp.core.crimeLow >= 90) { r.push(`The very high crime level of the arcology breeds extreme discontent between your citizens.`); citizen += 30; @@ -339,7 +339,7 @@ App.SecExp.authorityReport = function() { } t = `<br><br>`; - const {HeU, heU, hisU, himU, himselfU} = getNonlocalPronouns(V.seeDicks); + const {HeU, heU, hisU, himU, himselfU} = getNonlocalPronouns(V.seeDicks).appendSuffix("U"); switch (miniEvent) { case 1: if (rand === 0) { @@ -432,8 +432,8 @@ App.SecExp.authorityReport = function() { } V.SecExp.rebellions.tension = Math.clamp(V.SecExp.rebellions.tension, 0, 100); } else if (V.SecExp.rebellions.tension > 0) { // otherwise SecExp.rebellions.tension decays - r.push(`<br><br><strong>SecExp.rebellions.tension</strong>:`); - if (V.SecExp.buildings.riotCenter.upgrades.freeMedia >= 1) { + r.push(`<br><br><strong>Tension</strong>:`); + if (V.SecExp.buildings.riotCenter && V.SecExp.buildings.riotCenter.upgrades.freeMedia >= 1) { r.push(`The guaranteed free media access you offer does wonders to lower tensions in the arcology.`); V.SecExp.rebellions.tension = Math.trunc(Math.clamp(V.SecExp.rebellions.tension - V.SecExp.buildings.riotCenter.upgrades.freeMedia / 2, 0, 100)); }