diff --git a/js/003-data/slaveWearData.js b/js/003-data/slaveWearData.js index c52b04062e51b860eab09c30c50d5aedf6508222..24c164db4f8f4122f285d1c9cdf4b2903798f87b 100644 --- a/js/003-data/slaveWearData.js +++ b/js/003-data/slaveWearData.js @@ -1098,61 +1098,6 @@ App.Data.slaveWear = { ], ]), - bellyAccessory: new Map([ - ["none", {name: "None"}], - ["a corset", {name: "Tight corset"}], - ["an extreme corset", {name: "Extreme corset"}], - ["a support band", {name: "Supportive band"}], - ["a small empathy belly", - { - name: "1st Trimester belly", - fs: { - unlocks: "FSRepopulationFocus", - loves: new Set(["FSRepopulationFocus"]) - }, - get requirements() { - return V.boughtItem.clothing.belly === 1; - } - } - ], - ["a medium empathy belly", - { - name: "2nd Trimester belly", - fs: { - unlocks: "FSRepopulationFocus", - loves: new Set(["FSRepopulationFocus"]) - }, - get requirements() { - return V.boughtItem.clothing.belly === 1; - } - } - ], - ["a large empathy belly", - { - name: "3rd Trimester belly", - fs: { - unlocks: "FSRepopulationFocus", - loves: new Set(["FSRepopulationFocus"]) - }, - get requirements() { - return V.boughtItem.clothing.belly === 1; - } - } - ], - ["a huge empathy belly", - { - name: "3rd Trimester twins belly", - fs: { - unlocks: "FSRepopulationFocus", - loves: new Set(["FSRepopulationFocus"]) - }, - get requirements() { - return V.boughtItem.clothing.belly === 1; - } - } - ] - ]), - vaginalAttachment: new Map([ ["none", {name: "None"}], ["vibrator", @@ -1489,6 +1434,70 @@ App.Data.vaginalAccessory = new Map([ } ] ]); + +/** + * @typedef {slaveWear} bellyAccessory + * @property {1|2|3|4} empathyBelly + */ +/** @type {Map<string, bellyAccessory>} */ +App.Data.bellyAccessory = new Map([ + ["none", {name: "None"}], + ["a corset", {name: "Tight corset"}], + ["an extreme corset", {name: "Extreme corset"}], + ["a support band", {name: "Supportive band"}], + ["a small empathy belly", + { + name: "1st Trimester belly", + fs: { + unlocks: "FSRepopulationFocus", + loves: new Set(["FSRepopulationFocus"]) + }, + get requirements() { + return V.boughtItem.clothing.belly === 1; + }, + empathyBelly: 1 + } + ], + ["a medium empathy belly", + { + name: "2nd Trimester belly", + fs: { + unlocks: "FSRepopulationFocus", + loves: new Set(["FSRepopulationFocus"]) + }, + get requirements() { + return V.boughtItem.clothing.belly === 1; + }, + empathyBelly: 2 + } + ], + ["a large empathy belly", + { + name: "3rd Trimester belly", + fs: { + unlocks: "FSRepopulationFocus", + loves: new Set(["FSRepopulationFocus"]) + }, + get requirements() { + return V.boughtItem.clothing.belly === 1; + }, + empathyBelly: 3 + } + ], + ["a huge empathy belly", + { + name: "3rd Trimester twins belly", + fs: { + unlocks: "FSRepopulationFocus", + loves: new Set(["FSRepopulationFocus"]) + }, + get requirements() { + return V.boughtItem.clothing.belly === 1; + }, + empathyBelly: 4 + } + ] +]); /** * @typedef {object} slaveWearChastity * @property {string} name diff --git a/src/endWeek/saChoosesOwnClothes.js b/src/endWeek/saChoosesOwnClothes.js index f543bbbefb4971072caf3589a42d781aa179a59d..ed577c319816af8cb8fe9b8e4c468a3c4c5b5103 100644 --- a/src/endWeek/saChoosesOwnClothes.js +++ b/src/endWeek/saChoosesOwnClothes.js @@ -1089,14 +1089,19 @@ App.SlaveAssignment.choosesOwnClothes = (function() { */ function todaysCorset(slave) { const belly = []; - const empathyBellies = ["a small empathy belly", "a medium empathy belly", "a large empathy belly", "a huge empathy belly"]; + const empathyBellies = []; + for (const [key, object] of App.Data.bellyAccessory) { + if (object.empathyBelly) { + empathyBellies.push(key); + } + } if (slave.fetish === "mindbroken") { if (V.arcologies[0].FSRepopulationFocus > 0 && slave.belly < 1500) { if (slave.weight > 130) { belly.push({text: `${He} notices the fake bellies; since every girl ${he} has ever met has a rounded middle, it's only natural ${he} is compelled to wear one. ${He} struggles to fit it around ${his} huge gut, only stopping when another slave takes it away from ${him} so ${he} moves on and stops blocking the wardrobe with ${his} fat ass.`, bellyAccessory: "none"}); } else { - belly.push({text: `${He} notices the fake bellies; since every girl ${he} has ever met has a rounded middle, it's only natural ${he} is compelled to wear one.`, bellyAccessory: jsEither(["a small empathy belly", "a medium empathy belly", "a large empathy belly", "a huge empathy belly"])}); + belly.push({text: `${He} notices the fake bellies; since every girl ${he} has ever met has a rounded middle, it's only natural ${he} is compelled to wear one.`, bellyAccessory: jsEither(empathyBellies)}); } } else { belly.push({text: "", bellyAccessory: slave.bellyAccessory}); /* compatibility for no output, will likely get deprecated in the future as content is added*/ diff --git a/src/interaction/siWardrobe.js b/src/interaction/siWardrobe.js index 9c742ba74f90da8a672cd0b50a464eeca4ae66eb..0ea18eb47f03df088cd1b066206fbcbf79eb8a83 100644 --- a/src/interaction/siWardrobe.js +++ b/src/interaction/siWardrobe.js @@ -425,13 +425,18 @@ App.UI.SlaveInteract.wardrobe = function(slave) { function bellyAccessory() { let array = []; + let empathyArray = []; - for (const key of App.Data.slaveWear.bellyAccessory.keys()) { + for (const [key, object] of App.Data.bellyAccessory) { if (key === "none") { // skip none in set, we set the link elsewhere. continue; } - array.push(key); + if (object.empathyBelly) { + empathyArray.push(key); + } else { + array.push(key); + } } // Sort @@ -451,20 +456,21 @@ App.UI.SlaveInteract.wardrobe = function(slave) { } // Options - let links = document.createElement('div'); - links.className = "choices"; - const sortedMap = new Map([]); + let sortedMap = new Map([]); for (const name of array) { - sortedMap.set(name, App.Data.slaveWear.bellyAccessory.get(name)); + sortedMap.set(name, App.Data.bellyAccessory.get(name)); } - links.appendChild(generateRows(sortedMap, "bellyAccessory", true)); + App.UI.DOM.appendNewElement("div", el, generateRows(sortedMap, "bellyAccessory", true), "choices"); + + sortedMap = new Map([]); + for (const name of empathyArray) { + sortedMap.set(name, App.Data.bellyAccessory.get(name)); + } + App.UI.DOM.appendNewElement("div", el, generateRows(sortedMap, "bellyAccessory", true), "choices"); + if (slave.pregKnown === 1) { - let note = document.createElement('span'); - note.className = "note"; - note.textContent = ` Extreme corsets will endanger the life within ${him}.`; - links.appendChild(note); + App.UI.DOM.appendNewElement("div", el, ` Extreme corsets will endanger the life within ${him}.`, ["note", "choices"]); } - el.appendChild(links); return el; } diff --git a/src/js/rulesAssistantOptions.js b/src/js/rulesAssistantOptions.js index 78be3d3730f617fe11a0ed7724cf2a022b5ddbb6..b1305b981188630aca0a6f69576653d6970e0056 100644 --- a/src/js/rulesAssistantOptions.js +++ b/src/js/rulesAssistantOptions.js @@ -1882,7 +1882,7 @@ App.RA.options = (function() { class CorsetList extends ListSelector { constructor() { - super("Corsetage", isItemAccessible.array(App.Data.slaveWear.bellyAccessory)); + super("Corsetage", isItemAccessible.array(App.Data.bellyAccessory)); this.setValue(current_rule.set.bellyAccessory); this.onchange = (value) => current_rule.set.bellyAccessory = value; }