diff --git a/src/js/itemAvailability.js b/src/js/itemAvailability.js index 2cf48209ae3f6422edcc4d8594bf077bf9e9def8..fbf2b6f2c7dbc4c553335f5422539aee45b3464a 100644 --- a/src/js/itemAvailability.js +++ b/src/js/itemAvailability.js @@ -225,6 +225,8 @@ window.isClothingAccessible = (function() { harshDB = App.Data.misc.harshCollars; } else if (category === "bellyAccessory") { niceDB = App.Data.misc.bellyAccessories; + } else if (category === "buttplug") { + niceDB = App.Data.misc.buttplugs; } else { niceDB = App.Data.misc[category]; } diff --git a/src/js/wardrobeUse.js b/src/js/wardrobeUse.js index 9df777bc51a70180e96db961d4f2639d33f7a433..75071876bab2c0967f6272fe2d32389ec974bdf0 100644 --- a/src/js/wardrobeUse.js +++ b/src/js/wardrobeUse.js @@ -347,6 +347,77 @@ App.UI.Wardrobe.bellyAccessory = function(slave) { return jQuery('#bellyAccessory').empty().append(el); }; +App.UI.Wardrobe.buttplug = function(slave) { + if (slave.fuckdoll !== 0) { + return; + } + + const + { + // eslint-disable-next-line no-unused-vars + he, him, his, hers, himself, boy, He, His + } = getPronouns(slave); + + let choiceOptionsArray= []; + choiceOptionsArray.push({text: `None`, updateSlave: {buttplug: `none`}}); + + let optionsArray= []; + + let clothingOption; + App.Data.misc.buttplugs.forEach(item => { + clothingOption = { + text: item.name, + updateSlave: {buttplug: item.value} + }; + if (item.fs) { + clothingOption.FS = item.fs; + } + if (item.name === "none") { + // skip none in set, we set the link elsewhere. + } else if (item.name === "long plug") { + if (slave.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset") { + clothingOption.disabled = "disabled"; + } + } else if (item.name === "long, large plug") { + if (slave.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset") { + clothingOption.disabled = "disabled"; + } + } else if (item.name === "long, huge plug") { + if (slave.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset") { + clothingOption.disabled = "disabled"; + } + } + optionsArray.push(clothingOption); + }); + + // Sort + optionsArray = optionsArray.sort((a, b) => (a.text > b.text) ? 1 : -1); + + let el = document.createElement('div'); + + let label = document.createElement('div'); + label.append(`Anal accessory: `); + + let choice = document.createElement('span'); + choice.style.fontWeight = "bold"; + choice.textContent = (`${slave.buttplug} `); + label.appendChild(choice); + + // Choose her own + if (slave.buttplug !== `none`) { + label.appendChild(App.UI.Wardrobe.generateRows(choiceOptionsArray, "buttplug", slave, true)); + } + el.appendChild(label); + + // Options + let links = document.createElement('div'); + links.className = "choices"; + links.appendChild(App.UI.Wardrobe.generateRows(optionsArray, "buttplug", slave)); + el.appendChild(links); + + return jQuery('#buttplug').empty().append(el); +}; + App.UI.Wardrobe.generateRows = function(array, category, slave, ignoreAccessCheck="false") { // category should be in the form of slave.category, the thing we want to update. const { @@ -433,6 +504,8 @@ App.UI.Wardrobe.generateRows = function(array, category, slave, ignoreAccessChec } }; + + App.UI.Wardrobe.refreshAll = function(slave) { App.UI.Wardrobe.clothes(slave); App.UI.Wardrobe.collar(slave); @@ -444,95 +517,6 @@ App.UI.Wardrobe.refreshAll = function(slave) { }; /* - <br>Collar: ''<span id="collar">slave.collar</span>.'' - <<link "None">>slave.collar = "none";<</link>> - <br> //Nice:// - <<link "Stylish leather">>slave.collar = "stylish leather";<</link>> - <<link "Satin choker">>slave.collar = "satin choker";<</link>> - <<link "Silken ribbon">>slave.collar = "silk ribbon";<</link>> - <<link "Heavy gold">>slave.collar = "heavy gold";<</link>> - <<link "Pretty jewelry">>slave.collar = "pretty jewelry";<</link>> - if ((V.seeAge !== 0)) { - <<link "Nice retirement counter">>slave.collar = "nice retirement counter";<</link>> - } - <<link "Bell">>slave.collar = "bell collar";<</link>> - <<link "Cowbell">>slave.collar = "leather with cowbell";<</link>> - - //FS// <<link "Bowtie collar">>slave.collar = "bowtie";<</link>> - } - - //FS// <<link "Ancient Egyptian">>slave.collar = "ancient Egyptian";<</link>> - } - <br> //Harsh:// - <<link "Tight steel">>slave.collar = "tight steel";<</link>> - if ((V.seeAge !== 0)) { - <<link "Cruel retirement counter">>slave.collar = "cruel retirement counter";<</link>> - } - <<link "Uncomfortable leather">>slave.collar = "uncomfortable leather";<</link>> - if (slave.preg > -1 && (slave.ovaries === 1 |slave.mpreg === 1) && V.seePreg !== 0) { - <<link "Pregnancy biometrics">>slave.collar = "preg biometrics";<</link>> - } - <<link "Shock punishment">>slave.collar = "shock punishment";<</link>> - <<link "Dildo gag">>slave.collar = "dildo gag";<</link>> - - if (slave.skill.oral > 50) { - <<link "Massive dildo gag">>slave.collar = "massive dildo gag";<</link>> - } else { - Massive dildo gag - } - } - <<link "Ball gag">>slave.collar = "ball gag";<</link>> - <<link "Bit gag">>slave.collar = "bit gag";<</link>> - <<link "Neck corset">>slave.collar = "neck corset";<</link>> - <<link "Porcelain mask">>slave.collar = "porcelain mask";<</link>> - - if (hasAnyArms(slave)) { - <br>Arm accessory: ''<span id="armAccessory">slave.armAccessory</span>.'' - <<link "None">>slave.armAccessory = "none";<</link>> - <<link "Hand gloves">>slave.armAccessory = "hand gloves";<</link>> - <<link "Elbow gloves">>slave.armAccessory = "elbow gloves";<</link>> - } - - if (hasAnyLegs(slave)) { - <br>Shoes: ''<span id="shoes">slave.shoes</span>.'' - <<link "Go barefoot">>slave.shoes = "none";<</link>> - <<link "Flats">>slave.shoes = "flats";<</link>> - <<link "Heels">>slave.shoes = "heels";<</link>> - <<link "Pumps">>slave.shoes = "pumps";<</link>> - <<link "Thigh boots">>slave.shoes = "boots";<</link>> - <<link "Painfully extreme heels">>slave.shoes = "extreme heels";<</link>> - - <<link "Platforms">>slave.shoes = "platform shoes";<</link>> - <<link "Platform heels">>slave.shoes = "platform heels";<</link>> - <<link "Painfully extreme platform heels">>slave.shoes = "extreme platform heels";<</link>> - } - - <br>Leg accessory: ''<span id="legAccessory">slave.legAccessory</span>.'' - <<link "None">>slave.legAccessory = "none";<</link>> - <<link "Short stockings">>slave.legAccessory = "short stockings";<</link>> - <<link "Long stockings">>slave.legAccessory = "long stockings";<</link>> - } - - <br>Torso accessory: ''<span id="bellyAccessory">slave.bellyAccessory</span>.'' - <<link "None">>slave.bellyAccessory = "none";<</link>> - <<link "Tight corset">>slave.bellyAccessory = "a corset";<</link>> - if ((slave.breedingMark !== 1 |V.propOutcome === 0 |V.eugenicsFullControl === 1 |V.arcologies[0].FSRestart === "unset")) { - <<link "Extreme corset">>slave.bellyAccessory = "an extreme corset";<</link>> - } - if ((slave.belly > 10000)) { - <<link "Supportive band">>slave.bellyAccessory = "a support band";<</link>> - } - // works for all of them - if (slave.belly < 1500 && slave.weight < 130) { - <<link "1st Trimester belly">>slave.bellyAccessory = "a small empathy belly";<</link>> - <<link "2nd Trimester belly">>slave.bellyAccessory = "a medium empathy belly";<</link>> - <<link "3rd Trimester belly">>slave.bellyAccessory = "a large empathy belly";<</link>> - <<link "3rd Trimester twins belly">>slave.bellyAccessory = "a huge empathy belly";<</link>> - } else { - V.His stomach is too big to fit an empathy belly around. - } - } - <br>Anal accessory: ''<span id="buttplug">slave.buttplug</span>.'' <<link "None">>slave.buttplug = "none", slave.buttplugAttachment = "none";<</link>> <<link "Normal">>slave.buttplug = "plug";<</link>> diff --git a/src/uncategorized/slaveInteract.tw b/src/uncategorized/slaveInteract.tw index d072a7c766f06e8c1eed0ccb2b41efda92a7add3..3d375fdf35493b754d1de3eeb716a27dfceba461 100644 --- a/src/uncategorized/slaveInteract.tw +++ b/src/uncategorized/slaveInteract.tw @@ -214,26 +214,11 @@ <</if>> <span id="bellyAccessory"></span> - <script>App.UI.Wardrobe.bellyAccessory(V.activeSlave)</script> + <script>App.UI.Wardrobe.bellyAccessory(V.activeSlave)</script> + + <span id="buttplug"></span> + <script>App.UI.Wardrobe.buttplug(V.activeSlave)</script> - <br>Anal accessory: ''<span id="buttplug">$activeSlave.buttplug</span>.'' - <<link "None">><<set $activeSlave.buttplug = "none", $activeSlave.buttplugAttachment = "none">><<replace "#buttplug">>$activeSlave.buttplug<</replace>><</link>> - | <<link "Normal">><<set $activeSlave.buttplug = "plug">><<replace "#buttplug">>$activeSlave.buttplug<</replace>><</link>> - <<if isItemAccessible("long plug") && ($activeSlave.breedingMark != 1 || $propOutcome == 0 || $eugenicsFullControl == 1 || $arcologies[0].FSRestart == "unset")>> - | <<link "Long">><<set $activeSlave.buttplug = "long plug">><<replace "#buttplug">>$activeSlave.buttplug<</replace>><</link>> - <</if>> - | <<link "Large">><<set $activeSlave.buttplug = "large plug">><<replace "#buttplug">>$activeSlave.buttplug<</replace>><</link>> - <<if isItemAccessible("long, large plug") && ($activeSlave.breedingMark != 1 || $propOutcome == 0 || $eugenicsFullControl == 1 || $arcologies[0].FSRestart == "unset")>> - | <<link "Long and large">><<set $activeSlave.buttplug = "long, large plug">><<replace "#buttplug">>$activeSlave.buttplug<</replace>><</link>> - <</if>> - <<if $activeSlave.anus >= 2>> - | <<link "Huge">><<set $activeSlave.buttplug = "huge plug">><<replace "#buttplug">>$activeSlave.buttplug<</replace>><</link>> - <<if isItemAccessible("long, huge plug")>> - <<if ($activeSlave.breedingMark != 1 || $propOutcome == 0 || $eugenicsFullControl == 1 || $arcologies[0].FSRestart == "unset")>> - | <<link "Long and huge">><<set $activeSlave.buttplug = "long, huge plug">><<replace "#buttplug">>$activeSlave.buttplug<</replace>><</link>> - <</if>> - <</if>> - <</if>> <<if isItemAccessible("tail") && $activeSlave.buttplug != "none">> <br> Anal accessory attachment: ''<span id="buttplugAttach">$activeSlave.buttplugAttachment</span>.''