diff --git a/src/Mods/SecExp/js/secExp.js b/src/Mods/SecExp/js/secExp.js index ad1c54f0f63d5e5437efeb7c2cc63440a87d4aa0..a739c0e6192ea9c13dc460d49ffec937b713aa23 100644 --- a/src/Mods/SecExp/js/secExp.js +++ b/src/Mods/SecExp/js/secExp.js @@ -370,246 +370,7 @@ App.SecExp.Check = (function() { }; function general() { - if (jsDef(V.secExp)) { - if (V.secExpEnabled !== 1) { - V.secExpEnabled = V.secExp; - } - delete V.secExp; - } - if (typeof V.secExpEnabled !== "number") { - V.secExpEnabled = 0; - } - V.SecExp = V.SecExp || SecExpBase(); - V.SecExp.settings = V.SecExp.settings || {}; - delete V.SecExp.settings.show; - - delete V.SecExp.army; - - if (V.secExpEnabled > 0) { - Object.assign(V.secBots, { - active: V.secBots.active || V.arcologyUpgrade.drones > 0 ? 1 : 0, - ID: -1, - isDeployed: V.secBots.isDeployed || 0, - troops: Math.max(V.secBots.troops, V.arcologyUpgrade.drones > 0 ? 30 : 0), - maxTroops: Math.max(V.secBots.maxTroops, V.arcologyUpgrade.drones > 0 ? 30 : 0) - }); - - V.SecExp.core = V.SecExp.core || {}; - - V.SecExp.core.trade = V.SecExp.core.trade || 0; - if (passage() === "Acquisition" || V.SecExp.core.trade === 0) { - let init = jsRandom(20, 30); - if (V.terrain === "urban") { - init += jsRandom(10, 10); - } else if (V.terrain === "ravine") { - init -= jsRandom(5, 5); - } - if (["BlackHat", "capitalist", "celebrity", "wealth"].includes(V.PC.career)) { - init += jsRandom(5, 5); - } else if (["escort", "gang", "servant"].includes(V.PC.career)) { - init -= jsRandom(5, 5); - } - V.SecExp.core.trade = init; - } - if (jsDef(V.trade)) { - V.SecExp.core.trade = V.trade; - } - - V.SecExp.core.authority = V.SecExp.core.authority || 0; - if (jsDef(V.authority)) { - V.SecExp.core.authority = V.authority; - } - - V.SecExp.security = V.SecExp.security || {}; - V.SecExp.security.cap = V.SecExp.security.cap || 100; - if (jsDef(V.security)) { - V.SecExp.security.cap = V.security; - } - V.SecExp.core.crimeLow = V.SecExp.core.crimeLow || 30; - if (jsDef(V.crime)) { - V.SecExp.core.crimeLow = V.crime; - } - - V.SecExp.settings.difficulty = V.SecExp.settings.difficulty || 1; - if (jsDef(V.difficulty)) { - V.SecExp.settings.difficulty = V.difficulty; - } - - V.SecExp.settings.battle = V.SecExp.settings.battle || {}; - if (!jsDef(V.SecExp.settings.battle.enabled)) { - V.SecExp.settings.battle.enabled = 1; - } - if (jsDef(V.battlesEnabled)) { - V.SecExp.settings.battle.enabled = V.battlesEnabled; - } - delete V.SecExp.battle; - - V.SecExp.settings.battle.major = V.SecExp.settings.battle.major || {}; - V.SecExp.settings.battle.frequency = V.SecExp.settings.battle.frequency || 1; - if (jsDef(V.battleFrequency)) { - V.SecExp.settings.battle.frequency = V.battleFrequency; - } - V.SecExp.settings.battle.force = V.SecExp.settings.battle.force || 0; - if (jsDef(V.forceBattle)) { - V.SecExp.settings.battle.force = V.forceBattle; - } - - if (jsDef(V.readiness)) { - if(V.readiness === 10) { - V.sectionInFirebase = 1; - } - } - - V.SecExp.settings.unitDescriptions = V.SecExp.settings.unitDescriptions || 0; - - if (!jsDef(V.SecExp.settings.battle.allowSlavePrestige)) { - V.SecExp.settings.battle.allowSlavePrestige = 1; - } - if (jsDef(V.allowPrestigeFromBattles)) { - V.SecExp.settings.battle.allowSlavePrestige = V.allowPrestigeFromBattles; - } - - V.SecExp.settings.battle.major.enabled = V.SecExp.settings.battle.major.enabled || 0; - if (jsDef(V.majorBattlesEnabled)) { - V.SecExp.settings.battle.major.enabled = V.majorBattlesEnabled; - } - - if (!jsDef(V.SecExp.settings.battle.major.gameOver)) { - V.SecExp.settings.battle.major.gameOver = 1; - } - if (jsDef(V.majorBattleGameOver)) { - V.SecExp.settings.battle.major.gameOver = V.majorBattleGameOver; - } - V.SecExp.settings.battle.major.force = V.SecExp.settings.battle.major.force || 0; - if (jsDef(V.forceMajorBattle)) { - V.SecExp.settings.battle.major.force = V.forceMajorBattle; - } - V.SecExp.settings.battle.major.mult = V.SecExp.settings.battle.major.mult || 1; - - V.SecExp.settings.rebellion = V.SecExp.settings.rebellion || {}; - if (!jsDef(V.SecExp.settings.rebellion.enabled)) { - V.SecExp.settings.rebellion.enabled = 1; - } - if (jsDef(V.rebellionsEnabled)) { - V.SecExp.settings.rebellion.enabled = V.rebellionsEnabled; - } - - V.SecExp.settings.rebellion.force = V.SecExp.settings.rebellion.force || 0; - if (jsDef(V.forceRebellion)) { - V.SecExp.settings.rebellion.force = V.forceRebellion; - } - if (!jsDef(V.SecExp.settings.rebellion.gameOver)) { - V.SecExp.settings.rebellion.gameOver = 1; - } - if (jsDef(V.rebellionGameOver)) { - V.SecExp.settings.rebellion.gameOver = V.rebellionGameOver; - } - - V.SecExp.settings.rebellion.speed = V.SecExp.settings.rebellion.speed || 1; - if (jsDef(V.rebellionSpeed)) { - V.SecExp.settings.rebellion.speed = V.rebellionSpeed; - } - - if (V.SecExp.settings.battle.enabled + V.SecExp.settings.rebellion.enabled > 0) { - V.SecExp.settings.showStats = V.SecExp.settings.showStats || 0; - if (jsDef(V.showBattleStatistics)) { - V.SecExp.settings.showStats = V.showBattleStatistics; - } - } - - V.SecExp.buildings = V.SecExp.buildings || {}; - V.SecExp.buildings.propHub = V.SecExp.buildings.propHub || {}; - V.SecExp.buildings.propHub.active = V.SecExp.buildings.propHub.active || 0; - if (V.SecExp.buildings.pr === null) { - delete V.SecExp.buildings.pr; - } - if (jsDef(V.SecExp.buildings.pr)) { - V.SecExp.buildings.propHub = V.SecExp.buildings.pr; - delete V.SecExp.buildings.pr; - } - if (jsDef(V.propHub)) { - V.SecExp.buildings.propHub.active = V.propHub; - } - - if (V.SecExp.buildings.propHub.active > 0) { - V.SecExp.buildings.propHub.recuriterOffice = V.SecExp.buildings.propHub.recuriterOffice || 0; - V.SecExp.buildings.propHub.campaign = V.SecExp.buildings.propHub.campaign || 0; - if (jsDef(V.propCampaign)) { - V.SecExp.buildings.propHub.campaign = V.propCampaign; - } - - V.SecExp.buildings.propHub.miniTruth = V.SecExp.buildings.propHub.miniTruth || 0; - if (jsDef(V.miniTruth)) { - V.SecExp.buildings.propHub.miniTruth = V.miniTruth; - } - - V.SecExp.buildings.propHub.secretService = V.SecExp.buildings.propHub.secretService || 0; - if (jsDef(V.secretService)) { - V.SecExp.buildings.propHub.secretService = V.secretService; - } - if (jsDef(V.SecExp.buildings.propHub.SS)) { - V.SecExp.buildings.propHub.secretService = V.SecExp.buildings.propHub.SS; - delete V.SecExp.buildings.propHub.SS; - } - - if (V.SecExp.buildings.propHub.campaign >= 1) { - V.SecExp.buildings.propHub.focus = V.SecExp.buildings.propHub.focus || "social engineering"; - if (jsDef(V.propFocus) && V.propFocus !== "none") { - V.SecExp.buildings.propHub.focus = V.propFocus; - } - } - - if (jsDef(V.RecuriterOffice)) { - V.recuriterOffice = V.RecuriterOffice; - } - const vars = ['recuriterOffice', 'fakeNews', 'controlLeaks', 'marketInfiltration', 'blackOps']; - for(let i = 0; i < vars.length; i++) { - if (jsDef(V[vars[i]]) && V[vars[i]] > 0) { - V.SecExp.buildings.propHub[vars[i]] = V[vars[i]]; - delete V[vars[i]]; - } else { - V.SecExp.buildings.propHub[vars[i]] = V.SecExp.buildings.propHub[vars[i]] || 0; - } - } - } - - V.SecExp.buildings.barracks = V.SecExp.buildings.barracks || {}; - V.SecExp.buildings.barracks.active = V.SecExp.buildings.barracks.active || 0; - if (jsDef(V.secBarracks)) { - V.SecExp.buildings.barracks.active = V.secBarracks; - } - - if (V.SecExp.buildings.barracks.active > 0) { - V.SecExp.buildings.barracks.upgrades = V.SecExp.buildings.barracks.upgrades || {}; - V.SecExp.buildings.barracks.upgrades.size = V.SecExp.buildings.barracks.upgrades.size || 0; - V.SecExp.buildings.barracks.upgrades.luxury = V.SecExp.buildings.barracks.upgrades.luxury || 0; - V.SecExp.buildings.barracks.upgrades.training = V.SecExp.buildings.barracks.upgrades.training || 0; - V.SecExp.buildings.barracks.upgrades.loyaltyMod = V.SecExp.buildings.barracks.upgrades.loyaltyMod || 0; - if (jsDef(V.secBarracksUpgrades)) { - V.SecExp.buildings.barracks.upgrades = V.secBarracksUpgrades; - } - } - - V.SecExp.proclamation = V.SecExp.proclamation || {}; - V.SecExp.proclamation.cooldown = V.SecExp.proclamation.cooldown || 0; - if (jsDef(V.proclamationsCooldown)) { - V.SecExp.proclamation.cooldown = V.proclamationsCooldown; - } - V.SecExp.proclamation.currency = V.SecExp.proclamation.currency || ""; - if (jsDef(V.proclamationCurrency)) { - V.SecExp.proclamation.currency = V.proclamationCurrency; - } - V.SecExp.proclamation.type = V.SecExp.proclamation.type || "crime"; - if (jsDef(V.proclamationType)) { - if (V.proclamationType !== "none") { - V.SecExp.proclamation.type = V.proclamationType; - } - } - } - - if (jsDef(V.SecExp.core)) { - delete V.SecExp.core.crimeCap; - } + App.SecExp.generalBC(); } // Closes general check function. function secRestPoint() { diff --git a/src/Mods/SecExp/js/secExpBC.js b/src/Mods/SecExp/js/secExpBC.js new file mode 100644 index 0000000000000000000000000000000000000000..efbc3f89b41104e62e9f9cb74b4c3a268f8dcdf7 --- /dev/null +++ b/src/Mods/SecExp/js/secExpBC.js @@ -0,0 +1,243 @@ +// @ts-nocheck +App.SecExp.generalBC = function (){ + if (jsDef(V.secExp)) { + if (V.secExpEnabled !== 1) { + V.secExpEnabled = V.secExp; + } + delete V.secExp; + } + if (typeof V.secExpEnabled !== "number") { + V.secExpEnabled = 0; + } + V.SecExp = V.SecExp || SecExpBase(); + V.SecExp.settings = V.SecExp.settings || {}; + delete V.SecExp.settings.show; + + delete V.SecExp.army; + + if (V.secExpEnabled > 0) { + Object.assign(V.secBots, { + active: V.secBots.active || V.arcologyUpgrade.drones > 0 ? 1 : 0, + ID: -1, + isDeployed: V.secBots.isDeployed || 0, + troops: Math.max(V.secBots.troops, V.arcologyUpgrade.drones > 0 ? 30 : 0), + maxTroops: Math.max(V.secBots.maxTroops, V.arcologyUpgrade.drones > 0 ? 30 : 0) + }); + + V.SecExp.core = V.SecExp.core || {}; + + V.SecExp.core.trade = V.SecExp.core.trade || 0; + if (passage() === "Acquisition" || V.SecExp.core.trade === 0) { + let init = jsRandom(20, 30); + if (V.terrain === "urban") { + init += jsRandom(10, 10); + } else if (V.terrain === "ravine") { + init -= jsRandom(5, 5); + } + if (["BlackHat", "capitalist", "celebrity", "wealth"].includes(V.PC.career)) { + init += jsRandom(5, 5); + } else if (["escort", "gang", "servant"].includes(V.PC.career)) { + init -= jsRandom(5, 5); + } + V.SecExp.core.trade = init; + } + if (jsDef(V.trade)) { + V.SecExp.core.trade = V.trade; + } + + V.SecExp.core.authority = V.SecExp.core.authority || 0; + if (jsDef(V.authority)) { + V.SecExp.core.authority = V.authority; + } + + V.SecExp.security = V.SecExp.security || {}; + V.SecExp.security.cap = V.SecExp.security.cap || 100; + if (jsDef(V.security)) { + V.SecExp.security.cap = V.security; + } + V.SecExp.core.crimeLow = V.SecExp.core.crimeLow || 30; + if (jsDef(V.crime)) { + V.SecExp.core.crimeLow = V.crime; + } + + V.SecExp.settings.difficulty = V.SecExp.settings.difficulty || 1; + if (jsDef(V.difficulty)) { + V.SecExp.settings.difficulty = V.difficulty; + } + + V.SecExp.settings.battle = V.SecExp.settings.battle || {}; + if (!jsDef(V.SecExp.settings.battle.enabled)) { + V.SecExp.settings.battle.enabled = 1; + } + if (jsDef(V.battlesEnabled)) { + V.SecExp.settings.battle.enabled = V.battlesEnabled; + } + delete V.SecExp.battle; + + V.SecExp.settings.battle.major = V.SecExp.settings.battle.major || {}; + V.SecExp.settings.battle.frequency = V.SecExp.settings.battle.frequency || 1; + if (jsDef(V.battleFrequency)) { + V.SecExp.settings.battle.frequency = V.battleFrequency; + } + V.SecExp.settings.battle.force = V.SecExp.settings.battle.force || 0; + if (jsDef(V.forceBattle)) { + V.SecExp.settings.battle.force = V.forceBattle; + } + + if (jsDef(V.readiness)) { + if(V.readiness === 10) { + V.sectionInFirebase = 1; + } + } + + V.SecExp.settings.unitDescriptions = V.SecExp.settings.unitDescriptions || 0; + + if (!jsDef(V.SecExp.settings.battle.allowSlavePrestige)) { + V.SecExp.settings.battle.allowSlavePrestige = 1; + } + if (jsDef(V.allowPrestigeFromBattles)) { + V.SecExp.settings.battle.allowSlavePrestige = V.allowPrestigeFromBattles; + } + + V.SecExp.settings.battle.major.enabled = V.SecExp.settings.battle.major.enabled || 0; + if (jsDef(V.majorBattlesEnabled)) { + V.SecExp.settings.battle.major.enabled = V.majorBattlesEnabled; + } + + if (!jsDef(V.SecExp.settings.battle.major.gameOver)) { + V.SecExp.settings.battle.major.gameOver = 1; + } + if (jsDef(V.majorBattleGameOver)) { + V.SecExp.settings.battle.major.gameOver = V.majorBattleGameOver; + } + V.SecExp.settings.battle.major.force = V.SecExp.settings.battle.major.force || 0; + if (jsDef(V.forceMajorBattle)) { + V.SecExp.settings.battle.major.force = V.forceMajorBattle; + } + V.SecExp.settings.battle.major.mult = V.SecExp.settings.battle.major.mult || 1; + + V.SecExp.settings.rebellion = V.SecExp.settings.rebellion || {}; + if (!jsDef(V.SecExp.settings.rebellion.enabled)) { + V.SecExp.settings.rebellion.enabled = 1; + } + if (jsDef(V.rebellionsEnabled)) { + V.SecExp.settings.rebellion.enabled = V.rebellionsEnabled; + } + + V.SecExp.settings.rebellion.force = V.SecExp.settings.rebellion.force || 0; + if (jsDef(V.forceRebellion)) { + V.SecExp.settings.rebellion.force = V.forceRebellion; + } + if (!jsDef(V.SecExp.settings.rebellion.gameOver)) { + V.SecExp.settings.rebellion.gameOver = 1; + } + if (jsDef(V.rebellionGameOver)) { + V.SecExp.settings.rebellion.gameOver = V.rebellionGameOver; + } + + V.SecExp.settings.rebellion.speed = V.SecExp.settings.rebellion.speed || 1; + if (jsDef(V.rebellionSpeed)) { + V.SecExp.settings.rebellion.speed = V.rebellionSpeed; + } + + if (V.SecExp.settings.battle.enabled + V.SecExp.settings.rebellion.enabled > 0) { + V.SecExp.settings.showStats = V.SecExp.settings.showStats || 0; + if (jsDef(V.showBattleStatistics)) { + V.SecExp.settings.showStats = V.showBattleStatistics; + } + } + + V.SecExp.buildings = V.SecExp.buildings || {}; + V.SecExp.buildings.propHub = V.SecExp.buildings.propHub || {}; + V.SecExp.buildings.propHub.active = V.SecExp.buildings.propHub.active || 0; + if (V.SecExp.buildings.pr === null) { + delete V.SecExp.buildings.pr; + } + if (jsDef(V.SecExp.buildings.pr)) { + V.SecExp.buildings.propHub = V.SecExp.buildings.pr; + delete V.SecExp.buildings.pr; + } + if (jsDef(V.propHub)) { + V.SecExp.buildings.propHub.active = V.propHub; + } + + if (V.SecExp.buildings.propHub.active > 0) { + V.SecExp.buildings.propHub.recuriterOffice = V.SecExp.buildings.propHub.recuriterOffice || 0; + V.SecExp.buildings.propHub.campaign = V.SecExp.buildings.propHub.campaign || 0; + if (jsDef(V.propCampaign)) { + V.SecExp.buildings.propHub.campaign = V.propCampaign; + } + + V.SecExp.buildings.propHub.miniTruth = V.SecExp.buildings.propHub.miniTruth || 0; + if (jsDef(V.miniTruth)) { + V.SecExp.buildings.propHub.miniTruth = V.miniTruth; + } + + V.SecExp.buildings.propHub.secretService = V.SecExp.buildings.propHub.secretService || 0; + if (jsDef(V.secretService)) { + V.SecExp.buildings.propHub.secretService = V.secretService; + } + if (jsDef(V.SecExp.buildings.propHub.SS)) { + V.SecExp.buildings.propHub.secretService = V.SecExp.buildings.propHub.SS; + delete V.SecExp.buildings.propHub.SS; + } + + if (V.SecExp.buildings.propHub.campaign >= 1) { + V.SecExp.buildings.propHub.focus = V.SecExp.buildings.propHub.focus || "social engineering"; + if (jsDef(V.propFocus) && V.propFocus !== "none") { + V.SecExp.buildings.propHub.focus = V.propFocus; + } + } + + if (jsDef(V.RecuriterOffice)) { + V.recuriterOffice = V.RecuriterOffice; + } + const vars = ['recuriterOffice', 'fakeNews', 'controlLeaks', 'marketInfiltration', 'blackOps']; + for(let i = 0; i < vars.length; i++) { + if (jsDef(V[vars[i]]) && V[vars[i]] > 0) { + V.SecExp.buildings.propHub[vars[i]] = V[vars[i]]; + delete V[vars[i]]; + } else { + V.SecExp.buildings.propHub[vars[i]] = V.SecExp.buildings.propHub[vars[i]] || 0; + } + } + } + + V.SecExp.buildings.barracks = V.SecExp.buildings.barracks || {}; + V.SecExp.buildings.barracks.active = V.SecExp.buildings.barracks.active || 0; + if (jsDef(V.secBarracks)) { + V.SecExp.buildings.barracks.active = V.secBarracks; + } + + if (V.SecExp.buildings.barracks.active > 0) { + V.SecExp.buildings.barracks.upgrades = V.SecExp.buildings.barracks.upgrades || {}; + V.SecExp.buildings.barracks.upgrades.size = V.SecExp.buildings.barracks.upgrades.size || 0; + V.SecExp.buildings.barracks.upgrades.luxury = V.SecExp.buildings.barracks.upgrades.luxury || 0; + V.SecExp.buildings.barracks.upgrades.training = V.SecExp.buildings.barracks.upgrades.training || 0; + V.SecExp.buildings.barracks.upgrades.loyaltyMod = V.SecExp.buildings.barracks.upgrades.loyaltyMod || 0; + if (jsDef(V.secBarracksUpgrades)) { + V.SecExp.buildings.barracks.upgrades = V.secBarracksUpgrades; + } + } + + V.SecExp.proclamation = V.SecExp.proclamation || {}; + V.SecExp.proclamation.cooldown = V.SecExp.proclamation.cooldown || 0; + if (jsDef(V.proclamationsCooldown)) { + V.SecExp.proclamation.cooldown = V.proclamationsCooldown; + } + V.SecExp.proclamation.currency = V.SecExp.proclamation.currency || ""; + if (jsDef(V.proclamationCurrency)) { + V.SecExp.proclamation.currency = V.proclamationCurrency; + } + V.SecExp.proclamation.type = V.SecExp.proclamation.type || "crime"; + if (jsDef(V.proclamationType)) { + if (V.proclamationType !== "none") { + V.SecExp.proclamation.type = V.proclamationType; + } + } + } + + if (jsDef(V.SecExp.core)) { + delete V.SecExp.core.crimeCap; + } +}; diff --git a/src/Mods/SpecialForce/SpecialForce.js b/src/Mods/SpecialForce/SpecialForce.js index dc53b2c38a1a24b3924d8d15b79f41dc01696d13..88ca2598303e22be61244f454caadede97a07118 100644 --- a/src/Mods/SpecialForce/SpecialForce.js +++ b/src/Mods/SpecialForce/SpecialForce.js @@ -215,359 +215,6 @@ App.SF.Init = function() { // V.arcologies[0].SFRaid = 1; V.arcologies[0].SFRaidTarget = -1; }; -/* no-usedOnce */ -App.SF.BC = function() { - function InitClean() { - delete V.SFMODToggle; - delete V.securityForceActive; - delete V.securityForceCreate; - delete V.securityForceEventSeen; - } - - function MainClean() { - delete V.securityForceActive; - delete V.securityForceRecruit; - delete V.securityForceTrade; - delete V.securityForceBooty; - delete V.securityForceIncome; - delete V.securityForceMissionEfficiency; - delete V.securityForceProfitable; - delete V.TierTwoUnlock; - delete V.securityForceDepravity; - delete V.SFAO; - delete V.securityForceUpgradeTokenReset; - delete V.securityForceUpgradeToken; - delete V.securityForceGiftToken; - delete V.securityForceRulesOfEngagement; - delete V.securityForceFocus; - delete V.securityForceAccountability; - delete V.securityForceName; - delete V.SubsidyActive; - delete V.securityForceSubsidyActive; - } - - function ColonelClean() { - delete V.ColonelCore; - delete V.securityForceColonelToken; - delete V.securityForceColonelSexed; - delete V.ColonelRelationship; - delete V.securityForceSexedColonelToken; - } - - function TradeShowClean() { - delete V.OverallTradeShowAttendance; - delete V.CurrentTradeShowAttendance; - delete V.TradeShowIncome; - delete V.TotalTradeShowIncome; - delete V.TradeShowHelots; - delete V.TotalTradeShowHelots; - } - - function UnitsClean() { - delete V.securityForceInfantryPower; - delete V.securityForceArcologyUpgrades; - delete V.securityForceVehiclePower; - delete V.securityForceDronePower; - delete V.securityForceStimulantPower; - delete V.securityForceHeavyBattleTank; - delete V.securityForceAircraftPower; - delete V.securityForceSpacePlanePower; - delete V.securityForceAC130; - delete V.securityForceSatellitePower; - delete V.securityForceGiantRobot; - delete V.securityForceMissileSilo; - delete V.securityForceAircraftCarrier; - delete V.securityForceSubmarine; - delete V.securityForceHeavyAmphibiousTransport; - delete V.securityForcePersonnel; - delete V.securityForceFortressZeppelin; - delete V.securityForceHeavyTransport; - } - - if (typeof V.SF !== "object") { - if (V.securityForceEventSeen < 1) { - V.securityForceActive = -1; - } else { - V.securityForceActive = 2; - } - V.SF = {Toggle: V.SFMODToggle, Active: V.securityForceActive}; - InitClean(); - if (V.securityForceName === undefined) { - V.securityForceName = "the special force"; - } - if (V.SF.Active >= 1) { - Object.assign(V.SF, { - Depravity: V.securityForceDepravity, - Upgrade: V.securityForceUpgradeToken, - Gift: V.securityForceGiftToken, - UC: {Assign: V.SF.SpecOps, Lock: V.SF.SpecOpsLock}, - ROE: V.securityForceRulesOfEngagement, - Target: V.securityForceFocus, - Regs: V.securityForceAccountability, - Lower: V.securityForceName, - }); - MainClean(); - - if (V.ColonelCore === undefined) { - V.ColonelCore = ""; - } - if (V.ColonelDiscussion === undefined) { - V.ColonelDiscussion = 0; - } - if (V.ColonelSexed === undefined) { - V.ColonelSexed = 0; - } - V.SF.Colonel = { - Core: V.ColonelCore, - Talk: V.securityForceColonelToken, - Fun: V.securityForceColonelSexed, - Status: V.ColonelRelationship - }; - ColonelClean(); - - if (V.TradeShowIncome === undefined) { - V.TradeShowIncome = 0; - } - if (V.TotalTradeShowIncome === undefined) { - V.TotalTradeShowIncome = 0; - } - if (V.TradeShowHelots === undefined) { - V.TradeShowHelots = 0; - } - if (V.TotalTradeShowHelots === undefined) { - V.TotalTradeShowHelots = 0; - } - V.SF.MercCon = { - History: V.OverallTradeShowAttendance, - CanAttend: V.CurrentTradeShowAttendance, - Income: V.TradeShowIncome, - Revenue: V.TotalTradeShowIncome, - Menials: V.TradeShowHelots, - TotalMenials: V.TotalTradeShowHelots, - Mercs: 0, - TotalMercs: 0 - }; - TradeShowClean(); - if (V.SF.MercCon.History > 0) { - V.SF.MercCon.CanAttend = 1; - } - - if (V.securityForceHeavyBattleTank === undefined) { - V.securityForceHeavyBattleTank = 0; - } - if (V.securityForceSpacePlanePower === undefined) { - V.securityForceSpacePlanePower = 0; - } - if (V.securityForceAC130 === undefined) { - V.securityForceAC130 = 0; - } - if (V.securityForceSatellitePower === undefined) { - V.securityForceSatellitePower = 0; - } - if (V.securityForceGiantRobot === undefined) { - V.securityForceGiantRobot = 0; - } - if (V.securityForceMissileSilo === undefined) { - V.securityForceMissileSilo = 0; - } - if (V.securityForceAircraftCarrier === undefined) { - V.securityForceAircraftCarrier = 0; - } - if (V.securityForceSubmarine === undefined) { - V.securityForceSubmarine = 0; - } - if (V.securityForceHeavyAmphibiousTransport === undefined) { - V.securityForceHeavyAmphibiousTransport = 0; - } - - V.SF.ArmySize = V.securityForcePersonnel; - - V.SF.SatLaunched = 0; - - V.SF.Squad = { - Armoury: V.securityForceInfantryPower, - Firebase: V.securityForceArcologyUpgrades, - AV: V.securityForceVehiclePower, - TV: V.securityForceVehiclePower, - Drones: V.securityForceDronePower, - Drugs: V.securityForceStimulantPower, - PGT: V.securityForceHeavyBattleTank, - AA: V.securityForceAircraftPower, - TA: V.securityForceAircraftPower, - SpacePlane: V.securityForceSpacePlanePower, - GunS: V.securityForceAC130, - Satellite: V.securityForceSatellitePower, - GiantRobot: V.securityForceGiantRobot, - MissileSilo: V.securityForceMissileSilo, - AircraftCarrier: V.securityForceAircraftCarrier, - Sub: V.securityForceSubmarine, - HAT: V.securityForceHeavyAmphibiousTransport - }; - UnitsClean(); - } else { - App.SF.Init(); - } - } else if (typeof V.SF === "object") { - V.SF.FS = V.SF.FS || {}; - V.SF.FS.Tension = V.SF.FS.Tension || -1; - - if (V.SF.Toggle && V.SF.Active >= 1) { - V.SF.UC = V.SF.UC || {}; - V.SF.Depravity = V.SF.Depravity || 0; - V.SF.Upgrade = V.SF.Upgrade || 0; - V.SF.Gift = V.SF.Gift || 0; - V.SF.UC.Assign = V.SF.UC.Assign || 0; - V.SF.UC.Lock = V.SF.UC.Lock || 0; - V.SF.ROE = V.SF.ROE || "hold"; - V.SF.Target = V.SF.Target || "recruit"; - V.SF.Regs = V.SF.Regs || "strict"; - V.SF.Lower = V.SF.Lower || "the special force"; - - V.SF.ArmySize = V.SF.ArmySize || 40; - - V.SF.Squad = V.SF.Squad || {}; - for (let i = 0; i < App.SF.upgrades.list('all').length; i++) { - V.SF.Squad[App.SF.upgrades.list('all')[i]] = V.SF.Squad[App.SF.upgrades.list('all')[i]] || 0; - } - - V.SF.SatLaunched = V.SF.SatLaunched || 0; - - V.SF.Colonel = V.SF.Colonel || {}; - V.SF.Colonel.Core = V.SF.Colonel.Core || ""; - V.SF.Colonel.Talk = V.SF.Colonel.Talk || 0; - V.SF.Colonel.Fun = V.SF.Colonel.Fun || 0; - V.SF.Colonel.Status = V.SF.Colonel.Status || 0; - - V.SF.MercCon = V.SF.MercCon || {}; - V.SF.MercCon.History = V.SF.MercCon.History || 0; - V.SF.MercCon.CanAttend = V.SF.MercCon.CanAttend || 0; - if (V.SF.MercCon.History >= 1) { - V.SF.MercCon.CanAttend = -1; - } - V.SF.MercCon.Income = V.SF.MercCon.Income || 0; - V.SF.MercCon.Revenue = V.SF.MercCon.Revenue || 0; - V.SF.MercCon.Mercs = V.SF.MercCon.Mercs || 0; - V.SF.MercCon.Menials = V.SF.MercCon.Menials || 0; - V.SF.MercCon.TotalMenials = V.SF.MercCon.TotalMenials || 0; - V.SF.MercCon.TotalMercs = V.SF.MercCon.TotalMercs || 0; - - if (typeof V.SF.Squad.Satellite === "object") { - if (V.SF.Squad.Satellite.InOrbit > 0) { - V.SF.SatLaunched = V.SF.Squad.Satellite.InOrbit; delete V.SF.Squad.Satellite.InOrbit; - } - V.SF.Squad.Satellite = V.SF.Squad.Satellite.lv; - } - - delete V.SF.FS.upgrade; delete V.SF.UC.num; - - if (jsDef(V.choice)) { - V.SF.Gift = V.choice; - } - - if (V.Tour !== undefined) { - V.SF.tour = V.Tour || 0; - } - - if (V.SF.Squad.Troops) { - V.SF.ArmySize = V.SF.Squad.Troops; - delete V.SF.Squad.Troops; - } - - if (V.SF.MercCon !== undefined) { - if( V.SF.MercCon.View !== undefined) { - delete V.SF.MercCon.View; - } - if (V.SF.MercCon.Helots !== undefined) { - V.SF.MercCon.Menials = V.SF.MercCon.Helots; - delete V.SF.MercCon.Helots; - } - if (V.SF.MercCon.TotalHelots !== undefined) { - V.SF.MercCon.TotalMenials = V.SF.MercCon.TotalHelots; - delete V.SF.MercCon.TotalHelots; - } - } - - if (V.SF.SpecOps !== undefined && V.SF.SpecOpsLock !== undefined) { - V.SF.UC = {Assign: V.SF.SpecOps, Lock: V.SF.SpecOpsLock}; - } - - if (V.SFUC !== undefined) { - V.SF.UC.num = V.SFUC || 0; - } - - if (V.SpecOpsLock !== undefined) { - V.SF.SpecOpsLock = V.SpecOpsLock; - } - - if (V.SF.U !== undefined) { - V.SF.Upgrade = V.SF.U || 0; - } - - if (V.SF.WG !== undefined) { - V.SF.Gift = V.SF.WG || 0; - } - - if (V.SF.Depravity < 0) { - V.SF.Depravity = 0; - } - - if (V.SFUnit !== undefined) { - if (V.SFUnit.AT !== undefined) { - V.SFUnitTA = 0; - } - if (V.SFTradeShow !== undefined) { - V.SF.MercCon = V.SFTradeShow; - } - delete V.SFTradeShow; - if (V.SFColonel !== undefined) { - V.SF.Colonel = V.SFColonel; - } - - if (V.SF.Squad !== undefined && V.SF.Squad.Satellite !== undefined && V.SatLaunched !== undefined) { - V.SF.Squad.Sat = {lv: V.SF.Squad.Satellite, InOrbit: V.SatLaunched}; - V.SF.Squad.Satellite = V.SF.Squad.Sat; - delete V.SF.Squad.Sat; - delete V.SatLaunched; - } - } - } // closes: V.SF.Toggle && V.SF.Active >= 1 - } - - delete V.Tour; delete V.SFColonel; delete V.SFUnit; - delete V.SF.tour; delete V.SF.Caps; delete V.SF.Size; delete V.choice; - delete V.SF.Units; delete V.SpecOpsLock; delete V.SF.U; delete V.SF.WG; - delete V.SF.Subsidy; delete V.SF.SpecOps; delete V.SF.SpecOpsLock; delete V.SFUC; - - if (V.SF.BadOutcome !== undefined) { - delete V.SF.BadOutcome; - } - if (V.arcologies[0].SFRaid !== undefined) { - delete V.arcologies[0].SFRaid; - } - if (V.arcologies[0].SFRaidTarget !== undefined) { - delete V.arcologies[0].SFRaidTarget; - } - if (V.SF.Facility !== undefined) { - delete V.SF.Facility; - } - - if (V.SF.MWU !== undefined) { - delete V.SF.MWU; - } - if (V.SF.Bonus !== undefined) { - delete V.SF.Bonus; - } - - InitClean(); - MainClean(); - ColonelClean(); - TradeShowClean(); - UnitsClean(); - - if (V.week < 72 && V.SF.Active !== -1) { V.SF.Active = -1; } -}; -/* usedOnce */ - App.SF.fsIntegration = function(input = 'Menu', textDisplay = 100) { const Revivalisms = ['Arabian_Revivalism', 'Aztec_Revivalism', 'Chinese_Revivalism', 'Edo_Revivalism', 'Egyptian_Revivalism', 'Multiculturalism', 'Roman_Revivalism']; let FS_OPTIONS = ['Asset_Expansionism', 'Body_Purism', 'Chattel_Religionism', 'Degradationism', 'Eugenics', 'Gender_radicalism', 'Gender_traditionalism', 'Hedonistic_Decadence', 'Maturity_Preferentialism', 'Paternalism', 'Physical_Idealism', 'Repopulation', 'Slave_Pastoralism', 'Slimness_Enthusiasm', 'Transformation_Fetishism', 'Youth_Preferentialism']; diff --git a/src/Mods/SpecialForce/SpecialForceBC.js b/src/Mods/SpecialForce/SpecialForceBC.js new file mode 100644 index 0000000000000000000000000000000000000000..7b848c1b539e874ff337b2cf52eee7749d799c8d --- /dev/null +++ b/src/Mods/SpecialForce/SpecialForceBC.js @@ -0,0 +1,353 @@ +// @ts-nocheck +/* no-usedOnce */ +App.SF.BC = function() { + function InitClean() { + delete V.SFMODToggle; + delete V.securityForceActive; + delete V.securityForceCreate; + delete V.securityForceEventSeen; + } + + function MainClean() { + delete V.securityForceActive; + delete V.securityForceRecruit; + delete V.securityForceTrade; + delete V.securityForceBooty; + delete V.securityForceIncome; + delete V.securityForceMissionEfficiency; + delete V.securityForceProfitable; + delete V.TierTwoUnlock; + delete V.securityForceDepravity; + delete V.SFAO; + delete V.securityForceUpgradeTokenReset; + delete V.securityForceUpgradeToken; + delete V.securityForceGiftToken; + delete V.securityForceRulesOfEngagement; + delete V.securityForceFocus; + delete V.securityForceAccountability; + delete V.securityForceName; + delete V.SubsidyActive; + delete V.securityForceSubsidyActive; + } + + function ColonelClean() { + delete V.ColonelCore; + delete V.securityForceColonelToken; + delete V.securityForceColonelSexed; + delete V.ColonelRelationship; + delete V.securityForceSexedColonelToken; + } + + function TradeShowClean() { + delete V.OverallTradeShowAttendance; + delete V.CurrentTradeShowAttendance; + delete V.TradeShowIncome; + delete V.TotalTradeShowIncome; + delete V.TradeShowHelots; + delete V.TotalTradeShowHelots; + } + + function UnitsClean() { + delete V.securityForceInfantryPower; + delete V.securityForceArcologyUpgrades; + delete V.securityForceVehiclePower; + delete V.securityForceDronePower; + delete V.securityForceStimulantPower; + delete V.securityForceHeavyBattleTank; + delete V.securityForceAircraftPower; + delete V.securityForceSpacePlanePower; + delete V.securityForceAC130; + delete V.securityForceSatellitePower; + delete V.securityForceGiantRobot; + delete V.securityForceMissileSilo; + delete V.securityForceAircraftCarrier; + delete V.securityForceSubmarine; + delete V.securityForceHeavyAmphibiousTransport; + delete V.securityForcePersonnel; + delete V.securityForceFortressZeppelin; + delete V.securityForceHeavyTransport; + } + + if (typeof V.SF !== "object") { + if (V.securityForceEventSeen < 1) { + V.securityForceActive = -1; + } else { + V.securityForceActive = 2; + } + V.SF = {Toggle: V.SFMODToggle, Active: V.securityForceActive}; + InitClean(); + if (V.securityForceName === undefined) { + V.securityForceName = "the special force"; + } + if (V.SF.Active >= 1) { + Object.assign(V.SF, { + Depravity: V.securityForceDepravity, + Upgrade: V.securityForceUpgradeToken, + Gift: V.securityForceGiftToken, + UC: {Assign: V.SF.SpecOps, Lock: V.SF.SpecOpsLock}, + ROE: V.securityForceRulesOfEngagement, + Target: V.securityForceFocus, + Regs: V.securityForceAccountability, + Lower: V.securityForceName, + }); + MainClean(); + + if (V.ColonelCore === undefined) { + V.ColonelCore = ""; + } + if (V.ColonelDiscussion === undefined) { + V.ColonelDiscussion = 0; + } + if (V.ColonelSexed === undefined) { + V.ColonelSexed = 0; + } + V.SF.Colonel = { + Core: V.ColonelCore, + Talk: V.securityForceColonelToken, + Fun: V.securityForceColonelSexed, + Status: V.ColonelRelationship + }; + ColonelClean(); + + if (V.TradeShowIncome === undefined) { + V.TradeShowIncome = 0; + } + if (V.TotalTradeShowIncome === undefined) { + V.TotalTradeShowIncome = 0; + } + if (V.TradeShowHelots === undefined) { + V.TradeShowHelots = 0; + } + if (V.TotalTradeShowHelots === undefined) { + V.TotalTradeShowHelots = 0; + } + V.SF.MercCon = { + History: V.OverallTradeShowAttendance, + CanAttend: V.CurrentTradeShowAttendance, + Income: V.TradeShowIncome, + Revenue: V.TotalTradeShowIncome, + Menials: V.TradeShowHelots, + TotalMenials: V.TotalTradeShowHelots, + Mercs: 0, + TotalMercs: 0 + }; + TradeShowClean(); + if (V.SF.MercCon.History > 0) { + V.SF.MercCon.CanAttend = 1; + } + + if (V.securityForceHeavyBattleTank === undefined) { + V.securityForceHeavyBattleTank = 0; + } + if (V.securityForceSpacePlanePower === undefined) { + V.securityForceSpacePlanePower = 0; + } + if (V.securityForceAC130 === undefined) { + V.securityForceAC130 = 0; + } + if (V.securityForceSatellitePower === undefined) { + V.securityForceSatellitePower = 0; + } + if (V.securityForceGiantRobot === undefined) { + V.securityForceGiantRobot = 0; + } + if (V.securityForceMissileSilo === undefined) { + V.securityForceMissileSilo = 0; + } + if (V.securityForceAircraftCarrier === undefined) { + V.securityForceAircraftCarrier = 0; + } + if (V.securityForceSubmarine === undefined) { + V.securityForceSubmarine = 0; + } + if (V.securityForceHeavyAmphibiousTransport === undefined) { + V.securityForceHeavyAmphibiousTransport = 0; + } + + V.SF.ArmySize = V.securityForcePersonnel; + + V.SF.SatLaunched = 0; + + V.SF.Squad = { + Armoury: V.securityForceInfantryPower, + Firebase: V.securityForceArcologyUpgrades, + AV: V.securityForceVehiclePower, + TV: V.securityForceVehiclePower, + Drones: V.securityForceDronePower, + Drugs: V.securityForceStimulantPower, + PGT: V.securityForceHeavyBattleTank, + AA: V.securityForceAircraftPower, + TA: V.securityForceAircraftPower, + SpacePlane: V.securityForceSpacePlanePower, + GunS: V.securityForceAC130, + Satellite: V.securityForceSatellitePower, + GiantRobot: V.securityForceGiantRobot, + MissileSilo: V.securityForceMissileSilo, + AircraftCarrier: V.securityForceAircraftCarrier, + Sub: V.securityForceSubmarine, + HAT: V.securityForceHeavyAmphibiousTransport + }; + UnitsClean(); + } else { + App.SF.Init(); + } + } else if (typeof V.SF === "object") { + V.SF.FS = V.SF.FS || {}; + V.SF.FS.Tension = V.SF.FS.Tension || -1; + + if (V.SF.Toggle && V.SF.Active >= 1) { + V.SF.UC = V.SF.UC || {}; + V.SF.Depravity = V.SF.Depravity || 0; + V.SF.Upgrade = V.SF.Upgrade || 0; + V.SF.Gift = V.SF.Gift || 0; + V.SF.UC.Assign = V.SF.UC.Assign || 0; + V.SF.UC.Lock = V.SF.UC.Lock || 0; + V.SF.ROE = V.SF.ROE || "hold"; + V.SF.Target = V.SF.Target || "recruit"; + V.SF.Regs = V.SF.Regs || "strict"; + V.SF.Lower = V.SF.Lower || "the special force"; + + V.SF.ArmySize = V.SF.ArmySize || 40; + + V.SF.Squad = V.SF.Squad || {}; + for (let i = 0; i < App.SF.upgrades.list('all').length; i++) { + V.SF.Squad[App.SF.upgrades.list('all')[i]] = V.SF.Squad[App.SF.upgrades.list('all')[i]] || 0; + } + + V.SF.SatLaunched = V.SF.SatLaunched || 0; + + V.SF.Colonel = V.SF.Colonel || {}; + V.SF.Colonel.Core = V.SF.Colonel.Core || ""; + V.SF.Colonel.Talk = V.SF.Colonel.Talk || 0; + V.SF.Colonel.Fun = V.SF.Colonel.Fun || 0; + V.SF.Colonel.Status = V.SF.Colonel.Status || 0; + + V.SF.MercCon = V.SF.MercCon || {}; + V.SF.MercCon.History = V.SF.MercCon.History || 0; + V.SF.MercCon.CanAttend = V.SF.MercCon.CanAttend || 0; + if (V.SF.MercCon.History >= 1) { + V.SF.MercCon.CanAttend = -1; + } + V.SF.MercCon.Income = V.SF.MercCon.Income || 0; + V.SF.MercCon.Revenue = V.SF.MercCon.Revenue || 0; + V.SF.MercCon.Mercs = V.SF.MercCon.Mercs || 0; + V.SF.MercCon.Menials = V.SF.MercCon.Menials || 0; + V.SF.MercCon.TotalMenials = V.SF.MercCon.TotalMenials || 0; + V.SF.MercCon.TotalMercs = V.SF.MercCon.TotalMercs || 0; + + if (typeof V.SF.Squad.Satellite === "object") { + if (V.SF.Squad.Satellite.InOrbit > 0) { + V.SF.SatLaunched = V.SF.Squad.Satellite.InOrbit; delete V.SF.Squad.Satellite.InOrbit; + } + V.SF.Squad.Satellite = V.SF.Squad.Satellite.lv; + } + + delete V.SF.FS.upgrade; delete V.SF.UC.num; + + if (jsDef(V.choice)) { + V.SF.Gift = V.choice; + } + + if (V.Tour !== undefined) { + V.SF.tour = V.Tour || 0; + } + + if (V.SF.Squad.Troops) { + V.SF.ArmySize = V.SF.Squad.Troops; + delete V.SF.Squad.Troops; + } + + if (V.SF.MercCon !== undefined) { + if( V.SF.MercCon.View !== undefined) { + delete V.SF.MercCon.View; + } + if (V.SF.MercCon.Helots !== undefined) { + V.SF.MercCon.Menials = V.SF.MercCon.Helots; + delete V.SF.MercCon.Helots; + } + if (V.SF.MercCon.TotalHelots !== undefined) { + V.SF.MercCon.TotalMenials = V.SF.MercCon.TotalHelots; + delete V.SF.MercCon.TotalHelots; + } + } + + if (V.SF.SpecOps !== undefined && V.SF.SpecOpsLock !== undefined) { + V.SF.UC = {Assign: V.SF.SpecOps, Lock: V.SF.SpecOpsLock}; + } + + if (V.SFUC !== undefined) { + V.SF.UC.num = V.SFUC || 0; + } + + if (V.SpecOpsLock !== undefined) { + V.SF.SpecOpsLock = V.SpecOpsLock; + } + + if (V.SF.U !== undefined) { + V.SF.Upgrade = V.SF.U || 0; + } + + if (V.SF.WG !== undefined) { + V.SF.Gift = V.SF.WG || 0; + } + + if (V.SF.Depravity < 0) { + V.SF.Depravity = 0; + } + + if (V.SFUnit !== undefined) { + if (V.SFUnit.AT !== undefined) { + V.SFUnitTA = 0; + } + if (V.SFTradeShow !== undefined) { + V.SF.MercCon = V.SFTradeShow; + } + delete V.SFTradeShow; + if (V.SFColonel !== undefined) { + V.SF.Colonel = V.SFColonel; + } + + if (V.SF.Squad !== undefined && V.SF.Squad.Satellite !== undefined && V.SatLaunched !== undefined) { + V.SF.Squad.Sat = {lv: V.SF.Squad.Satellite, InOrbit: V.SatLaunched}; + V.SF.Squad.Satellite = V.SF.Squad.Sat; + delete V.SF.Squad.Sat; + delete V.SatLaunched; + } + } + } // closes: V.SF.Toggle && V.SF.Active >= 1 + } + + delete V.Tour; delete V.SFColonel; delete V.SFUnit; + delete V.SF.tour; delete V.SF.Caps; delete V.SF.Size; delete V.choice; + delete V.SF.Units; delete V.SpecOpsLock; delete V.SF.U; delete V.SF.WG; + delete V.SF.Subsidy; delete V.SF.SpecOps; delete V.SF.SpecOpsLock; delete V.SFUC; + + if (V.SF.BadOutcome !== undefined) { + delete V.SF.BadOutcome; + } + if (V.arcologies[0].SFRaid !== undefined) { + delete V.arcologies[0].SFRaid; + } + if (V.arcologies[0].SFRaidTarget !== undefined) { + delete V.arcologies[0].SFRaidTarget; + } + if (V.SF.Facility !== undefined) { + delete V.SF.Facility; + } + + if (V.SF.MWU !== undefined) { + delete V.SF.MWU; + } + if (V.SF.Bonus !== undefined) { + delete V.SF.Bonus; + } + + InitClean(); + MainClean(); + ColonelClean(); + TradeShowClean(); + UnitsClean(); + + if (V.week < 72 && V.SF.Active !== -1) { V.SF.Active = -1; } +}; +/* usedOnce */ diff --git a/src/data/backwardsCompatibility/backwardsCompatibility.js b/src/data/backwardsCompatibility/backwardsCompatibility.js index eee6002ecf79b6634b3dcf86934c228ac840d1ed..c2a4d138f6fe3367b14cbe99ef239d994e708c0b 100644 --- a/src/data/backwardsCompatibility/backwardsCompatibility.js +++ b/src/data/backwardsCompatibility/backwardsCompatibility.js @@ -914,7 +914,7 @@ App.Update.globalVariables = function(node) { } } - policies.BC(); + App.Update.policies(); // Player Arcology { diff --git a/src/data/backwardsCompatibility/policiesBC.js b/src/data/backwardsCompatibility/policiesBC.js new file mode 100644 index 0000000000000000000000000000000000000000..861bd621fd7562681ca91ba7aedaac0713191f97 --- /dev/null +++ b/src/data/backwardsCompatibility/policiesBC.js @@ -0,0 +1,85 @@ +// @ts-nocheck +App.Update.policies = function() { + function convertMain(variable, pro, anti) { + if (V[pro]) { + V.policies[variable] = 1; + } else if (V[anti]) { + V.policies[variable] = -1; + } + } + + function convertRetirement(variable, retireType, amountRequired) { + if (V[retireType] && V[amountRequired]) { + V.policies.retirement[variable] = V[amountRequired]; + } + } + + if (V.releaseID < 1069) { + V.policies.childProtectionAct = V.childProtectionAct; + V.policies.culturalOpenness = V.CulturalOpenness; + V.policies.sexualOpeness = V.sexualOpeness; + V.policies.proRefugees = V.ProRefugees; + V.policies.publicFuckdolls = V.publicFuckdolls; + + V.policies.proRecruitment = V.ProRecruitment; + V.policies.cash4Babies = V.Cash4Babies; + V.policies.regularParties = V.RegularParties; + V.policies.publicPA = V.PAPublic; + V.policies.coursingAssociation = V.CoursingAssociation; + + V.policies.raidingMercenaries = V.RaidingMercenaries; + V.policies.mixedMarriage = V.MixedMarriage; + V.policies.goodImageCampaign = V.goodImageCampaign; + V.policies.alwaysSubsidizeRep = V.alwaysSubsidizeRep; + V.policies.alwaysSubsidizeGrowth = V.alwaysSubsidizeGrowth; + + convertMain('immmigrationCash', 'ProImmigrationCash', 'AntiImmigrationCash'); + convertMain('immmigrationRep', 'ProImmigrationRep', 'AntiImmigrationRep'); + convertMain('enslavementCash', 'ProEnslavementCash', 'AntiEnslavementCash'); + convertMain('enslavementRep', 'ProEnslavementRep', 'AntiEnslavementRep'); + convertMain('cashForRep', 'CashForRep', 'RepForCash'); + + convertMain('oralAppeal', 'OralEncouragement', 'OralDiscouragement'); + convertMain('vaginalAppeal', 'VaginalEncouragement', 'VaginalDiscouragement'); + convertMain('analAppeal', 'AnalEncouragement', 'AnalDiscouragement'); + + convertRetirement('sex', 'SexMilestoneRetirement', 'retirementSex'); + convertRetirement('milk', 'MilkMilestoneRetirement', 'retirementMilk'); + convertRetirement('cum', 'CumMilestoneRetirement', 'retirementCum'); + convertRetirement('births', 'BirthsMilestoneRetirement', 'retirementBirths'); + convertRetirement('kills', 'KillsMilestoneRetirement', 'retirementKills'); + + if (V.BioreactorRetirement) { + V.policies.retirement.fate = "bioreactor"; + } else if (V.ArcadeRetirement) { + V.policies.retirement.fate = "arcade"; + } else if (V.CitizenRetirement) { + V.policies.retirement.fate = "citizen"; + } + + V.policies.retirement.menial2Citizen = V.citizenRetirementMenials; + V.policies.retirement.customAgePolicy = V.policies.retirement.customAgePolicySet || V.CustomRetirementAgePolicy; + V.policies.retirement.physicalAgePolicy = V.PhysicalRetirementAgePolicy; + + V.policies.SMR.basicSMR = V.BasicSMR; + V.policies.SMR.healthInspectionSMR = V.HealthInspectionSMR; + V.policies.SMR.educationSMR = V.EducationSMR; + V.policies.SMR.frigiditySMR = V.FrigiditySMR; + + V.policies.SMR.weightSMR = V.BasicWeightSMR; + V.policies.SMR.honestySMR = V.HonestySMR; + + V.policies.SMR.beauty.basicSMR = V.BasicBeautySMR; + V.policies.SMR.beauty.qualitySMR = V.QualityBeautySMR; + + V.policies.SMR.height.basicSMR = V.BasicHeightSMR; + V.policies.SMR.height.advancedSMR = V.AdvancedHeightSMR; + + V.policies.SMR.intelligence.basicSMR = V.BasicIntelligenceSMR; + V.policies.SMR.intelligence.qualitySMR = V.QualityIntelligenceSMR; + + V.policies.SMR.eugenics.faceSMR = V.FaceEugenicsSMR; + V.policies.SMR.eugenics.heightSMR = V.HeightEugenicsSMR; + V.policies.SMR.eugenics.intelligenceSMR = V.IntelligenceEugenicsSMR; + } +}; diff --git a/src/facilities/nursery/widgets/children/longChildDescription.js b/src/facilities/nursery/widgets/children/longChildDescription.js index c4aa78761a622c029132e842c450a625e3437158..450353465b8c4f5e4969c136c4f78de75959b799 100644 --- a/src/facilities/nursery/widgets/children/longChildDescription.js +++ b/src/facilities/nursery/widgets/children/longChildDescription.js @@ -11,15 +11,15 @@ App.Facilities.Nursery.LongChildDescription = function(child, {market = 0, event PC = V.PC, slaves = V.slaves, desc = child.actualAge < 13 ? `child` : `teen`, // TODO: - girl = V.girl, father = child.father === -1 ? PC : getSlave(child.father), mother = child.mother === -1 ? PC : getSlave(child.mother); let r = ``; - const - { he, him, his, hers, himself, boy, He, His } = getPronouns(child); + const { + he, him, his, hers, himself, boy, He, His, girl + } = getPronouns(child); // helper functions function accent(child) { diff --git a/src/interaction/policies/policies.js b/src/interaction/policies/policies.js index a266ae3e29fca26bd3ea82b645142664a8aba8d5..b2e5ee597a90982a3ddcee19cb83096e3d8a470d 100644 --- a/src/interaction/policies/policies.js +++ b/src/interaction/policies/policies.js @@ -1,7 +1,6 @@ globalThis.policies = (function() { return { countEugenicsSMRs: countEugenicsSMRs, - BC: BC, cost: cost, }; @@ -19,91 +18,6 @@ globalThis.policies = (function() { return value; } - function BC() { - function convertMain(variable, pro, anti) { - if (V[pro]) { - V.policies[variable] = 1; - } else if (V[anti]) { - V.policies[variable] = -1; - } - } - - function convertRetirement(variable, retireType, amountRequired) { - if (V[retireType] && V[amountRequired]) { - V.policies.retirement[variable] = V[amountRequired]; - } - } - - if (V.releaseID < 1069) { - V.policies.childProtectionAct = V.childProtectionAct; - V.policies.culturalOpenness = V.CulturalOpenness; - V.policies.sexualOpeness = V.sexualOpeness; - V.policies.proRefugees = V.ProRefugees; - V.policies.publicFuckdolls = V.publicFuckdolls; - - V.policies.proRecruitment = V.ProRecruitment; - V.policies.cash4Babies = V.Cash4Babies; - V.policies.regularParties = V.RegularParties; - V.policies.publicPA = V.PAPublic; - V.policies.coursingAssociation = V.CoursingAssociation; - - V.policies.raidingMercenaries = V.RaidingMercenaries; - V.policies.mixedMarriage = V.MixedMarriage; - V.policies.goodImageCampaign = V.goodImageCampaign; - V.policies.alwaysSubsidizeRep = V.alwaysSubsidizeRep; - V.policies.alwaysSubsidizeGrowth = V.alwaysSubsidizeGrowth; - - convertMain('immmigrationCash', 'ProImmigrationCash', 'AntiImmigrationCash'); - convertMain('immmigrationRep', 'ProImmigrationRep', 'AntiImmigrationRep'); - convertMain('enslavementCash', 'ProEnslavementCash', 'AntiEnslavementCash'); - convertMain('enslavementRep', 'ProEnslavementRep', 'AntiEnslavementRep'); - convertMain('cashForRep', 'CashForRep', 'RepForCash'); - - convertMain('oralAppeal', 'OralEncouragement', 'OralDiscouragement'); - convertMain('vaginalAppeal', 'VaginalEncouragement', 'VaginalDiscouragement'); - convertMain('analAppeal', 'AnalEncouragement', 'AnalDiscouragement'); - - convertRetirement('sex', 'SexMilestoneRetirement', 'retirementSex'); - convertRetirement('milk', 'MilkMilestoneRetirement', 'retirementMilk'); - convertRetirement('cum', 'CumMilestoneRetirement', 'retirementCum'); - convertRetirement('births', 'BirthsMilestoneRetirement', 'retirementBirths'); - convertRetirement('kills', 'KillsMilestoneRetirement', 'retirementKills'); - - if (V.BioreactorRetirement) { - V.policies.retirement.fate = "bioreactor"; - } else if (V.ArcadeRetirement) { - V.policies.retirement.fate = "arcade"; - } else if (V.CitizenRetirement) { - V.policies.retirement.fate = "citizen"; - } - - V.policies.retirement.menial2Citizen = V.citizenRetirementMenials; - V.policies.retirement.customAgePolicy = V.policies.retirement.customAgePolicySet || V.CustomRetirementAgePolicy; - V.policies.retirement.physicalAgePolicy = V.PhysicalRetirementAgePolicy; - - V.policies.SMR.basicSMR = V.BasicSMR; - V.policies.SMR.healthInspectionSMR = V.HealthInspectionSMR; - V.policies.SMR.educationSMR = V.EducationSMR; - V.policies.SMR.frigiditySMR = V.FrigiditySMR; - - V.policies.SMR.weightSMR = V.BasicWeightSMR; - V.policies.SMR.honestySMR = V.HonestySMR; - - V.policies.SMR.beauty.basicSMR = V.BasicBeautySMR; - V.policies.SMR.beauty.qualitySMR = V.QualityBeautySMR; - - V.policies.SMR.height.basicSMR = V.BasicHeightSMR; - V.policies.SMR.height.advancedSMR = V.AdvancedHeightSMR; - - V.policies.SMR.intelligence.basicSMR = V.BasicIntelligenceSMR; - V.policies.SMR.intelligence.qualitySMR = V.QualityIntelligenceSMR; - - V.policies.SMR.eugenics.faceSMR = V.FaceEugenicsSMR; - V.policies.SMR.eugenics.heightSMR = V.HeightEugenicsSMR; - V.policies.SMR.eugenics.intelligenceSMR = V.IntelligenceEugenicsSMR; - } - } - function cost() { return 5000; } })(); /** diff --git a/src/interaction/prostheticConfig.tw b/src/interaction/prostheticConfig.tw index e44f47ea79b77bbb7ccabbac51730ea837bd952d..8a68dbe21a99b923a830f662d4882e026c8c74ad 100644 --- a/src/interaction/prostheticConfig.tw +++ b/src/interaction/prostheticConfig.tw @@ -115,7 +115,7 @@ This room is lined with shelves and cabinets; it could be easily mistaken for a </p> <p class="indent"> - $He has <<print App.Desc.eyesColor(getSlave($AS))>>. To change $his eye color visit the [[auto salon|Salon][$primaryTailColor = "", $secondaryTailColor = ""]]. + $He has <<print App.Desc.eyesColor(getSlave($AS))>>. To change $his eye color visit the [[auto salon|Salon]]. </p> <</if>> diff --git a/src/interaction/slaveInteract.js b/src/interaction/slaveInteract.js index b4431734faa401fd4c0f0b2b076ed36367e2c22f..71cbccd05a848523b39eb7ce8bea823696ffa6df 100644 --- a/src/interaction/slaveInteract.js +++ b/src/interaction/slaveInteract.js @@ -61,8 +61,6 @@ App.UI.SlaveInteract.modify = function(slave) { makeRoomLink(el, "Auto salon", "Salon", ' Modify hair (color, length, style), nails, and even skin color.', () => { V.activeSlave = slave; - V.primaryTailColor = ""; - V.secondaryTailColor = ""; } ); diff --git a/src/js/salon.js b/src/js/salon.js index 5892475b4a20ba21710e9910a363db3a14d171d3..4069c507d753be823befbfcb7ebdd2f69d627b6f 100644 --- a/src/js/salon.js +++ b/src/js/salon.js @@ -359,6 +359,8 @@ App.Medicine.Salon.hair = function(slave, {primaryHairColor = 0, secondaryHairCo "Restore natural color", () => { slave.hColor = slave.origHColor; + App.Art.refreshSlaveArt(slave, 3, "artFrame"); + cashX(forceNeg(V.modCost), "slaveMod", slave); apply(); } ) @@ -462,7 +464,7 @@ App.Medicine.Salon.hair = function(slave, {primaryHairColor = 0, secondaryHairCo } apply(); }; - const oldHLength = (V.showInches === 2) ? Math.round(slave.hLength/2.54) : slave.hLength; + const oldHLength = (V.showInches === 2) ? Math.round(slave.hLength / 2.54) : slave.hLength; App.UI.DOM.appendNewElement("span", div, `Cut or lengthen ${his} hair:`); div.append(createList(App.Medicine.Modification.hairStyles.Length, method)); @@ -474,7 +476,7 @@ App.Medicine.Salon.hair = function(slave, {primaryHairColor = 0, secondaryHairCo v = Math.max(v, 0); // Positive hair length only // If they entered "inches," convert if (V.showInches === 2) { - v = Math.round(v*2.54); + v = Math.round(v * 2.54); } slave.hLength = v; cashX(forceNeg(V.modCost), "slaveMod", slave); @@ -590,7 +592,7 @@ App.Medicine.Salon.hair = function(slave, {primaryHairColor = 0, secondaryHairCo slave.hLength = newVal.hLength; apply(); }; - const oldHLength = (V.showInches === 2) ? Math.round(slave.hLength/2.54) : slave.hLength; + const oldHLength = (V.showInches === 2) ? Math.round(slave.hLength / 2.54) : slave.hLength; App.UI.DOM.appendNewElement("span", div, `Set wig length to:`, "choices"); div.append(createList(array, method)); div.append(" | Custom length: "); @@ -601,7 +603,7 @@ App.Medicine.Salon.hair = function(slave, {primaryHairColor = 0, secondaryHairCo v = Math.max(v, 10); // Wigs must be at least 10 cm // If they entered "inches," convert if (V.showInches === 2) { - v = Math.round(v*2.54); + v = Math.round(v * 2.54); } slave.hLength = v; cashX(forceNeg(V.modCost), "slaveMod", slave); @@ -680,3 +682,113 @@ App.Medicine.Salon.hair = function(slave, {primaryHairColor = 0, secondaryHairCo ); } }; + +/** + * Update hair in salon + * @param {App.Entity.SlaveState} slave + * @param {object} params + * @param {number|string} [params.primaryTailColor] + * @param {string} [params.secondaryTailColor] + * @returns {node} + */ +App.Medicine.Salon.tail = function(slave, {primaryTailColor = 0, secondaryTailColor = ""} = {}) { + const frag = new DocumentFragment(); + let updatePrimary = (newVal) => { primaryTailColor = newVal.value; apply(); }; + let updateSecondary = (newVal) => { secondaryTailColor = newVal.value; apply(); }; + const {His, his} = getPronouns(slave); + + if (slave.tail !== "none") { + frag.append(tailDye()); + } + + return jQuery("#salonTail").empty().append(frag); + + function tailDye() { + const frag = new DocumentFragment(); + let div; + let p; + frag.append(`${His} tail is ${slave.tailColor}.`); + + div = document.createElement("div"); + div.classList.add("choices"); + if (slave.origHColor !== slave.hColor) { + div.append( + App.UI.DOM.link( + "Match current hair", + () => { + slave.tailColor = slave.hColor; + App.Art.refreshSlaveArt(slave, 3, "artFrame"); + cashX(forceNeg(V.modCost), "slaveMod", slave); + apply(); + } + ) + ); + div.append(" or "); + App.UI.DOM.appendNewElement("span", div, "choose a new one: ", "note"); + } else { + App.UI.DOM.appendNewElement("span", div, `Choose a dye color before dyeing ${his} tail:`, "note"); + } + frag.append(div); + + div = document.createElement("div"); + div.classList.add("choices"); + div.append(`Colors:`); + div.append(createList(App.Medicine.Modification.Color.Primary, updatePrimary)); + frag.append(div); + + div = document.createElement("div"); + div.classList.add("choices"); + div.append(`Highlights:`); + div.append(createList(App.Medicine.Modification.Color.Secondary, updateSecondary)); + frag.append(div); + + if (primaryTailColor !== 0) { + p = document.createElement("p"); + p.classList.add("choices"); + p.append( + App.UI.DOM.link( + `Color ${his} tail`, + () => { + slave.tailColor = (primaryTailColor + secondaryTailColor); + App.Art.refreshSlaveArt(slave, 3, "artFrame"); + cashX(forceNeg(V.modCost), "slaveMod", slave); + App.Medicine.Salon.tail(slave); // discard selections after locking them in. + } + ) + ); + p.append(` ${primaryTailColor}${secondaryTailColor} now?`); + frag.append(p); + } + return frag; + } + + function createList(array, method) { + const links = []; + for (const item of array) { + if (item.hasOwnProperty("requirements")) { + if (item.requirements(slave) === false) { + continue; + } + } + const title = item.title || capFirstChar(item.value); + links.push( + App.UI.DOM.link( + title, + () => method(item) + ) + ); + } + return App.UI.DOM.generateLinksStrip(links); + } + + function apply() { + App.Art.refreshSlaveArt(slave, 3, "artFrame"); + App.Medicine.Salon.tail( + slave, + { + primaryTailColor: primaryTailColor, + secondaryTailColor: secondaryTailColor, + } + ); + } +}; diff --git a/src/personalAssistant/assistant.js b/src/personalAssistant/assistant.js index 19712cbac6e288288d68d496f898fbbc34304187..848c946ec417d7bf96e5e383c36b1b1dbc983d9c 100644 --- a/src/personalAssistant/assistant.js +++ b/src/personalAssistant/assistant.js @@ -6,45 +6,7 @@ globalThis.assistant = (function() { }; function BC() { - function convert(oldVar, variable, value = null) { - if (jsDef(V[oldVar])) { - if (typeof V[oldVar] !== "number" || (typeof V[oldVar] === "number" && V[oldVar] > 0)) { - V.assistant[variable] = value === null ? V[oldVar] : value; - } - } - delete V[oldVar]; - } - - const object = Object.assign({}, - { - personality: V.assistant, - name: V.assistantName, - power: V.assistantPower, - appearance: V.assistantAppearance, - }); - V.assistant = object; - delete V.assistantName; delete V.assistantPower; - delete V.assistantAppearance; delete V.assistantPronouns; - - convert('marketAssistantAnnounced', 'market', {}); - convert('assistantExtra1', 'Extra1'); - convert('assistantExtra2', 'Extra2'); - convert('assistantNameAnnounced', 'announcedName'); - convert('assistantBodyDesire', 'bodyDesire'); - convert('assistantOptions', 'options'); - convert('assistantFSOptions', 'fsOptions'); - convert('assistantFSAppearance', 'fsAppearance'); - - if (V.assistant.market) { - Object.assign(V.assistant.market, - { - relationship: V.marketAssistantRelationship, - limit: V.marketAssistantLimit, - aggressiveness: V.marketAssistantAggressiveness, - }); - } - delete V.marketAssistantRelationship; delete V.marketAssistantLimit; - delete V.marketAssistantAggressiveness; delete V.marketAssistantPronouns; + App.Update.assistantBC(); } function pronouns() { @@ -67,20 +29,18 @@ globalThis.assistant = (function() { function manage() { V.assistant = V.assistant || {}; - Object.assign(V.assistant, - { - personality: V.assistant.personality || 0, - name: V.assistant.name || "your personal assistant", - power: V.assistant.power || 0, - appearance: V.assistant.appearance || "normal", + Object.assign(V.assistant, { + personality: V.assistant.personality || 0, + name: V.assistant.name || "your personal assistant", + power: V.assistant.power || 0, + appearance: V.assistant.appearance || "normal", }); if (V.assistant.market) { - Object.assign(V.assistant.market, - { - relationship: V.assistant.market.relationship || "cute", - limit: V.assistant.market.limit || 0, - aggressiveness: V.assistant.market.aggressiveness || 0, + Object.assign(V.assistant.market, { + relationship: V.assistant.market.relationship || "cute", + limit: V.assistant.market.limit || 0, + aggressiveness: V.assistant.market.aggressiveness || 0, }); } if (V.week < 18) { diff --git a/src/personalAssistant/assistantBC.js b/src/personalAssistant/assistantBC.js new file mode 100644 index 0000000000000000000000000000000000000000..c7ef8a4f3d827f4f7e055f08f43f047ee0f126f1 --- /dev/null +++ b/src/personalAssistant/assistantBC.js @@ -0,0 +1,39 @@ +// @ts-nocheck +App.Update.assistantBC = function() { + function convert(oldVar, variable, value = null) { + if (jsDef(V[oldVar])) { + if (typeof V[oldVar] !== "number" || (typeof V[oldVar] === "number" && V[oldVar] > 0)) { + V.assistant[variable] = value === null ? V[oldVar] : value; + } + } + delete V[oldVar]; + } + + V.assistant = Object.assign({}, { + personality: V.assistant, + name: V.assistantName, + power: V.assistantPower, + appearance: V.assistantAppearance, + }); + delete V.assistantName; delete V.assistantPower; + delete V.assistantAppearance; delete V.assistantPronouns; + + convert('marketAssistantAnnounced', 'market', {}); + convert('assistantExtra1', 'Extra1'); + convert('assistantExtra2', 'Extra2'); + convert('assistantNameAnnounced', 'announcedName'); + convert('assistantBodyDesire', 'bodyDesire'); + convert('assistantOptions', 'options'); + convert('assistantFSOptions', 'fsOptions'); + convert('assistantFSAppearance', 'fsAppearance'); + + if (V.assistant.market) { + Object.assign(V.assistant.market, { + relationship: V.marketAssistantRelationship, + limit: V.marketAssistantLimit, + aggressiveness: V.marketAssistantAggressiveness, + }); + } + delete V.marketAssistantRelationship; delete V.marketAssistantLimit; + delete V.marketAssistantAggressiveness; delete V.marketAssistantPronouns; +}; diff --git a/src/uncategorized/salon.tw b/src/uncategorized/salon.tw index 8f92721d5448b2f3dbf03ec38ceecb13b7d9c512..2d0ef9efd71a2d4bd67968bdb7d759e3af25611a 100644 --- a/src/uncategorized/salon.tw +++ b/src/uncategorized/salon.tw @@ -286,71 +286,10 @@ | [[Tiger Stripes|Salon][getSlave($AS).skin = "tiger striped",cashX(forceNeg($modCost), "slaveMod", getSlave($AS))]] </div> -<<if getSlave($AS).tail != "none">> - $His tail is <<= getSlave($AS).tailColor>>. - <<if getSlave($AS).tailColor != getSlave($AS).hColor>> - [[Match current hair|Salon][getSlave($AS).tailColor = getSlave($AS).hColor]] or <span class="note">choose a new one:</span> - <<else>> - <span class="note">Choose a dye color before dyeing $his tail:</span> - <</if>> - <div class="choices"> - Colors: - [[Auburn|Salon][$primaryTailColor = "auburn"]] - | [[Black|Salon][$primaryTailColor = "black"]] - | [[Blazing Red|Salon][$primaryTailColor = "blazing red"]] - | [[Blonde|Salon][$primaryTailColor = "blonde"]] - | [[Blue-Violet|Salon][$primaryTailColor = "blue-violet"]] - | [[Blue|Salon][$primaryTailColor = "blue"]] - | [[Brown|Salon][$primaryTailColor = "brown"]] - | [[Burgundy|Salon][$primaryTailColor = "burgundy"]] - | [[Chestnut|Salon][$primaryTailColor = "chestnut"]] - | [[Chocolate|Salon][$primaryTailColor = "chocolate brown"]] - | [[Copper|Salon][$primaryTailColor = "copper"]] - | [[Dark Blue|Salon][$primaryTailColor = "dark blue"]] - | [[Dark Brown|Salon][$primaryTailColor = "dark brown"]] - | [[Dark Orchid|Salon][$primaryTailColor = "dark orchid"]] - | [[Deep Red|Salon][$primaryTailColor = "deep red"]] - | [[Ginger|Salon][$primaryTailColor = "ginger"]] - | [[Golden|Salon][$primaryTailColor = "golden"]] - | [[Green-yellow|Salon][$primaryTailColor = "green-yellow"]] - | [[Green|Salon][$primaryTailColor = "green"]] - | [[Grey|Salon][$primaryTailColor = "grey"]] - | [[Hazel|Salon][$primaryTailColor = "hazel"]] - | [[Jet Black|Salon][$primaryTailColor = "jet black"]] - | [[Neon Blue|Salon][$primaryTailColor = "neon blue"]] - | [[Neon Green|Salon][$primaryTailColor = "neon green"]] - | [[Neon Pink|Salon][$primaryTailColor = "neon pink"]] - | [[Pink|Salon][$primaryTailColor = "pink"]] - | [[Platinum Blonde|Salon][$primaryTailColor = "platinum blonde"]] - | [[Purple|Salon][$primaryTailColor = "purple"]] - | [[Red|Salon][$primaryTailColor = "red"]] - | [[Sea Green|Salon][$primaryTailColor = "sea green"]] - | [[Silver|Salon][$primaryTailColor = "silver"]] - | [[Strawberry-Blonde|Salon][$primaryTailColor = "strawberry-blonde"]] - | [[White|Salon][$primaryTailColor = "white"]] - </div> - - <div class="choices"> - Highlights: - [[None|Salon][$secondaryTailColor = ""]] - | [[Black|Salon][$secondaryTailColor = " with black highlights"]] - | [[Blazing Red|Salon][$secondaryTailColor = " with blazing red highlights"]] - | [[Blonde|Salon][$secondaryTailColor = " with blonde highlights"]] - | [[Grey|Salon][$secondaryTailColor = " with grey highlights"]] - | [[Neon Blue|Salon][$secondaryTailColor = " with neon blue highlights"]] - | [[Neon Green|Salon][$secondaryTailColor = " with neon green highlights"]] - | [[Neon Pink|Salon][$secondaryTailColor = " with neon pink highlights"]] - | [[Rainbow|Salon][$secondaryTailColor = " with rainbow highlights"]] - | [[Silver|Salon][$secondaryTailColor = " with silver highlights"]] - | [[White|Salon][$secondaryTailColor = " with white highlights"]] - </div> - - <<if $primaryTailColor != 0>> - <div class="choices"> - [["Dye " + $his + " tail"|Salon][getSlave($AS).tailColor = ($primaryTailColor + $secondaryTailColor),cashX(forceNeg($modCost), "slaveMod", getSlave($AS)), $primaryTailColor = 0, $secondaryTailColor = ""]] $primaryTailColor $secondaryTailColor now? - </div> - <</if>> -<</if>> +<p id="salonTail"></p> +<script> + App.Medicine.Salon.tail(getSlave(V.AS)); +</script> /* MARKS */ <div>