diff --git a/src/interaction/prostheticConfig.tw b/src/interaction/prostheticConfig.tw index 35d51a0e0d02e237458f1db5c07a22a3d9d4e9f7..0a592d80e5ed397770a7b53fb9bda29482ba6d26 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 7de999d0d11e0ed731ca7252021397da432ae4a8..638ef36e74b4fc766a09447e91389cad68f8de54 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 67a8b3959d9a38bddd5089d42c9224bbb9360f18..c5c1794a4ca022be1b6e3582dbf917e7f27e487f 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 41eeda5a16d47f6f6646dbe65684febe0e42dd8d..a09f26133f3b2e517eed3e79317f023ecbcd5376 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 db1debce5c6c5227ba324a8bff64abe902b222a0..733373596ecf11053569d99e158688d8b3dd0fa1 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 6f60535d63809bd894126c47746414dd55e25166..e2b573f9867c2ecdbf2df6b85f0f0c933de019f4 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 a19fc020dbb891b75a17b49e6cecfef647f8304f..449b2bb8605b6eb869d75aed2389f6152ad36668 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 185202b637fdf5dc6abeb92af1d3f2009c3d4037..e191361398c41a81f81d4d271fc3815c0ee34785 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 42dc8766749832fa7471e2c3e033abe15a5a30f5..da88fcf7a380c0b5a66882afdf75d49b519aa402 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">>