:: Hotswap Prosthetics [nobr]

<<set $activeLimbs = $limbs.find(function(s) { return s.ID == $activeSlave.ID; })>>
<<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>>
<</if>>
<<set _readyLimbs = []>>
<<for _hsp = 0; _hsp < $activeSlave.readyLimbs.length; _hsp++>>
	<<set _readyLimbs.push($activeSlave.readyLimbs[_hsp].type)>>
<</for>>
<br>
	Switch out her prosthetics for
	<<if $activeSlave.amp == -1>> 
		<strong>Basic P-limbs equipped</strong>
	<<elseif _readyLimbs.includes(-1)>>
		<<link "a basic set">>
			<<set _hsp = $activeSlave.readyLimbs.findIndex(function(s) { return s.type == -1; })>>
			<<set _newLimbs = $activeSlave.readyLimbs[_hsp]>>
			<<set $activeSlave.amp = -1, $activeSlave.armsTat = _newLimbs.armsTat, $activeSlave.legsTat = _newLimbs.legsTat>>
			<<set $activeSlave.readyLimbs.splice(_hsp, 1, _oldLimbs)>>
			<<replace "#LimbOptions">>
			<<include "Hotswap Prosthetics">>
			<</replace>>
		<</link>>
	<<elseif def $activeLimbs && $activeLimbs.type == "simple" && $activeSlave.ID == $activeLimbs.ID>>
		//Basic P-limbs being built
	<<else>>
		//Basic prostheses unavailable
	<</if>>|
	
	<<if $activeSlave.amp == -2>> 
		<strong>Sex focused P-limbs equipped</strong>
	<<elseif _readyLimbs.includes(-2)>>
		<<link "a sex focused set">>
			<<set _hsp = $activeSlave.readyLimbs.findIndex(function(s) { return s.type == -2; })>>
			<<set _newLimbs = $activeSlave.readyLimbs[_hsp]>>
			<<set $activeSlave.amp = -2, $activeSlave.armsTat = _newLimbs.armsTat, $activeSlave.legsTat = _newLimbs.legsTat>>
			<<set $activeSlave.readyLimbs.splice(_hsp, 1, _oldLimbs)>>
			<<replace "#LimbOptions">>
			<<include "Hotswap Prosthetics">>
			<</replace>>
		<</link>>
	<<elseif def $activeLimbs && $activeLimbs.type == "sex" && $activeSlave.ID == $activeLimbs.ID>>
		//Sex focused P-limbs being built
	<<else>>
		//Sex focused prostheses unavailable
	<</if>>|
	
	<<if $activeSlave.amp == -3>> 
		<strong>Natural looking P-limbs equipped</strong>
	<<elseif _readyLimbs.includes(-3)>>
		<<link "a natural looking set">>
			<<set _hsp = $activeSlave.readyLimbs.findIndex(function(s) { return s.type == -3; })>>
			<<set _newLimbs = $activeSlave.readyLimbs[_hsp]>>
			<<set $activeSlave.amp = -3, $activeSlave.armsTat = _newLimbs.armsTat, $activeSlave.legsTat = _newLimbs.legsTat>>
			<<set $activeSlave.readyLimbs.splice(_hsp, 1, _oldLimbs)>>
			<<replace "#LimbOptions">>
			<<include "Hotswap Prosthetics">>
			<</replace>>
		<</link>>
	<<elseif def $activeLimbs && $activeLimbs.type == "beauty" && $activeSlave.ID == $activeLimbs.ID>>
		//Natural looking P-limbs being built
	<<else>>
		//Natural looking prostheses unavailable
	<</if>>| 
	
	<<if $activeSlave.amp == -4>> 
		<strong>Combat P-limbs equipped</strong>
	<<elseif _readyLimbs.includes(-4)>>
		<<link "military grade arms">>
			<<set _hsp = $activeSlave.readyLimbs.findIndex(function(s) { return s.type == -4; })>>
			<<set _newLimbs = $activeSlave.readyLimbs[_hsp]>>
			<<set $activeSlave.amp = -4, $activeSlave.armsTat = _newLimbs.armsTat, $activeSlave.legsTat = _newLimbs.legsTat>>
			<<set $activeSlave.readyLimbs.splice(_hsp, 1, _oldLimbs)>>
			<<replace "#LimbOptions">>
			<<include "Hotswap Prosthetics">>
			<</replace>>
		<</link>>
	<<elseif def $activeLimbs && $activeLimbs.type == "combat" && $activeSlave.ID == $activeLimbs.ID>>
		//Combat P-limbs being built
	<<else>>
		//Combat prostheses unavailable
	<</if>>|
	
	<<if $activeSlave.amp == -5>>
		<strong>Cybernetic P-limbs equipped</strong>
	<<elseif _readyLimbs.includes(-5)>>
		<<link "advanced cybernetics">>
			<<set _hsp = $activeSlave.readyLimbs.findIndex(function(s) { return s.type == -5; })>>
			<<set _newLimbs = $activeSlave.readyLimbs[_hsp]>>
			<<set $activeSlave.amp = -5, $activeSlave.armsTat = _newLimbs.armsTat, $activeSlave.legsTat = _newLimbs.legsTat>>
			<<set $activeSlave.readyLimbs.splice(_hsp, 1, _oldLimbs)>>
			<<replace "#LimbOptions">>
			<<include "Hotswap Prosthetics">>
			<</replace>>
		<</link>>
	<<elseif def $activeLimbs && $activeLimbs.type == "cyber" && $activeSlave.ID == $activeLimbs.ID>>
		//Cybernetic P-limbs being built
	<<else>>
		//Cybernetic prostheses unavailable
	<</if>>
<br>
