Skip to content
Snippets Groups Projects
Commit 7e76d695 authored by prndev's avatar prndev
Browse files

JSified outfit colour helper for vector art (deepmurk's variant).

parent 4819d5ab
Branches
Tags
1 merge request!2308Vectorart jsification
...@@ -4,39 +4,6 @@ ...@@ -4,39 +4,6 @@
/* BEWARE: _outfitBaseColour is read by Wardrobe Use */ /* BEWARE: _outfitBaseColour is read by Wardrobe Use */
/* BEWARE: _glassesColour is read by Wardrobe Use */ /* BEWARE: _glassesColour is read by Wardrobe Use */
<<unset _outfitBaseColour>> <<set _s = Art_Vector_Set_Colour_Outfit(_artSlave) >>
<<set _outfitBaseColour = _s.outfitBaseColour>>
<<if _artSlave.fuckdoll != 0 || _artSlave.clothes == "restrictive latex" || _artSlave.clothes == "a latex catsuit" || _artSlave.clothes == "a cybersuit">> <<set _glassesColour = _s.glassesColor>>
<<set _outfitBaseColour = "#515351" >> /* standard "black rubber" latex colour */
<<if def _artSlave.clothingBaseColor>>
<<set _outfitBaseColour = _artSlave.clothingBaseColor >> /* latex colour selected by user */
/* TODO: rewrite all textual descriptions not to explicitly mention the latex being of black colour. */
<</if>>
<</if>>
<<if _artSlave.fuckdoll != 0 || _artSlave.clothes == "a comfortable bodysuit">>
<<set _outfitBaseColour = "#464646" >> /* bodysuit */
<<if def _artSlave.clothingBaseColor>>
<<set _outfitBaseColour = _artSlave.clothingBaseColor >> /* bodysuit colour selected by user */
<</if>>
<</if>>
/* head addons */
<<switch _artSlave.eyewear>>
<<case "corrective glasses" "glasses" "blurring glasses">>
<<set _glassesColour = "#010101">>
<<default>>
/* use colour for "glasses" by default */
<<set _glassesColour = "#010101">>
<</switch>>
<<switch _artSlave.collar>>
<<case "porcelain mask">>
<<set _glassesColour = "#FFFFFF">>
<<default>>
/* use colour for "mask" by default */
<<set _glassesColour = "#010101">>
<</switch>>
<<if def _artSlave.glassesColor>>
<<set _glassesColour = _artSlave.glassesColor>> /* glasses colour selected by user */
<</if>>
\ No newline at end of file
:: Art_Vector_Set_Colour_Outfit_JS [script]
window.Art_Vector_Set_Colour_Outfit = function(artSlave) {
var s = {
outfitBaseColour : undefined,
glassesColour : undefined
}
if (artSlave.fuckdoll != 0 || artSlave.clothes == "restrictive latex" || artSlave.clothes == "a latex catsuit" || artSlave.clothes == "a cybersuit") {
s.outfitBaseColour = "#515351" ; /* standard "black rubber" latex colour */
if (artSlave.clothingBaseColor) {
s.outfitBaseColour = artSlave.clothingBaseColor ; /* latex colour selected by user */
/* TODO: rewrite all textual descriptions not to explicitly mention the latex being of black colour. */
}
}
if (artSlave.fuckdoll != 0 || artSlave.clothes == "a comfortable bodysuit") {
s.outfitBaseColour = "#464646" ; /* bodysuit */
if (artSlave.clothingBaseColor) {
s.outfitBaseColour = artSlave.clothingBaseColor ; /* bodysuit colour selected by user */
}
}
/* head addons */
switch (artSlave.eyewear) {
case "corrective glasses":
case "glasses":
case "blurring glasses":
s.glassesColour = "#010101";
break;
default:
/* use colour for "glasses" by default */
s.glassesColour = "#010101";
}
switch (artSlave.collar) {
case "porcelain mask":
s.glassesColour = "#FFFFFF";
break;
default:
/* use colour for "mask" by default */
s.glassesColour = "#010101";
}
if (artSlave.glassesColor) {
s.glassesColour = artSlave.glassesColor; /* glasses colour selected by user */
}
return s;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment