From 1fcd696e84197467e19e5f1dfda655024f376582 Mon Sep 17 00:00:00 2001 From: Blank <blank@national.shitposting.agency> Date: Tue, 12 Mar 2019 17:24:07 -0700 Subject: [PATCH] (Ready to merge) Hacking skill multiplier clean up --- devNotes/Useful JS Function Documentation.txt | 2 +- src/SecExp/propagandaHub.tw | 1 - src/SecExp/riotControlCenter.tw | 1 - src/SecExp/securityHQ.tw | 1 - src/SecExp/weaponsManufacturing.tw | 1 - src/SpecialForce/SpecialForce.js | 3 +-- src/events/intro/initNationalities.tw | 1 + src/js/utilJS.js | 2 +- src/pregmod/geneLab.tw | 1 - src/pregmod/implantManufactory.tw | 1 - src/pregmod/organFarm.tw | 1 - src/pregmod/saPorn.tw | 1 - src/uncategorized/BackwardsCompatibility.tw | 2 ++ src/uncategorized/dispensary.tw | 1 - src/uncategorized/manageArcology.tw | 1 - src/uncategorized/nextWeek.tw | 2 ++ src/uncategorized/personalAssistantOptions.tw | 1 - 17 files changed, 8 insertions(+), 15 deletions(-) diff --git a/devNotes/Useful JS Function Documentation.txt b/devNotes/Useful JS Function Documentation.txt index 53c2eebea66..f0e1e92a9e7 100644 --- a/devNotes/Useful JS Function Documentation.txt +++ b/devNotes/Useful JS Function Documentation.txt @@ -346,4 +346,4 @@ UtilJS [script] removeDuplicates() - Takes an array and returns a new array without duplicate entries - HSM() - outputs a value based off of the PC's hacking skill. \ No newline at end of file + HackingSkillMultiplier() - outputs a value based off of the PC's hacking skill. \ No newline at end of file diff --git a/src/SecExp/propagandaHub.tw b/src/SecExp/propagandaHub.tw index a0f24870594..3da4c980078 100644 --- a/src/SecExp/propagandaHub.tw +++ b/src/SecExp/propagandaHub.tw @@ -1,6 +1,5 @@ :: propagandaHub [nobr] -<<set $HackingSkillMultiplier = HSM()>> <<if $career == "capitalist" || $career == "celebrity" || $career == "wealth">> <<set _HistoryDiscount = .5>> <<else>> diff --git a/src/SecExp/riotControlCenter.tw b/src/SecExp/riotControlCenter.tw index 0dcf4088a51..77c4d39aac5 100644 --- a/src/SecExp/riotControlCenter.tw +++ b/src/SecExp/riotControlCenter.tw @@ -1,6 +1,5 @@ :: riotControlCenter [nobr] -<<set $HackingSkillMultiplier = HSM()>> <<set $nextButton = "Back to Arcology Management", $nextLink = "Manage Arcology", $returnTo = "Manage Arcology">> Riot Control Center diff --git a/src/SecExp/securityHQ.tw b/src/SecExp/securityHQ.tw index dee3622d2a2..5c4560015aa 100644 --- a/src/SecExp/securityHQ.tw +++ b/src/SecExp/securityHQ.tw @@ -1,6 +1,5 @@ :: securityHQ [nobr] -<<set $HackingSkillMultiplier = HSM()>> <<if $career == "mercenary" || $career == "gang" || $career == "slaver">> <<set _HistoryDiscount = .5>> <<else>> diff --git a/src/SecExp/weaponsManufacturing.tw b/src/SecExp/weaponsManufacturing.tw index dac9a124aee..d3ca71e1102 100644 --- a/src/SecExp/weaponsManufacturing.tw +++ b/src/SecExp/weaponsManufacturing.tw @@ -1,6 +1,5 @@ :: weaponsManufacturing [nobr] -<<set $HackingSkillMultiplier = HSM()>> <<set $nextButton = "Back", $nextLink = "Main">> This sector of the arcology has been dedicated to weapons manufacturing. These factories supply diff --git a/src/SpecialForce/SpecialForce.js b/src/SpecialForce/SpecialForce.js index 9ae9eb02443..144bbe80a68 100644 --- a/src/SpecialForce/SpecialForce.js +++ b/src/SpecialForce/SpecialForce.js @@ -441,9 +441,8 @@ window.SFNameCapsCheck = function() { window.SFUpgradeCost = function(cost,unit) { const V=State.variables,T=State.temporary,S=V.SF.Squad; var value=0; - //return Math.ceil(cost*T.Env*(1.15+(V.SF.Size/10))*(1.15+(unit/100))*HSM()); value=cost*T.Env*(1.15+(V.SF.Size/10))*(1.15+(unit/100)); - if ([S.Sub,S.AircraftCarrier,S.MissileSilo,S.GiantRobot,S.Satellite.lv,S.GunS,S.SpacePlane,S.Drones].includes(unit)) value *= HSM(); + if ([S.Sub,S.AircraftCarrier,S.MissileSilo,S.GiantRobot,S.Satellite.lv,S.GunS,S.SpacePlane,S.Drones].includes(unit)) value *= V.HackingSkillMultiplier; return Math.ceil(value); }; diff --git a/src/events/intro/initNationalities.tw b/src/events/intro/initNationalities.tw index 8a479047dd8..e4c1f257698 100644 --- a/src/events/intro/initNationalities.tw +++ b/src/events/intro/initNationalities.tw @@ -9,6 +9,7 @@ <<run generatePlayerPronouns($PC)>> +<<set $HackingSkillMultiplier = HackingSkillMultiplier()>> <<set $upgradeMultiplierArcology = 1>> <<set $upgradeMultiplierMedicine = 1>> diff --git a/src/js/utilJS.js b/src/js/utilJS.js index f98250df90e..752971d503b 100644 --- a/src/js/utilJS.js +++ b/src/js/utilJS.js @@ -1512,7 +1512,7 @@ window.originPronounReplace = /** @param {App.Entity.SlaveState} slave */ functi } }; -window.HSM = function() { +window.HackingSkillMultiplier = function() { const V = State.variables; if (V.PC.hacking <= -100) { return 1.5; diff --git a/src/pregmod/geneLab.tw b/src/pregmod/geneLab.tw index f0aecc16228..632badb17e8 100644 --- a/src/pregmod/geneLab.tw +++ b/src/pregmod/geneLab.tw @@ -1,6 +1,5 @@ :: Gene Lab [nobr] -<<set $HackingSkillMultiplier = HSM()>> <<set $nextButton = "Back", $nextLink = "Manage Penthouse", $showEncyclopedia = 1, $encyclopedia = "The Pharmaceutical Fab.", _PCSkillCheck = Math.min($upgradeMultiplierMedicine, $HackingSkillMultiplier)>> <br> diff --git a/src/pregmod/implantManufactory.tw b/src/pregmod/implantManufactory.tw index 24817e64022..17ed3d1d452 100644 --- a/src/pregmod/implantManufactory.tw +++ b/src/pregmod/implantManufactory.tw @@ -1,6 +1,5 @@ :: Implant Manufactory [nobr] -<<set $HackingSkillMultiplier = HSM()>> <<set $nextButton = "Back", $nextLink = "Manage Penthouse", $showEncyclopedia = 1, $encyclopedia = "The Pharmaceutical Fab.", _PCSkillCheck = Math.min($upgradeMultiplierMedicine, $HackingSkillMultiplier)>> <br> diff --git a/src/pregmod/organFarm.tw b/src/pregmod/organFarm.tw index cbb057752a4..cb6e1bee501 100644 --- a/src/pregmod/organFarm.tw +++ b/src/pregmod/organFarm.tw @@ -1,6 +1,5 @@ :: Organ Farm [nobr] -<<set $HackingSkillMultiplier = HSM()>> <<set $nextButton = "Back", $nextLink = "Manage Penthouse", $showEncyclopedia = 1, $encyclopedia = "The Pharmaceutical Fab.", _PCSkillCheck = Math.min($upgradeMultiplierMedicine, $HackingSkillMultiplier)>> <br> diff --git a/src/pregmod/saPorn.tw b/src/pregmod/saPorn.tw index 495b08e64bc..d42bce67936 100644 --- a/src/pregmod/saPorn.tw +++ b/src/pregmod/saPorn.tw @@ -1,7 +1,6 @@ :: SA Porn [nobr] <<if $studio == 1 && $slaves[$i].pornFeed == 1>> /* content is being produced */ - <<set $HackingSkillMultiplier = HSM()>> /* rate of decay*/ <<if $slaves[$i].pornPrestige > 1>> /* 50k */ diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw index 479305fc95e..df7d1e9163e 100644 --- a/src/uncategorized/BackwardsCompatibility.tw +++ b/src/uncategorized/BackwardsCompatibility.tw @@ -3562,5 +3562,7 @@ Done! <<set $releaseID = 1036>> <</if>> +<<set $HackingSkillMultiplier = HackingSkillMultiplier()>> + /* reset NaNArray after BC is run */ <<set $NaNArray = findNaN()>> diff --git a/src/uncategorized/dispensary.tw b/src/uncategorized/dispensary.tw index 3e99655d894..ac03858e2cd 100644 --- a/src/uncategorized/dispensary.tw +++ b/src/uncategorized/dispensary.tw @@ -1,6 +1,5 @@ :: Dispensary [nobr] -<<set $HackingSkillMultiplier = HSM()>> <<set $nextButton = "Back", $nextLink = "Manage Penthouse", $showEncyclopedia = 1, $encyclopedia = "The Pharmaceutical Fab.", _PCSkillCheck = Math.min($upgradeMultiplierMedicine, $HackingSkillMultiplier)>> <br> diff --git a/src/uncategorized/manageArcology.tw b/src/uncategorized/manageArcology.tw index a2c96644e0b..185fb225230 100644 --- a/src/uncategorized/manageArcology.tw +++ b/src/uncategorized/manageArcology.tw @@ -1,6 +1,5 @@ :: Manage Arcology [nobr] -<<set $HackingSkillMultiplier = HSM()>> <<set $nextButton = "Back", $nextLink = "Main">> <<if $cheatMode == 1>> diff --git a/src/uncategorized/nextWeek.tw b/src/uncategorized/nextWeek.tw index 292057afd60..755f3ae730b 100644 --- a/src/uncategorized/nextWeek.tw +++ b/src/uncategorized/nextWeek.tw @@ -1,5 +1,7 @@ :: Next Week [nobr] +<<set $HackingSkillMultiplier = HackingSkillMultiplier()>> + <<if $rivalOwner != 0>> <<set _rival = $arcologies.find(function(s) { return s.rival == 1; })>> <<if def _rival>> diff --git a/src/uncategorized/personalAssistantOptions.tw b/src/uncategorized/personalAssistantOptions.tw index 0cefcdfb85c..fc0dce0614f 100644 --- a/src/uncategorized/personalAssistantOptions.tw +++ b/src/uncategorized/personalAssistantOptions.tw @@ -1,6 +1,5 @@ :: Personal assistant options [nobr] -<<set $HackingSkillMultiplier = HSM()>> <<set $nextButton = "Back", $nextLink = "Main">> <<if $marketAssistantLimit>><<set $marketAssistantLimit to Math.clamp($marketAssistantLimit, 10000, 10000000)>><</if>> -- GitLab