diff --git a/src/003-assets/CSS/slaveList.css b/src/003-assets/CSS/slaveList.css index dab490489701ec1f77718d5cf17d8085fff3f596..1622a6a9f60b779856d1aa0468867cb8aadfaf3e 100644 --- a/src/003-assets/CSS/slaveList.css +++ b/src/003-assets/CSS/slaveList.css @@ -18,6 +18,7 @@ span.freeAssignment { /* Slave Summary Block */ .ssb { margin-right: 2em; + text-indent: 0; } .strong { diff --git a/src/Mods/SecExp/js/authorityReport.js b/src/Mods/SecExp/js/authorityReport.js index 90ca20c85ded8b92cc43f37896a5b80e33494553..142156797fc8599056e84a0607de3b1502048228 100644 --- a/src/Mods/SecExp/js/authorityReport.js +++ b/src/Mods/SecExp/js/authorityReport.js @@ -368,7 +368,7 @@ App.SecExp.authorityReport = function() { } else if (rand === 3) { r.push(`This week a group of slavers entering the arcology was assaulted. Many reported heavy injuries, but fortunately there were no casualties. The attackers were disguised, but the security systems already identified several slaves who were likely part of the group, based on camera feeds.`); } else if (rand === 4) { - r.push(`This week the waterways were found infected by a virulent pathogen. The cause was later found to be a diseased slave that died while in the maintenance tunnels. It's not clear if the slave was there because of orders given to${himU} or if heU was trying to escape.`); + r.push(`This week the waterways were found infected by a virulent pathogen. The cause was later found to be a diseased slave that died while in the maintenance tunnels. It's not clear if the slave was there because of orders given to ${himU} or if ${heU} was trying to escape.`); } else { r.push(`This week a sleeper cell of a famous anti slavery organization was discovered in the low levels of the arcology. The group, however, was aware of the coming security forces and retreated before they could be dealt with.`); } diff --git a/src/Mods/SecExp/js/secExp.js b/src/Mods/SecExp/js/secExp.js index f8a3e6c6c52169eecbb5891c7db82bf9ed3b32c8..bf8581ba683f0a93040d86c95ede3edd1aa8b34d 100644 --- a/src/Mods/SecExp/js/secExp.js +++ b/src/Mods/SecExp/js/secExp.js @@ -4,12 +4,6 @@ App.SecExp.generator = (function() { rebellion, }; - function loyaltyCheck(squad) { - if ((squad.loyalty < 10 && random(1, 100) <= 70) || (squad.loyalty < 33 && random(1, 100) <= 30) || (squad.loyalty < 66 && random(1, 100) <= 10)) { - rebellingID.push(squad.ID); - } - } - function shared() { V.SecExp.war = V.SecExp.war || {}; V.SecExp.war.commander = "assistant"; @@ -221,7 +215,7 @@ App.SecExp.generator = (function() { V.SecExp.rebellions.lastEncounterWeeks++; } else { const isSlaveRebellion = V.slaveRebellion === 1; - let weekMod, rebellingID = []; + let weekMod; if (V.week <= 30) { weekMod = 0.75 + (0.01+(V.week/200)); } else if (V.week <= 60) { @@ -241,23 +235,18 @@ App.SecExp.generator = (function() { const rebelPercent = 0.3 * authFactor; const irregularPercent = 0.2 * repFactor; - for (const unit of V.slaveUnits) { - loyaltyCheck(unit); - } - for (const unit of V.militiaUnits) { - loyaltyCheck(unit); - } - for (const unit of V.mercUnits) { - loyaltyCheck(unit); - } - + const isDisloyal = (squad) => ((squad.loyalty < 10 && random(1, 100) <= 70) || (squad.loyalty < 33 && random(1, 100) <= 30) || (squad.loyalty < 66 && random(1, 100) <= 10)); const baseValue = Math.trunc((isSlaveRebellion ? V.ASlaves : V.ACitizens) * rebelPercent * weekMod) + random(-100, 100); const highestValue = isSlaveRebellion ? V.ASlaves : V.ACitizens; V.SecExp.war.attacker.troops = Math.clamp(baseValue, 50, highestValue); V.SecExp.war.attacker.equip = Math.clamp(V.SecExp.edicts.weaponsLaw + random((isSlaveRebellion ? -2 : -1), 1), 0, 4); V.SecExp.war.irregulars = Math.clamp(Math.trunc(V.ACitizens * irregularPercent * weekMod) + random(-100, 100), 50, V.ACitizens); V.SecExp.war.engageRule = 0; - V.SecExp.war.rebellingID = rebellingID; + V.SecExp.war.rebellingID = [].concat( + V.slaveUnits.filter(isDisloyal).map(u => u.ID), + V.militiaUnits.filter(isDisloyal).map(u => u.ID), + V.mercUnits.filter(isDisloyal).map(u => u.ID) + ); } } })();