diff --git a/src/uncategorized/multiImplant.tw b/src/uncategorized/multiImplant.tw index 3ac3ea342181f3f9c70e83c33006a71398a82b3b..6984638ece7a97974535e2c8d78dce7629422124 100644 --- a/src/uncategorized/multiImplant.tw +++ b/src/uncategorized/multiImplant.tw @@ -627,35 +627,41 @@ You head down to your <<if $surgeryUpgrade == 1>>heavily upgraded and customized <</if>> /* finished checking _slaveOrgans */ /* limbs */ - <<if $slaves[_i].amp != 0>> + <<if $activeSlave.amp != 0>> <<for _l = 0; _l < $limbs.length; _l++>> - <<if ($limbs[_l].ID == $slaves[_i].ID) && ($limbs[_l].weeksToCompletion <= 0)>> - <<set $activeSlave = $slaves[_i]>> - <<switch $limbs[_l].type>> - <<case "simple">> - <<set $activeSlave.amp = -1>> - <<set $surgeryType = "basicPLimbs">> - <<case "sex">> - <<set $activeSlave.amp = -2>> - <<set $surgeryType = "sexPLimbs">> - <<case "beauty">> - <<set $activeSlave.amp = -3>> - <<set $surgeryType = "beautyPLimbs">> - <<case "combat">> - <<set $activeSlave.amp = -4>> - <<set $surgeryType = "combatPLimbs">> - <<case "cyber">> - <<set $activeSlave.amp = -5>> - <<set $surgeryType = "cyberPLimbs">> - <</switch>> - - <<set $cash -= $surgeryCost>> - <<set $activeSlave.health -= 10>> - <br><hr> - <<include "Surgery Degradation">> - <<set $limbs.deleteAt(_l)>> + <<if ($limbs[_l].ID == $activeSlave.ID) && ($limbs[_l].weeksToCompletion <= 0) + <<if $activeSlave.PLimb != 0>> + <<if $activeSlave.amp < 0>> + <<set _oldLimbs = {type: 0, armsTat: 0, legsTat: 0}>> + <<set _oldLimbs.type = $activeSlave.amp, _oldLimbs.armsTat = $activeSlave.armsTat, _oldLimbs.legsTat = $activeSlave.legsTat>> + <<set $activeSlave.readyLimbs.push(_oldLimbs)>> + <</if>> - <<set $slaves[_i] = $activeSlave>> + <<switch $limbs[_l].type>> + <<case "simple">> + <<set $activeSlave.amp = -1>> + <<set $surgeryType = "basicPLimbs">> + <<case "sex">> + <<set $activeSlave.amp = -2>> + <<set $surgeryType = "sexPLimbs">> + <<case "beauty">> + <<set $activeSlave.amp = -3>> + <<set $surgeryType = "beautyPLimbs">> + <<case "combat">> + <<set $activeSlave.amp = -4>> + <<set $surgeryType = "combatPLimbs">> + <<case "cyber">> + <<set $activeSlave.amp = -5>> + <<set $surgeryType = "cyberPLimbs">> + <</switch>> + <br><hr> + <<include "Surgery Degradation">> + <<set $limbs.deleteAt(_l)>> + <<set $activeSlave.armsTat = 0, $activeSlave.legsTat = 0>> + <<else>> + <br><hr> + @@.red;Could not install prosthetic limbs on $activeSlave.slaveName: she lacks a prosthetic interface.@@ + <</if>> <<break>> <</if>> <</for>> diff --git a/src/uncategorized/nextWeek.tw b/src/uncategorized/nextWeek.tw index 77c45990fc067dac69a5cb83fa989798435b2dd0..b92a239b830eb98bf7340e83b50981ca94af5491 100644 --- a/src/uncategorized/nextWeek.tw +++ b/src/uncategorized/nextWeek.tw @@ -265,7 +265,7 @@ <<set $events = [], $RESSevent = [], $RESSTRevent = [], $RETSevent = [], $RECIevent = [], $RecETSevent = [], $REFIevent = [], $REFSevent = [], $PESSevent = [], $PETSevent = [], $FSAcquisitionEvents = [], $FSNonconformistEvents = [], $qualifiedNicknames = [], $REAnalCowgirlSubIDs = [], $REButtholeCheckinIDs = [], $recruit = [], $RETasteTestSubIDs = [], $devotedSlaves = [], $rebelSlaves = [], $REBoobCollisionSubIDs = [], $REIfYouEnjoyItSubIDs = [], $RESadisticDescriptionSubIDs = [], $REShowerForceSubIDs = [], $RESimpleAssaultIDs = [], $RECockmilkInterceptionIDs = [], $REInterslaveBeggingIDs = [], $bedSlaves = [], $qualifiedFS = [], $eligibleSlaves = [], $slavesInLine = []>> /% Slave Objects using 0 instead of null. Second most memory eaten up. %/ -<<set $activeSlave = 0, $eventSlave = 0, $slaveWithoutBonuses = 0, $subSlave = 0, $milfSlave = 0, $milkTap = 0, $relation = 0>> +<<set $activeSlave = 0, $eventSlave = 0, $slaveWithoutBonuses = 0, $subSlave = 0, $milkTap = 0, $relation = 0>> /% Slave Objects that never get zeroed so null them here. Second most memory eaten up. %/ <<set $beforeGingering = null, $sibling = null>> diff --git a/src/uncategorized/remoteSurgery.tw b/src/uncategorized/remoteSurgery.tw index 2bb3b8f6fdbef53a77d0bdca34c4689afaa36a8e..044f15a8e62345f80b726a65bd252a073bdca224 100644 --- a/src/uncategorized/remoteSurgery.tw +++ b/src/uncategorized/remoteSurgery.tw @@ -1442,24 +1442,21 @@ Work on her structurally: <<case "simple">> <<set $activeSlave.amp = -1>> <<set $surgeryType = "basicPLimbs">> - <<set $limbs.deleteAt(_i)>> <<case "sex">> <<set $activeSlave.amp = -2>> <<set $surgeryType = "sexPLimbs">> - <<set $limbs.deleteAt(_i)>> <<case "beauty">> <<set $activeSlave.amp = -3>> <<set $surgeryType = "beautyPLimbs">> - <<set $limbs.deleteAt(_i)>> <<case "combat">> <<set $activeSlave.amp = -4>> <<set $surgeryType = "combatPLimbs">> - <<set $limbs.deleteAt(_i)>> <<case "cyber">> <<set $activeSlave.amp = -5>> <<set $surgeryType = "cyberPLimbs">> - <<set $limbs.deleteAt(_i)>> <</switch>> + <<set $limbs.deleteAt(_i)>> + <<set $activeSlave.armsTat = 0, $activeSlave.legsTat = 0>> <<goto "Surgery Degradation">> <</link>> <</if>>