Skip to content
Snippets Groups Projects
Commit 590131be authored by kopareigns's avatar kopareigns
Browse files

Convert Leg.tw

parent 2268b2c0
Branches
Tags
No related merge requests found
...@@ -2647,3 +2647,79 @@ window.ArtVectorFeet = function(slave) { ...@@ -2647,3 +2647,79 @@ window.ArtVectorFeet = function(slave) {
} }
return r; return r;
}; };
window.ArtVectorLeg = function(slave) {
let legSize;
let r = "";
/* Leg wideness switch courtesy of Nov-X */
/* Updated 2018-10-25 by Fr0g */
/* - changed size calculation block position*/
/* - added brackets to make boolean logic run */
/* BEWARE: _legSize is also used in Art_Vector_Feet_ */
/* BEWARE: _buttSize set by Art_Vector_Butt_ */
/* Size calculations - needs to be done even for amputees */
if (slave.hips === -2) {
if (slave.weight <= 0)
legSize = "Narrow";
else if (slave.weight < 161)
legSize = "Normal";
else
legSize = "Wide";
} else if (slave.hips === -1) {
if (slave.weight <= -11)
legSize = "Narrow";
else if (slave.weight < 96)
legSize = "Normal";
else
legSize = "Wide";
} else if (slave.hips === 0) {
if (slave.weight <= -96)
legSize = "Narrow";
else if (slave.weight < 11)
legSize = "Normal";
else if (slave.weight < 131)
legSize = "Wide";
else
legSize = "Thick";
} else if (slave.hips === 1) {
if (slave.weight <= -31)
legSize = "Normal";
else if (slave.weight < 31)
legSize = "Wide";
else
legSize = "Thick";
} else { /* .hips === 2 or 3 */
if (slave.weight <= -11)
legSize = "Wide";
else
legSize = "Thick";
}
/* Selection of matching SVG based on amputee level */
if (slave.amp === 0) {
r += jsInclude(`Art_Vector_Leg_${legSize}`);
if (slave.muscles >= 97)
r += jsInclude(`Art_Vector_Leg_${legSize}_MHeavy`);
else if (slave.muscles >= 62)
r += jsInclude(`Art_Vector_Leg_${legSize}_MMedium`);
else if (slave.muscles >= 30)
r += jsInclude(`Art_Vector_Leg_${legSize}_MLight`);
} else if (slave.amp === 1) {
r += jsInclude("Art_Vector_Stump");
} else if (slave.PLimb === 1 || slave.PLimb === 2) { /* slave is an amputee and has PLimbs equipped */
if (slave.amp === -1)
r += jsInclude(`Art_Vector_Leg_ProstheticBasic_${legSize}`);
else if (slave.amp === -2)
r += jsInclude(`Art_Vector_Leg_ProstheticSexy_${legSize}`);
else if (slave.amp === -3)
r += jsInclude(`Art_Vector_Leg_ProstheticBeauty_${legSize}`);
else if (slave.amp === -4)
r += jsInclude(`Art_Vector_Leg_ProstheticCombat_${legSize}`);
else /* slave.amp === -5 */
r += jsInclude(`Art_Vector_Leg_ProstheticSwiss_${legSize}`);
}
State.temporary.legSize = legSize;
return r;
};
:: Art_Vector_Leg_ [nobr] :: Art_Vector_Leg_ [nobr]
/* Leg wideness switch courtesy of Nov-X */ <<= ArtVectorLeg(_artSlave)>>
/* Updated 2018-10-25 by Fr0g */
/* - changed size calculation block position*/
/* - added brackets to make boolean logic run */
/* BEWARE: _legSize is also used in Art_Vector_Feet_ */
/* BEWARE: _buttSize set by Art_Vector_Butt_ */
/* Size calculations - needs to be done even for amputees */
<<set _legSize = "Normal">>
<<if _artSlave.hips == -2>>
<<if _artSlave.weight <= 0>>
<<set _legSize = "Narrow">>
<<elseif _artSlave.weight > 0 && _artSlave.weight < 161>>
<<set _legSize = "Normal">>
<<elseif _artSlave.weight >= 161>>
<<set _legSize = "Wide">>
<</if>>
<<elseif _artSlave.hips == -1>>
<<if _artSlave.weight <= -11>>
<<set _legSize = "Narrow">>
<<elseif _artSlave.weight > -11 && _artSlave.weight < 96>>
<<set _legSize = "Normal">>
<<elseif _artSlave.weight >= 96>>
<<set _legSize = "Wide">>
<</if>>
<<elseif _artSlave.hips == 0>>
<<if _artSlave.weight <= -96>>
<<set _legSize = "Narrow">>
<<elseif _artSlave.weight > -96 && _artSlave.weight < 11>>
<<set _legSize = "Normal">>
<<elseif _artSlave.weight >= 11 && _artSlave.weight < 131>>
<<set _legSize = "Wide">>
<<elseif _artSlave.weight >= 131>>
<<set _legSize = "Thick">>
<</if>>
<<elseif _artSlave.hips == 1>>
<<if _artSlave.weight <= -31>>
<<set _legSize = "Normal">>
<<elseif _artSlave.weight > -31 && _artSlave.weight < 31>>
<<set _legSize = "Wide">>
<<elseif _artSlave.weight >= 31>>
<<set _legSize = "Thick">>
<</if>>
<<elseif _artSlave.hips == 2>>
<<if _artSlave.weight <= -11>>
<<set _legSize = "Wide">>
<<elseif _artSlave.weight > -11>>
<<set _legSize = "Thick">>
<</if>>
<<elseif _artSlave.hips == 3>>
<<if _artSlave.weight <= -11>>
<<set _legSize = "Wide">>
<<elseif _artSlave.weight > -11>>
<<set _legSize = "Thick">>
<</if>>
<</if>>
<<if _artSlave.amp == 0>>
<<set _art = "Art_Vector_Leg_"+_legSize >>
<<include _art >>
<</if>>
<<if _artSlave.amp == 0>>
<<if _artSlave.muscles >= 97>>
<<if _legSize == "Thick">>
<<include Art_Vector_Leg_Thick_MHeavy>>
<<elseif _legSize == "Wide">>
<<include Art_Vector_Leg_Wide_MHeavy>>
<<elseif _legSize == "Normal">>
<<include Art_Vector_Leg_Normal_MHeavy>>
<<elseif _legSize == "Narrow">>
<<include Art_Vector_Leg_Narrow_MHeavy>>
<</if>>
<<elseif _artSlave.muscles < 97 && _artSlave.muscles >= 62>>
<<if _legSize == "Thick">>
<<include Art_Vector_Leg_Thick_MMedium>>
<<elseif _legSize == "Wide">>
<<include Art_Vector_Leg_Wide_MMedium>>
<<elseif _legSize == "Normal">>
<<include Art_Vector_Leg_Normal_MMedium>>
<<elseif _legSize == "Narrow">>
<<include Art_Vector_Leg_Narrow_MMedium>>
<</if>>
<<elseif _artSlave.muscles < 62 && _artSlave.muscles >= 30>>
<<if _legSize == "Thick">>
<<include Art_Vector_Leg_Thick_MLight>>
<<elseif _legSize == "Wide">>
<<include Art_Vector_Leg_Wide_MLight>>
<<elseif _legSize == "Normal">>
<<include Art_Vector_Leg_Normal_MLight>>
<<elseif _legSize == "Narrow">>
<<include Art_Vector_Leg_Narrow_MLight>>
<</if>>
<</if>>
<</if>>
/* Selection of matching SVG based on amputee level */
<<if _artSlave.amp == -1 && (_artSlave.PLimb == 1 || _artSlave.PLimb == 2)>>
<<set _art = "Art_Vector_Leg_ProstheticBasic_"+_legSize >>
<<include _art>>
<</if>>
<<if _artSlave.amp == -2 && (_artSlave.PLimb == 1 || _artSlave.PLimb == 2)>>
<<set _art = "Art_Vector_Leg_ProstheticSexy_"+_legSize >>
<<include _art>>
<</if>>
<<if _artSlave.amp == -3 && (_artSlave.PLimb == 1 || _artSlave.PLimb == 2)>>
<<set _art = "Art_Vector_Leg_ProstheticBeauty_"+_legSize >>
<<include _art>>
<</if>>
<<if _artSlave.amp == -4 && (_artSlave.PLimb == 1 || _artSlave.PLimb == 2)>>
<<set _art = "Art_Vector_Leg_ProstheticCombat_"+_legSize >>
<<include _art>>
<</if>>
<<if _artSlave.amp == -5 && (_artSlave.PLimb == 1 || _artSlave.PLimb == 2)>>
<<set _art = "Art_Vector_Leg_ProstheticSwiss_"+_legSize >>
<<include _art>>
<</if>>
/* Changed next line for no attached limbs regardless of the PLimb state */
/* <<if _artSlave.amp == 1 && _artSlave.PLimb == 0>> <</if>> */
<<if _artSlave.amp == 1>>
<<include Art_Vector_Stump>>
<</if>>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment