From 2d47a37444c7ad6a888920f9bba0068858478dfe Mon Sep 17 00:00:00 2001 From: Arkerthan <arkerthan@gmail.com> Date: Mon, 2 Sep 2019 23:41:17 +0200 Subject: [PATCH] fix --- src/interaction/prostheticConfig.tw | 20 ++++++++++---------- src/js/SlaveState.js | 2 ++ src/js/slaveStatsChecker.js | 2 +- src/js/surgery.js | 8 ++++---- src/uncategorized/RESS.tw | 2 +- src/uncategorized/multiImplant.tw | 10 +++++----- src/uncategorized/nextWeek.tw | 2 +- src/uncategorized/reRecruit.tw | 6 +++--- src/utility/slaveCreationWidgets.tw | 2 +- 9 files changed, 28 insertions(+), 26 deletions(-) diff --git a/src/interaction/prostheticConfig.tw b/src/interaction/prostheticConfig.tw index 35d51a0e0d0..0a592d80e5e 100644 --- a/src/interaction/prostheticConfig.tw +++ b/src/interaction/prostheticConfig.tw @@ -176,32 +176,32 @@ This room is lined with shelves and cabinets, it could be easily mistaken for a /* TODO save .legsTat and .armsTat / link them to prosthetic*/ <<if getLeftArmID($activeSlave) !== 2 && $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "basicL"}) != -1>> <<link "Attach <<= addA(setup.prosthetics.basicL.name)>>" "Prosthetics Configuration">> - <<set removeLimbs($activeSlave, "all"), attachProsthetic($activeSlave, "all", 2), $prostheticsConfig = "basicPLimbs">> + <<set removeLimbs($activeSlave, "all"), attachLimbs($activeSlave, "all", 2), $prostheticsConfig = "basicPLimbs">> <</link>> <br> <</if>> <<if getLeftArmID($activeSlave) !== 3 && $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "sexL"}) != -1>> <<link "Attach <<= addA(setup.prosthetics.sexL.name)>>" "Prosthetics Configuration">> - <<set removeLimbs($activeSlave, "all"), attachProsthetic($activeSlave, "all", 3), $prostheticsConfig = "sexPLimbs">> + <<set removeLimbs($activeSlave, "all"), attachLimbs($activeSlave, "all", 3), $prostheticsConfig = "sexPLimbs">> <</link>> <br> <</if>> <<if getLeftArmID($activeSlave) !== 4 && $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "beautyL"}) != -1>> <<link "Attach <<= addA(setup.prosthetics.beautyL.name)>>" "Prosthetics Configuration">> - <<set removeLimbs($activeSlave, "all"), attachProsthetic($activeSlave, "all", 4), $prostheticsConfig = "beautyPLimbs">> + <<set removeLimbs($activeSlave, "all"), attachLimbs($activeSlave, "all", 4), $prostheticsConfig = "beautyPLimbs">> <</link>> <br> <</if>> <<if getLeftArmID($activeSlave) !== 5 && $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "combatL"}) != -1>> <<link "Attach <<= addA(setup.prosthetics.combatL.name)>>" "Prosthetics Configuration">> - <<set removeLimbs($activeSlave, "all"), attachProsthetic($activeSlave, "all", 5), $prostheticsConfig = "combatPLimbs">> + <<set removeLimbs($activeSlave, "all"), attachLimbs($activeSlave, "all", 5), $prostheticsConfig = "combatPLimbs">> <</link>> <br> <</if>> <<if getLeftArmID($activeSlave) !== 6 && $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "cyberneticL"}) != -1>> <<if $activeSlave.PLimb == 2>> <<link "Attach <<= addA(setup.prosthetics.cyberneticL.name)>>" "Prosthetics Configuration">> - <<set removeLimbs($activeSlave, "all"), attachProsthetic($activeSlave, "all", 6), $prostheticsConfig = "cyberPLimbs">> + <<set removeLimbs($activeSlave, "all"), attachLimbs($activeSlave, "all", 6), $prostheticsConfig = "cyberPLimbs">> <</link>> <<else>> // $He must have <<= addA(setup.prosthetics.interfaceP2.name)>> installed to attach <<= addA(setup.prosthetics.cyberneticL.name)>>. // @@ -469,7 +469,7 @@ Fit prosthetics to $him: <<set _first = 0>> <</if>> <<link "Attach <<= addA(setup.prosthetics.basicL.name)>>">> - <<set removeLimbs($activeSlave, "all"), attachProsthetic($activeSlave, "all", 2), $prostheticsConfig = "basicPLimbs">> + <<set removeLimbs($activeSlave, "all"), attachLimbs($activeSlave, "all", 2), $prostheticsConfig = "basicPLimbs">> <<replace #attach>><br><br><<include "Prosthetics Configuration">><<set $nextLink = "Remote Surgery">><</replace>> <</link>> <br> @@ -480,7 +480,7 @@ Fit prosthetics to $him: <<set _first = 0>> <</if>> <<link "Attach <<= addA(setup.prosthetics.sexL.name)>>">> - <<set removeLimbs($activeSlave, "all"), attachProsthetic($activeSlave, "all", 3), $prostheticsConfig = "sexPLimbs">> + <<set removeLimbs($activeSlave, "all"), attachLimbs($activeSlave, "all", 3), $prostheticsConfig = "sexPLimbs">> <<replace #attach>><br><br><<include "Prosthetics Configuration">><<set $nextLink = "Remote Surgery">><</replace>> <</link>> <br> @@ -491,7 +491,7 @@ Fit prosthetics to $him: <<set _first = 0>> <</if>> <<link "Attach <<= addA(setup.prosthetics.beautyL.name)>>">> - <<set removeLimbs($activeSlave, "all"), attachProsthetic($activeSlave, "all", 4), $prostheticsConfig = "beautyPLimbs">> + <<set removeLimbs($activeSlave, "all"), attachLimbs($activeSlave, "all", 4), $prostheticsConfig = "beautyPLimbs">> <<replace #attach>><br><br><<include "Prosthetics Configuration">><<set $nextLink = "Remote Surgery">><</replace>> <</link>> <br> @@ -502,7 +502,7 @@ Fit prosthetics to $him: <<set _first = 0>> <</if>> <<link "Attach <<= addA(setup.prosthetics.combatL.name)>>">> - <<set removeLimbs($activeSlave, "all"), attachProsthetic($activeSlave, "all", 5), $prostheticsConfig = "combatPLimbs">> + <<set removeLimbs($activeSlave, "all"), attachLimbs($activeSlave, "all", 5), $prostheticsConfig = "combatPLimbs">> <<replace #attach>><br><br><<include "Prosthetics Configuration">><<set $nextLink = "Remote Surgery">><</replace>> <</link>> <br> @@ -514,7 +514,7 @@ Fit prosthetics to $him: <<set _first = 0>> <</if>> <<link "Attach <<= addA(setup.prosthetics.cyberneticL.name)>>" "Prosthetics Configuration">> - <<set removeLimbs($activeSlave, "all"), attachProsthetic($activeSlave, "all", 6), $prostheticsConfig = "cyberPLimbs">> + <<set removeLimbs($activeSlave, "all"), attachLimbs($activeSlave, "all", 6), $prostheticsConfig = "cyberPLimbs">> <<replace #attach>><br><br><<include "Prosthetics Configuration">><<set $nextLink = "Remote Surgery">><</replace>> <</link>> <</if>> diff --git a/src/js/SlaveState.js b/src/js/SlaveState.js index 7de999d0d11..638ef36e74b 100644 --- a/src/js/SlaveState.js +++ b/src/js/SlaveState.js @@ -2442,6 +2442,8 @@ App.Entity.SlaveState = class SlaveState { */ static makeSkeleton() { return { + arm: {left: {}, right: {}}, + leg: {left: {}, right: {}}, counter: {}, brand: {}, scar: {}, diff --git a/src/js/slaveStatsChecker.js b/src/js/slaveStatsChecker.js index 67a8b3959d9..c5c1794a4ca 100644 --- a/src/js/slaveStatsChecker.js +++ b/src/js/slaveStatsChecker.js @@ -632,7 +632,7 @@ window.canHold = function(slave) { window.canWalk = function(slave) { if (!slave) { return null; - } else if (hasBothLegs(slave)) { + } else if (!hasBothLegs(slave)) { return false; } else if (tooFatSlave(slave)) { return false; diff --git a/src/js/surgery.js b/src/js/surgery.js index 41eeda5a16d..a09f26133f3 100644 --- a/src/js/surgery.js +++ b/src/js/surgery.js @@ -617,10 +617,10 @@ window.attachProsthetic = function(slave, limb, id) { slave.leg.right = {type:id}; break; case "all": - attachProsthetic(slave, "left arm", id); - attachProsthetic(slave, "right arm", id); - attachProsthetic(slave, "left leg", id); - attachProsthetic(slave, "right leg", id); + attachLimbs(slave, "left arm", id); + attachLimbs(slave, "right arm", id); + attachLimbs(slave, "left leg", id); + attachLimbs(slave, "right leg", id); break; default: // eslint-disable-next-line no-console diff --git a/src/uncategorized/RESS.tw b/src/uncategorized/RESS.tw index db1debce5c6..733373596ec 100644 --- a/src/uncategorized/RESS.tw +++ b/src/uncategorized/RESS.tw @@ -2919,7 +2919,7 @@ on a tray<<if $activeSlave.preg > $activeSlave.pregData.normalBirth/1.33>> caref <br><br> $He comes to a stop right beside your elbow, waiting for further direction, just as $he's been trained to do in these cases. -<<if getLimbCount(102) > 2>> +<<if getLimbCount($activeSlave, 102) > 2>> As $he maintains $his posture obediently, $his P-Limbs produce minute machine noises. They allow $him good coordination, but their gyros and servomotors are constantly working to maintain it, which means that when $he stands still, they're not perfectly quiet. <<elseif $activeSlave.boobs > 4000>> $His breasts are so massive that $he's got the tray more or less balanced on top of them. As $he breathes, $his tits rise and fall slightly, diff --git a/src/uncategorized/multiImplant.tw b/src/uncategorized/multiImplant.tw index 6f60535d638..e2b573f9867 100644 --- a/src/uncategorized/multiImplant.tw +++ b/src/uncategorized/multiImplant.tw @@ -1064,35 +1064,35 @@ You head down to your <<if $surgeryUpgrade == 1>>heavily upgraded and customized <<else>> <<if _p.id == "basicL">> <<if hasAnyProstheticLimbs($activeSlave)>> - <<set attachProsthetic($activeSlave, "all", 2), $prostheticsConfig = "basicPLimbs">> + <<set attachLimbs($activeSlave, "all", 2), $prostheticsConfig = "basicPLimbs">> <<include "Prosthetics Configuration">> <<else>> //Since $he already has more advanced prosthetic limbs attached the <<= setup.prosthetics.basicL.name>> will be put into storage.// <</if>> <<elseif _p.id == "sexL">> <<if (getLimbCount($activeSlave, 3) + getLimbCount($activeSlave, 4) + getLimbCount($activeSlave, 5) + getLimbCount($activeSlave, 6)) === 0>> - <<set attachProsthetic($activeSlave, "all", 3), $prostheticsConfig = "sexPLimbs">> + <<set attachLimbs($activeSlave, "all", 3), $prostheticsConfig = "sexPLimbs">> <<include "Prosthetics Configuration">> <<else>> //Since $he already has advanced prosthetic limbs attached the <<= setup.prosthetics.sexL.name>> will be put into storage.// <</if>> <<elseif _p.id == "beautyL">> <<if (getLimbCount($activeSlave, 3) + getLimbCount($activeSlave, 4) + getLimbCount($activeSlave, 5) + getLimbCount($activeSlave, 6)) === 0>> - <<set attachProsthetic($activeSlave, "all", 4), $prostheticsConfig = "beautyPLimbs">> + <<set attachLimbs($activeSlave, "all", 4), $prostheticsConfig = "beautyPLimbs">> <<include "Prosthetics Configuration">> <<else>> //Since $he already has advanced prosthetic limbs attached the <<= setup.prosthetics.beautyL.name>> will be put into storage.// <</if>> <<elseif _p.id == "combatL">> <<if (getLimbCount($activeSlave, 3) + getLimbCount($activeSlave, 4) + getLimbCount($activeSlave, 5) + getLimbCount($activeSlave, 6)) === 0>> - <<set attachProsthetic($activeSlave, "all", 5), $prostheticsConfig = "combatPLimbs">> + <<set attachLimbs($activeSlave, "all", 5), $prostheticsConfig = "combatPLimbs">> <<include "Prosthetics Configuration">> <<else>> //Since $he already has advanced prosthetic limbs attached the <<= setup.prosthetics.combatL.name>> will be put into storage.// <</if>> <<else>> <<if $activeSlave.PLimb == 2>> - <<set attachProsthetic($activeSlave, "all", 6), $prostheticsConfig = "cyberPLimbs">> + <<set attachLimbs($activeSlave, "all", 6), $prostheticsConfig = "cyberPLimbs">> <<include "Prosthetics Configuration">> <<else>> //Since $he must have <<= addA(setup.prosthetics.interfaceP2.name)>> installed to attach cybernetic limbs the <<= setup.prosthetics.cyberneticL.name>> will be put into storage.// diff --git a/src/uncategorized/nextWeek.tw b/src/uncategorized/nextWeek.tw index a19fc020dbb..449b2bb8605 100644 --- a/src/uncategorized/nextWeek.tw +++ b/src/uncategorized/nextWeek.tw @@ -183,7 +183,7 @@ <<if !hasAnyArms($slaves[_i])>> <<set $slaves[_i].armsTat = 0, $slaves[_i].nails = 0, $slaves[_i].armAccessory = "none">> <</if>> - <<if !hasAnyLegs($slaves(_i))>> + <<if !hasAnyLegs($slaves[_i])>> <<set $slaves[_i].heels = 0, $slaves[_i].shoes = "none", $slaves[_i].legAccessory = "none", $slaves[_i].legsTat = 0, $slaves[_i].heightImplant = 0>> <</if>> /* irregular leptin production weight gain/loss setter */ diff --git a/src/uncategorized/reRecruit.tw b/src/uncategorized/reRecruit.tw index 185202b637f..e191361398c 100644 --- a/src/uncategorized/reRecruit.tw +++ b/src/uncategorized/reRecruit.tw @@ -1715,7 +1715,7 @@ <<set $one_time_age_overrides_pedo_mode = 1>> <<set $oneTimeDisableDisability = 1>> <<set $activeSlave = GenerateNewSlave("XX")>> -<<run attachProsthetic($activeSlave, "all", 2)>> +<<run attachLimbs($activeSlave, "all", 2)>> <<set $activeSlave.origin = "You helped free $him from a POW camp after being abandoned by $his country, leaving $him deeply indebted to you.">> <<set $activeSlave.devotion = random(0,20)>> <<set $activeSlave.trust = random(0,20)>> @@ -1793,7 +1793,7 @@ <<set $activeSlave.weight = random(-11 -30)>> <<set $activeSlave.waist = random(-11, -40)>> <<set $activeSlave.skill.combat = 1>> -<<run attachProsthetic($activeSlave, "all", 6)>> +<<run attachLimbs($activeSlave, "all", 6)>> <<set $activeSlave.teeth = "pointy">> <<set $activeSlave.muscles = random(30,70)>> <<set $activeSlave.height = Math.round(Height.random($activeSlave, {skew: 3, spread: .2, limitMult: [1, 4]}))>> @@ -2406,7 +2406,7 @@ While digging through the database of a POW camp for anything of value, you find <<if $seeExtreme == 1>> the traces of $his wounds, that $he has been greatly modified for war, and that $he had been raped, repeatedly, despite $his powerful body. <<set $activeSlave.teeth = "pointy", $activeSlave.muscles = random(30,70), $activeSlave.height = Math.round(Height.random($activeSlave, {skew: 3, spread: .2, limitMult: [1, 4]})), $activeSlave.chem = 1000, $activeSlave.attrXX = 0, $activeSlave.attrXY = 0>> - <<run attachProsthetic($activeSlave, "all", 6)>> + <<run attachLimbs($activeSlave, "all", 6)>> <<else>> the traces of $his wounds, that $he had been left bound long enough for $his body to atrophy, and that $he had been raped, repeatedly. <</if>> diff --git a/src/utility/slaveCreationWidgets.tw b/src/utility/slaveCreationWidgets.tw index 42dc8766749..da88fcf7a38 100644 --- a/src/utility/slaveCreationWidgets.tw +++ b/src/utility/slaveCreationWidgets.tw @@ -802,7 +802,7 @@ <<case "Bodyguard">> <<set $activeSlave.devotion = 90, $activeSlave.muscles = random(30,70), $activeSlave.height = Math.round(Height.random($activeSlave, {skew: 3, spread: .2, limitMult: [1, 4]})), $activeSlave.weight = random(-10,10), $activeSlave.teeth = either("normal", "pointy"), $activeSlave.skill.combat = 1>> <<if jsRandom(0, 2) === 0>> - <<run attachProsthetic($activeSlave, "all", 5)>> + <<run attachLimbs($activeSlave, "all", 5)>> <</if>> <<set $activeSlave.career = either("a bodyguard", "a kunoichi", "a law enforcement officer", "a military brat", "a revolutionary", "a soldier", "a transporter", "an assassin", "in a militia")>> <<case "Wardeness">> -- GitLab