diff --git a/src/js/rulesAssistantOptions.tw b/src/js/rulesAssistantOptions.tw index c27550a24a9e3faa2c389315e81ea7e78919e43e..2bf987751b1b226f4ffbb9e7719642a78ffe6566 100644 --- a/src/js/rulesAssistantOptions.tw +++ b/src/js/rulesAssistantOptions.tw @@ -208,10 +208,11 @@ window.rulesAssistantOptions = (function() { // value display can optionally be an editable text input field // it can be "bound" to a variable by setting its "onchange" method class List extends Element { - constructor(prefix, textinput=false) { + constructor(prefix, data, textinput=false) { super(prefix, textinput) this.selectedItem = null this.value = this.element.querySelector(".rajs-value") + data.forEach(item => this.appendChild(...item)) } render(prefix, textinput) { @@ -243,7 +244,7 @@ window.rulesAssistantOptions = (function() { selectItem(item) { if (this.selectedItem) this.selectedItem.deselect() this.selectedItem = item - setValue(item.setValue) + setValue(item.data) this.propagateChange() } @@ -264,8 +265,8 @@ window.rulesAssistantOptions = (function() { this.value.innerHTML = what } - getValue(what) { - return (this.value.tagName === "input" ? this.parse(this.value.value) : this.value.innerHTML) + getData(what) { + return (this.value.tagName === "input" ? this.parse(this.value.value) : this.selectedItem.data) } // customisable input field parser / sanity checker @@ -273,7 +274,7 @@ window.rulesAssistantOptions = (function() { propagateChange() { if (this.onchange instanceof Function) - this.onchange(this.getValue(), this.selectedItem.data) + this.onchange(this.getData()) } } @@ -301,10 +302,9 @@ window.rulesAssistantOptions = (function() { // a clickable item of a list class ListItem extends Element { - constructor(displayvalue, setvalue, data) { + constructor(displayvalue, data) { super(displayvalue) - this.setvalue = setvalue !== undefined ? setvalue : displayvalue - this.data = data !== undefined ? data : this.setvalue !== undefined ? this.setvalue : displayvalue + this.data = data !== undefined ? data: displayvalue this.selected = false } @@ -333,6 +333,11 @@ window.rulesAssistantOptions = (function() { // a way to organise lists with too many elements in subsections // children are bound to the master list class ListSubSection extends Element { + constructor(label, pairs) { + super(label) + pairs.forEach(item => this.appendChild(new ListItem(...item))) + } + render(label) { const elem = document.createElement("em") elem.innerText = label + ":" @@ -495,14 +500,10 @@ window.rulesAssistantOptions = (function() { // buttons for selecting the current rule class RuleSelector extends List { constructor(root) { - super("Current rule:") - if (!V.currentRule) V.currentRule = V.defaultRules[0] - V.defaultRules.forEach(rule => { - const item = new ListItem(rule.name, rule.name, rule) - this.appendChild(item) - if (rule.ID === V.currentRule.ID) item.select() - }) - this.onchange = function (rulename, rule) { + if (!V.currentRule) + V.currentRule = V.defaultRules[0] + super("Current rule:", V.defaultRules.map(i => [i.name, i.name, i])) + this.onchange = function (rule) { V.currentRule = rule reload(root) } @@ -776,13 +777,13 @@ window.rulesAssistantOptions = (function() { class SpecialExclusion extends List { constructor() { - super("Exclude special slaves:") - const yes = new ListItem("Yes", "Yes", true) - const no = new ListItem("No", "No", false) - this.appendChild(yes) - this.appendChild(no) - if (V.currentRule.excludeSpecialSlaves) yes.select() - this.onchange = (label, value) => V.currentRule.excludeSpecialSlaves = value + const items = [ + ["Yes", true], + ["No", false] + ] + super("Exclude special slaves:", items) + this.setValue(V.currentRule.excludeSpecialSlaves) + this.onchange = (value) => V.currentRule.excludeSpecialSlaves = value } } @@ -888,23 +889,52 @@ window.rulesAssistantOptions = (function() { class CosmeticSection extends Element { constructor() { super() - this.appendChild(EyewearList) - this.appendChild(LensesList) - this.appendChild(MakeupList) - this.appendChild(NailsList) - this.appendChild(HairLengthList) - this.appendChild(HairColourList) - this.appendChild(HairStyleList) - this.appendChild(PubicHairColourList) - this.appendChild(PubicHairStyleList) - this.appendChild(ArmpitHairColourList) - this.appendChild(ArmpitHairStyleList) + this.appendChild(new EyewearList()) + this.appendChild(new LensesList()) + this.appendChild(new MakeupList()) + this.appendChild(new NailsList()) + this.appendChild(new HairLengthList()) + this.appendChild(new HairColourList()) + this.appendChild(new HairStyleList()) + this.appendChild(new PubicHairColourList()) + this.appendChild(new PubicHairStyleList()) + this.appendChild(new ArmpitHairColourList()) + this.appendChild(new ArmpitHairStyleList()) } } class BodyModSection extends Element { constructor() { super() + this.appendChild(new EarPiercingList()) + this.appendChild(new NosePiercingList()) + this.appendChild(new EyebrowPiercingList()) + this.appendChild(new NavelPiercingList()) + this.appendChild(new NipplePiercingList()) + this.appendChild(new AreolaPiercingList()) + this.appendChild(new LipPiercingList()) + this.appendChild(new TonguePiercingList()) + this.appendChild(new ClitPiercingList()) + this.appendChild(new LabiaPiercingList()) + this.appendChild(new ShaftPiercingList()) + this.appendChild(new PerineumPiercingList()) + this.appendChild(new CorsetPiercingList()) + + this.appendChild(new AutoBrandingList()) + this.appendChild(new BrandingLocationList()) + this.appendChild(new BrandDesignList()) + + this.appendChild(new FaceTattooList()) + this.appendChild(new ShoulderTattooList()) + this.appendChild(new ChestTattooList()) + this.appendChild(new ArmTattooList()) + this.appendChild(new UpperBackTattooList()) + this.appendChild(new LowerBackTattooList()) + this.appendChild(new AbdomenTattooList()) + this.appendChild(new DickTattooList()) + this.appendChild(new ButtockTattooList()) + this.appendChild(new AnalTattooList()) + this.appendChild(new LegTattooList()) } } @@ -916,11 +946,10 @@ window.rulesAssistantOptions = (function() { class ClothesList extends List { constructor() { - super("Clothes") - this.appendChild(new ListItem("Select her own outfit", "choosing her own clothes")) - - const nice = new ListSubSection() - this.appendChild(nice) + const items = [ + ["Select her own outfit", "choosing her own clothes"] + ] + super("Clothes", items) const nclothes = [ ["No default clothes setting", "no default setting"], @@ -967,14 +996,12 @@ window.rulesAssistantOptions = (function() { ["Toga (FS)", "a toga"], ["Western clothing (FS)", "Western clothing"], ] - nclothes.forEach(pair => nice.appendChild(new ListItem(...pair))) - fsnclothes.forEach(pair => { if (isItemAccessible(pair[1])) nice.appendChild(new ListItem(...pair))}) - - harsh = new ListSubSection() - this.appendChild(harsh) + fsnclothes.forEach(pair => { if (isItemAccessible(pair[1])) nclothes.push(pair) }) + const nice = new ListSubSection("Nice", nclothes) + this.appendChild(nice) const hclothes = [ - ["Nude", "no clothing"] +`` ["Nude", "no clothing"] ["Penitent nun", "a penitent nuns habit"], ["Restrictive latex", "restrictive latex"], ["Shibari ropes", "shibari ropes"], @@ -983,23 +1010,23 @@ window.rulesAssistantOptions = (function() { const fshclothes = [ ["Chains (FS)", "chains"], ] + fshclothes.forEach(pair => { if (isItemAccessible(pair[1])) hclothes.push(pair) }) - hclothes.forEach(pair => nice.appendChild(new ListItem(...pair))) - fshclothes.forEach(pair => { if (isItemAccessible(pair[1])) nice.appendChild(new ListItem(...pair))}) + const harsh = new ListSubSection("Harsh", hclothes) + this.appendChild(harsh) - this.selectValue(V.currentRule.set.clothes) - this.onchange = (label, value) => V.currentRule.set.clothes = value + this.setValue(V.currentRule.set.clothes) + this.onchange = (data) => V.currentRule.set.clothes = value } } class CollarList extends List { constructor() { - super("Collar") - this.appendChild("No default collar setting", "no default setting") - this.appendChild("No collar", "none") - - const nice = new ListSubSection("Nice") - this.appendChild(nice) + const items = [ + ["No default collar setting", "no default setting"] + ["No collar", "none"] + ] + super("Collar", items) const ncollars = [ ["Stylish leather", "stylish leather"], @@ -1015,11 +1042,9 @@ window.rulesAssistantOptions = (function() { ["Bowtie collar", "bowtie"], ["ancient Egyptian", "ancient Egyptian"], ] - ncollars.forEach(pair => nice.appendChild(new ListItem(...pair))) - fsncollars.forEach(pair => { if (isItemAccessible(pair[1])) nice.appendChild(new ListItem(...pair))}) - - const harsh = new ListSubSection("Harsh") - this.appendChild(harsh) + fsncollars.forEach(pair => { if (isItemAccessible(pair[1])) ncollars.push(pair) }) + const nice = new ListSubSection("Nice", ncollars) + this.appendChild(nice) const hcollars = [ ["Tight steel", "tight steel"], @@ -1032,28 +1057,27 @@ window.rulesAssistantOptions = (function() { ["Neck corset", "neck corset"], ] if (V.seeAge !== 0) - harsh.appendChild(["Cruel retirement counter", "cruel retirement counter"]) + hcollars.push(["Cruel retirement counter", "cruel retirement counter"]) if (V.toysBoughtGags === 1) - harsh.appendChild(["Massive dildo gag", "massive dildo gag"]) - hcollars.forEach(pair => harsh.appendChild(...pair)) + hcollars.push(["Massive dildo gag", "massive dildo gag"]) + const harsh = new ListSubSection("Harsh", hcollars) + this.appendChild(harsh) - this.selectValue(V.currentRule.set.collar) - this.onchange = (label, value) => V.currentRule.set.collar = value + this.setValue(V.currentRule.set.collar) + this.onchange = (value) => V.currentRule.set.collar = value } } class ShoeList extends List { constructor() { - super("Shoes") - setup.shoes.forEach(shoes => this.appendChild(new ListItem(shoes))) - this.selectValue(V.currentRule.set.shoes) - this.onchange = (label, value) => V.currentRule.set.shoes = value + super("Shoes", setup.shoes) + this.setValue(V.currentRule.set.shoes) + this.onchange = (value) => V.currentRule.set.shoes = value } } class CorsetList extends List { constructor() { - super("Corsetage") const bellies = [] setup.bellyAccessories.forEach(acc => { if (acc.fs === undefined && acc.rs === undefined) @@ -1063,15 +1087,14 @@ window.rulesAssistantOptions = (function() { else if (acc.rs === "boughtBelly" && V.clothesBoughtBelly === 1) bellies.push([acc.name + " (Purchased)", acc.value]) }) - bellies.forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.bellyAccessory) - this.onchange = (label, value) => V.currentRule.set.bellyAccessory + super("Corsetage", bellies) + this.setValue(V.currentRule.set.bellyAccessory) + this.onchange = (value) => V.currentRule.set.bellyAccessory } } class VagAccVirginsList extends List { constructor() { - super("Vaginal accessories for virgins") const accs = [] setup.vaginalAccessories.forEach(acc => { if (acc.fs === undefined && acc.rs === undefined) @@ -1079,15 +1102,14 @@ window.rulesAssistantOptions = (function() { else if (acc.rs === "buyBigDildos" && V.toysBoughtDildos === 1) accs.push([acc.name + " (Purchased)", acc.value]) }) - accs.forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.virginAccessory) - this.onchange = (label, value) => V.currentRule.set.virginAccessory = value + super("Vaginal accessories for virgins") + this.setValue(V.currentRule.set.virginAccessory) + this.onchange = (value) => V.currentRule.set.virginAccessory = value } } class VagAccAVirginsList extends List { constructor() { - super("Vaginal accessories for anal virgins") const accs = [] setup.vaginalAccessories.forEach(acc => { if (acc.fs === undefined && acc.rs === undefined) @@ -1095,15 +1117,14 @@ window.rulesAssistantOptions = (function() { else if (acc.rs === "buyBigDildos" && V.toysBoughtDildos === 1) accs.push([acc.name + " (Purchased)", acc.value]) }) - accs.forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.aVirginAccessory) - this.onchange = (label, value) => V.currentRule.set.aVirginAccessory = value + super("Vaginal accessories for anal virgins") + this.setValue(V.currentRule.set.aVirginAccessory) + this.onchange = (value) => V.currentRule.set.aVirginAccessory = value } } class VagAccOtherList extends List { constructor() { - super("Vaginal accessories for other slaves") const accs = [] setup.vaginalAccessories.forEach(acc => { if (acc.fs === undefined && acc.rs === undefined) @@ -1111,33 +1132,30 @@ window.rulesAssistantOptions = (function() { else if (acc.rs === "buyBigDildos" && V.toysBoughtDildos === 1) accs.push([acc.name + " (Purchased)", acc.value]) }) - accs.forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.vaginalAccessory) - this.onchange = (label, value) => V.currentRule.set.vaginalAccessory = value + super("Vaginal accessories for other slaves") + this.setValue(V.currentRule.set.vaginalAccessory) + this.onchange = (value) => V.currentRule.set.vaginalAccessory = value } } class DickAccVirginsList extends List { constructor() { - super("Dick accessories for anal virgins") - setup.dickAccessories.forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.aVirginDickAccessory) - this.onchange = (label, value) => V.currentRule.set.aVirginDickAccessory = value + super("Dick accessories for anal virgins", setup.dickAccessories) + this.setValue(V.currentRule.set.aVirginDickAccessory) + this.onchange = (value) => V.currentRule.set.aVirginDickAccessory = value } } class DickAccOtherList extends List { constructor() { - super("Dick accessories for other slaves") - setup.dickAccessories.forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.dickAccessory) - this.onchange = (label, value) => V.currentRule.set.dickAccessory = value + super("Dick accessories for other slaves", setup.dickAccessories) + this.setValue(V.currentRule.set.dickAccessory) + this.onchange = (value) => V.currentRule.set.dickAccessory = value } } class ButtplugsVirginsList extends List { constructor() { - super("Buttplugs for anal virgins") const accs = [] setup.buttplugs.forEach(acc => { if (acc.fs === undefined && acc.rs === undefined) @@ -1145,15 +1163,14 @@ window.rulesAssistantOptions = (function() { else if (acc.rs === "buyBigPlugs" && V.toysBoughtButtPlugs === 1) accs.push([acc.name + " (Purchased)", acc.value]) }) - accs.forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.aVirginButtplug) - this.onchange = (label, value) => V.currentRule.set.aVirginButtplug = value + super("Buttplugs for anal virgins") + this.setValue(V.currentRule.set.aVirginButtplug) + this.onchange = (value) => V.currentRule.set.aVirginButtplug = value } } class ButtplugsOtherList extends List { constructor() { - super("Buttplugs for other slaves") const accs = [] setup.buttplugs.forEach(acc => { if (acc.fs === undefined && acc.rs === undefined) @@ -1161,15 +1178,14 @@ window.rulesAssistantOptions = (function() { else if (acc.rs === "buyBigPlugs" && V.toysBoughtButtPlugs === 1) accs.push([acc.name + " (Purchased)", acc.value]) }) - accs.forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.buttplug) - this.onchange = (label, value) => V.currentRule.set.buttplug = value + super("Buttplugs for other slaves") + this.setValue(V.currentRule.set.buttplug) + this.onchange = (value) => V.currentRule.set.buttplug = value } } class ImplantVolumeList extends List { constructor() { - super("Belly implant target volume (if present)") const pairs = [ ["No changes", -1], ["Empty implant", 0], @@ -1184,19 +1200,21 @@ window.rulesAssistantOptions = (function() { ["Full-term with septuplets", 105000], ["Full-term with octuplets", 120000] ] - pairs.forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.bellyImplantVol) - this.onchange = (label, value) => V.currentRule.set.bellyImplantVol = value + super("Belly implant target volume (if present)") + this.setValue(V.currentRule.set.bellyImplantVol) + this.onchange = (value) => V.currentRule.set.bellyImplantVol = value } } class AutosurgerySwitch extends List { constructor() { - super("Assistant-applied implants (Autosurgery global switch)") - this.appendChild(new ListItem("Activate", "ACTIVE, STAND CLEAR", 1)) - this.appendChild(new ListItem("Off", "off", 0)) - this.selectValue(V.currentRule.set.autoSurgery) - this.onchange = (label, value) => V.currentRule.set.autoSurgery = value + const pairs = [ + ["Activate", 1] + ["Off", 0] + ] + super("Assistant-applied implants (Autosurgery global switch)", pairs) + this.setValue(V.currentRule.set.autoSurgery) + this.onchange = (value) => V.currentRule.set.autoSurgery = value } } @@ -1289,113 +1307,112 @@ window.rulesAssistantOptions = (function() { class BreastGrowthList extends List { constructor() { - super("Breasts", true) - [ + const pairs = [ ["No default setting", "no default setting"], ["B Cup", 350], ["D Cup", 1000], ["Monstrous", 9000], ["Unlimited", 48000], ["None", 0] - ].forEach(pair => this.appendChild(new ListItem(...pair))) + ] + super("Breasts", pairs, true) this.setValue(V.currentRule.set.growth_boobs) - this.onchange = (label, value) => V.currentRule.set.growth_boobs = value + this.onchange = (value) => V.currentRule.set.growth_boobs = value } } class ButtGrowthList extends List { constructor() { - super("Butts", true) - [ + const pairs = [ ["No default setting", "no default setting"], ["Cute", 2], ["Big", 4], ["Huge", 6], ["Unlimited", 10], ["None", 0] - ].forEach(pair => this.appendChild(new ListItem(...pair))) + ] + super("Butts", pairs, true) this.setValue(V.currentRule.set.growth_butt) - this.onchange = (label, value) => V.currentRule.set.growth_butt = value + this.onchange = (value) => V.currentRule.set.growth_butt = value } } class LipGrowthList extends List { constructor() { - super("Lips", true) - [ + const pairs = [ ["No default setting", "no default setting"], ["Plump", 25], ["Beestung", 45], ["Facepussy", 100], ["None", 0] - ].forEach(pair => this.appendChild(new ListItem(...pair))) + ] + super("Lips", pairs, true) this.setValue(V.currentRule.set.growth_lips) - this.onchange = (label, value) => V.currentRule.set.growth_lips = value + this.onchange = (value) => V.currentRule.set.growth_lips = value } } class DickGrowthList extends List { constructor() { - super("Dicks, if present", true) - [ + const pairs = [ ["No default setting", "no default setting"], ["Above average", 4], ["Pornstar", 6], ["Unlimited", 10], ["None", 0] - ].forEach(pair => this.appendChild(new ListItem(...pair))) + ] + super("Dicks, if present", pairs, true) this.setValue(V.currentRule.set.growth_dick) - this.onchange = (label, value) => V.currentRule.set.growth_dick = value + this.onchange = (value) => V.currentRule.set.growth_dick = value } } class BallGrowthList extends List { constructor() { - super("Balls, if present", true) - [ + const pairs = [ ["No default setting", "no default setting"], ["Sizeable", 4], ["Cumslave", 6], ["Unlimited", 10], ["None", 0] - ].forEach(pair => this.appendChild(new ListItem(...pair))) + ] + super("Balls, if present", pairs, true) this.setValue(V.currentRule.set.growth_balls) - this.onchange = (label, value) => V.currentRule.set.growth_balls = value + this.onchange = (value) => V.currentRule.set.growth_balls = value } } class CurrativesList extends List { constructor() { - super("Health drugs") - [ + const pairs = [ ["No default setting", "no default setting"], ["None", "none", 0], ["Preventatives", "preventatives", 1], ["Curatives", "curatives", 2] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.curatives) - this.onchange = (label, value) => V.currentRule.set.curatives = value + ] + super("Health drugs", pairs) + this.setValue(V.currentRule.set.curatives) + this.onchange = (value) => V.currentRule.set.curatives = value } } class AphrodisiacList extends List { constructor() { - super("Aphrodisiacs") - [ + const pairs = [ ["No default setting", "no default setting"], ["None", "none", 0], ["Standard", "standard", 1], ["Extreme", "extreme", 2], ["Anaphrodisiacs", "anaphrodisiacs", -1] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.aphrodisiacs) - this.onchange = (label, value) => V.currentRule.set.aphrodisiacs = value + ] + super("Aphrodisiacs", pairs) + this.setValue(V.currentRule.set.aphrodisiacs) + this.onchange = (value) => V.currentRule.set.aphrodisiacs = value } } class ContraceptiveList extends List { constructor() { - super("Contraceptives for fertile slaves") const drugs = [ ["No default setting", "no default setting"], ["Contraceptives", "contraceptives", -1] @@ -1407,79 +1424,78 @@ window.rulesAssistantOptions = (function() { drugs.push(["Hyper fertile", "hyper fertile", 3]) drugs.push(["Maximize fertility", "maximize fertility", 4]) } - drugs.forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.preg) - this.onchange = (label, value) => V.currentRule.set.preg = value + super("Contraceptives for fertile slaves", drugs) + this.setValue(V.currentRule.set.preg) + this.onchange = (value) => V.currentRule.set.preg = value } } class PregDrugsList extends List { constructor() { - super("Pregnancy control agents for pregnant slaves") - [ + const pairs = [ ["No changes", "no changes", "no default setting"], ["None", "none"], ["Fast gestation", "fast gestation", "fast"], ["Slow gestation", "slow gestation", "slow"], ["Birth supressors", "birth supressors", "suppress"], ["Birth stimulators", "birth stimulators", "stimulate"] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.pregSpeed) - this.onchange = (label, value) => V.currentRule.set.pregSpeed = value + ] + super("Pregnancy control agents for pregnant slaves", pairs) + this.setValue(V.currentRule.set.pregSpeed) + this.onchange = (value) => V.currentRule.set.pregSpeed = value } } class FemaleHormonesList extends List { constructor() { - super("Hormones for female slaves") - [ + const pairs = [ ["No default setting", "no default setting"], ["Intensive Female", "intensive female", 2], ["Female", "female", 1], ["None", "none", 0], ["Male", "male", -1], ["Intensive Male", "intensive male", -2] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.XX) - this.onchange = (label, value) => V.currentRule.set.XX = value + ] + super("Hormones for female slaves", pairs) + this.setValue(V.currentRule.set.XX) + this.onchange = (value) => V.currentRule.set.XX = value } } class GeldingHormonesList extends List { constructor() { - super("Hormones for geldings") - [ + const pairs = [ ["No default setting", "no default setting"], ["Intensive Female", "intensive female", 2], ["Female", "female", 1], ["None", "none", 0], ["Male", "male", -1], ["Intensive Male", "intensive male", -2] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.gelding) - this.onchange = (label, value) => V.currentRule.set.gelding = value + ] + super("Hormones for geldings", pairs) + this.setValue(V.currentRule.set.gelding) + this.onchange = (value) => V.currentRule.set.gelding = value } } class ShemaleHormonesList extends List { constructor() { - super("Hormones for shemales") - [ + const pairs = [ ["No default setting", "no default setting"], ["Intensive Female", "intensive female", 2], ["Female", "female", 1], ["None", "none", 0], ["Male", "male", -1], ["Intensive Male", "intensive male", -2] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.XY) - this.onchange = (label, value) => V.currentRule.set.XY = value + ] + super("Hormones for shemales", pairs) + this.setValue(V.currentRule.set.XY) + this.onchange = (value) => V.currentRule.set.XY = value } } class OtherDrugsList extends List { constructor() { - super("Other drugs (Will be overriden by hormones and other drugs where applicable)") const drugs = [] setup.drugs.forEach(drug => { if (drug.fs === undefined && drug.rs === undefined) @@ -1495,14 +1511,14 @@ window.rulesAssistantOptions = (function() { else if (drug.fs === "youth" && V.arcologies[0].FSYouthPreferentialistResearch === 1) drugs.push([drug.name + " (FS)", drug.value]) }) - this.selectValue(V.currentRule.set.drug) - this.onchange = (label, value) => V.currentRule.set.drug = value + super("Other drugs (Will be overriden by hormones and other drugs where applicable)", drugs) + this.setValue(V.currentRule.set.drug) + this.onchange = (value) => V.currentRule.set.drug = value } } class DietList extends List { constructor() { - super("Slave diets") const diets = [ ["no default setting", "no default setting"], ["Fix fat and skinny slaves", "fix fat and skinny slaves", "attractive"], @@ -1524,39 +1540,40 @@ window.rulesAssistantOptions = (function() { diets.push(["Feritlity", "promote fertility", "fertility"]) if (V.cumProDiet === 1) diets.push(["Cum production", "promote cum production", "cum production"]) - diets.forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.diet) - this.onchange = (label, value) => V.currentRule.set.diet = value + + super("Slave diets", diets) + this.setValue(V.currentRule.set.diet) + this.onchange = (value) => V.currentRule.set.diet = value } } class DietGrowthList extends List { constructor() { - super("Diet support for growth drugs") - [ - ["On", "On", 1], - ["Off", "Off", 0] - ].forEach(i => this.appendChild(new ListItem(...i))) - this.selectValue(V.currentRule.set.dietGrowthSupport) - this.onchange = (label, value) => V.currentRule.set.dietGrowthSupport = value + const pairs = [ + ["On", 1], + ["Off", 0] + ] + super("Diet support for growth drugs", pairs) + this.setValue(V.currentRule.set.dietGrowthSupport) + this.onchange = (value) => V.currentRule.set.dietGrowthSupport = value } } class DietBaseList extends List { constructor() { - super("Diet base") // TODO: better data structure? - [ - ["No default setting", "No default setting", {cum: "no default setting", milk: "no default setting"}], - ["Normal Diet", "Normal Diet", {cum: 0, milk: 0}], - ["Cum Added", "Cum Added", {cum: 1, milk: 0}], - ["Milk Added", "Milk Added", {cum: 0, milk: 1}], - ["Cum & Milk Added", "Cum & Milk Added", {cum: 1, milk: 1}], - ["Cum-Based", "Cum-Based", {cum: 2, milk: 0}] - ["Milk-Based", "Milk-Based", {cum: 0, milk: 2}] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue({cum: V.currentRule.set.dietCum, milk: V.currentRule.set.dietMilk}) - this.onchange = (label, value) => { + const pairs = [ + ["No default setting", {cum: "no default setting", milk: "no default setting"}], + ["Normal Diet", {cum: 0, milk: 0}], + ["Cum Added", {cum: 1, milk: 0}], + ["Milk Added", {cum: 0, milk: 1}], + ["Cum & Milk Added", {cum: 1, milk: 1}], + ["Cum-Based", {cum: 2, milk: 0}] + ["Milk-Based", {cum: 0, milk: 2}] + ] + super("Diet base", pairs) + this.setValue({cum: V.currentRule.set.dietCum, milk: V.currentRule.set.dietMilk}) + this.onchange = (value) => { V.currentRule.set.dietCum = value.cum V.currentRule.set.dietMilk = value.milk } @@ -1565,97 +1582,96 @@ window.rulesAssistantOptions = (function() { class MuscleList extends List { constructor() { - super("Muscles", true) - [ + const pairs = [ ["No default setting", "no default setting"], ["None", "None", 0], ["Toned", "Toned", 20], ["Ripped", "Ripped", 50], ["Massive", "Massive", 100], ["Weak", "Weak", -20] - ].forEach(pair => this.appendChild(new ListItem(...pair))) + ] + super("Muscles", pairs, true) this.setValue(V.currentRule.set.muscles) - this.onchange = (label, value) => V.currentRule.set.muscles = value + this.onchange = (value) => V.currentRule.set.muscles = value } } class BraceList extends List { constructor() { - super("Braces") - [ + const pairs = [ ["No default setting", "no default setting"], ["None", "none"], ["Straighten", "straighten"], ["Universal", "universal"] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.teeth) - this.onchange = (label, value) => V.currentRule.set.teeth = value + ] + super("Braces", pairs) + this.setValue(V.currentRule.set.teeth) + this.onchange = (value) => V.currentRule.set.teeth = value } } class LivingStandardList extends List { constructor() { - super("Living standard") - [ + const pairs = [ ["No default setting", "no default setting"], ["Luxurious", "luxurious"], ["Normal", "normal"], ["Spare", "spare"] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.livingRules) - this.onchange = (label, value) => V.currentRule.set.livingRules = value + ] + super("Living standard", pairs) + this.setValue(V.currentRule.set.livingRules) + this.onchange = (value) => V.currentRule.set.livingRules = value } } class PunishmentList extends List { constructor() { - super("Typical punishment") - [ + const pairs = [ ["No default setting", "no default setting"], ["Confinement", "confinement"], ["Whipping", "whipping"], ["Chastity", "chastity"], ["Situational", "situational"] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.standardPunishment) - this.onchange = (label, value) => V.currentRule.set.standardPunishment = value + ] + super("Typical punishment", pairs) + this.setValue(V.currentRule.set.standardPunishment) + this.onchange = (value) => V.currentRule.set.standardPunishment = value } } class RewardList extends List { constructor() { - super("Typical reward") - [ + const pairs = [ ["No default setting", "no default setting"], ["Relaxation", "relaxation"], ["Drugs", "drugs"], ["Orgasm", "orgasm"], ["Situational", "situational"] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.standardReward) - this.onchange = (label, value) => V.currentRule.set.standardReward = value + ] + super("Typical reward", pairs) + this.setValue(V.currentRule.set.standardReward) + this.onchange = (value) => V.currentRule.set.standardReward = value } } class ReleaseList extends List { constructor() { - super("Release rules") - [ + const pairs = [ ["No default setting", "no default setting"], ["Permissive", "permissive"], ["Sapphic", "sapphic"], ["Masturbation", "masturbation"], ["Restritive", "restrictive"] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.releaseRules) - this.onchange = (label, value) => V.currentRule.set.releaseRules = value + ] + super("Release rules", pairs) + this.setValue(V.currentRule.set.releaseRules) + this.onchange = (value) => V.currentRule.set.releaseRules = value } } class SmartFetishList extends List { constructor() { - super("Smart piercing fetish target") - [ + const pairs = [ ["No default setting", "no default setting"], ["Vanilla", "vanilla"], ["Oral", "oral"], @@ -1667,90 +1683,90 @@ window.rulesAssistantOptions = (function() { ["Preg", "pregnancy"], ["Pain", "masochist"], ["Sadism", "sadist"] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.clitSetting) - this.onchange = (label, value) => V.currentRule.set.clitSetting = value + ] + super("Smart piercing fetish target", pairs) + this.setValue(V.currentRule.set.clitSetting) + this.onchange = (value) => V.currentRule.set.clitSetting = value } } class SmartXYAttractionList extends List { constructor() { - super("Smart piercing XY attraction target") - [ + const pairs = [ ["No default setting", "no default setting"], ["Passionate", "passionate", 100], ["Attracted", "attracted", 75], ["Indifferent", "indifferent", 45], ["None", "none", 0] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.clitSettingXY) - this.onchange = (label, value) => V.currentRule.set.clitSettingXY = value + ] + super("Smart piercing XY attraction target", pairs) + this.setValue(V.currentRule.set.clitSettingXY) + this.onchange = (value) => V.currentRule.set.clitSettingXY = value } } class SmartXXAttractionList extends List { constructor() { - super("Smart piercing XX attraction target") - [ + const pairs = [ ["No default setting", "no default setting"], ["Passionate", "passionate", 100], ["Attracted", "attracted", 75], ["Indifferent", "indifferent", 45], ["None", "none", 0] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.clitSettingXX) - this.onchange = (label, value) => V.currentRule.set.clitSettingXX = value + ] + super("Smart piercing XX attraction target", pairs) + this.setValue(V.currentRule.set.clitSettingXX) + this.onchange = (value) => V.currentRule.set.clitSettingXX = value } } class SmartEnergyList extends List { constructor() { - super("Smart piercing sex drive target") - [ + const pairs = [ ["Nympho", "nympho", 100], ["Sex Addict", "sex addict", 85], ["Powerful", "powerful", 65], ["Healthy", "healthy", 45], ["Weak", "weak", 25], ["Frigid", "frigid", 0] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.clitSettingEnergy) - this.onchange = (label, value) => V.currentRule.set.clitSettingEnergy = value + ] + super("Smart piercing sex drive target", pairs) + this.setValue(V.currentRule.set.clitSettingEnergy) + this.onchange = (value) => V.currentRule.set.clitSettingEnergy = value } } class SpeechList extends List { constructor() { - super("Speech rules") - [ + const pairs = [ ["No default setting", "no default setting"], ["Permissive", "permissive"], ["Suppress accents", "accent elimination"], ["Restrictive", "restrictive"] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set) - this.onchange = (label,value) => V.currentRule.set = value + ] + super("Speech rules", pairs) + this.setValue(V.currentRule.set) + this.onchange = (value) => V.currentRule.set = value } } class RelationshipList extends List { constructor() { - super("Relationship rules") - [ + const pairs =[ ["No default setting", "no default setting"], ["Permissive", "permissive"], ["Just friends", "just friends"], ["Restrictive", "restrictive"] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set) - this.onchange = (label,value) => V.currentRule.set = value + ] + super("Relationship rules", pairs) + this.setValue(V.currentRule.set) + this.onchange = (value) => V.currentRule.set = value } } class PornList extends List { constructor() { - super("Weekly porn publicity subsidy") - [ + const pairs = [ ["No default setting", "no default setting"], ["No broadcasting", "no broadcasting", -1], ["No subsidy", "no subsidy", 0], @@ -1759,24 +1775,25 @@ window.rulesAssistantOptions = (function() { ["3000", "3000", 3000], ["4000", "4000", 4000], ["5000", "5000", 5000] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.pornFameSpending) - this.onchange = (label,value) => V.currentRule.set.pornFameSpending = value + ] + super("Weekly porn publicity subsidy", pairs) + this.setValue(V.currentRule.set.pornFameSpending) + this.onchange = (value) => V.currentRule.set.pornFameSpending = value } } class EyewearList extends List { constructor() { - super("Eyewear") - [ + const pairs = [ ["no default setting"], ["correct with contacts"], ["universal glasses"], ["blur with glasses"], ["blur with contacts"] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.eyewear) - this.onchange = (label, value) => V.currentRule.set.eyewear = value + ] + super("Eyewear", pairs) + this.setValue(V.currentRule.set.eyewear) + this.onchange = (value) => V.currentRule.set.eyewear = value } } @@ -1873,8 +1890,8 @@ window.rulesAssistantOptions = (function() { ["color-coordinate with hair", "color-coordinate with hair", 3], ["slutty", "slutty", 4] ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.makeup) - this.onchange = (label, value) => V.currentRule.set.makeup = value + this.setValue(V.currentRule.set.makeup) + this.onchange = (value) => V.currentRule.set.makeup = value } } @@ -1890,15 +1907,14 @@ window.rulesAssistantOptions = (function() { ["bright and glittery", "bright and glittery", 4], ["hooker nails", "hooker nails", 5] ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.nails) - this.onchange = (label, value) => V.currentRule.set.nails = value + this.setValue(V.currentRule.set.nails) + this.onchange = (value) => V.currentRule.set.nails = value } } class HairLengthList extends List { constructor() { - super("Hair length") - [ + const pairs = [ ["no default setting"], ["very short", "very short", 5], ["short", "short", 10], @@ -1906,15 +1922,15 @@ window.rulesAssistantOptions = (function() { ["long", "long", 60], ["very long", "very long", 100], ["floor length", "floor length", 150] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.hLength) - this.onchange = (label, value) => V.currentRule.set.hLength = value + ] + super("Hair length", pairs) + this.setValue(V.currentRule.set.hLength) + this.onchange = (value) => V.currentRule.set.hLength = value } } class HairColourList extends List { constructor() { - super("Hair color") - [ + const pairs = [ ["no default setting"], ["blonde"], ["golden"], @@ -1941,16 +1957,16 @@ window.rulesAssistantOptions = (function() { ["neon green"], ["neon blue"], ["neon pink"] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.hColor) - this.onchange = (label, value) => V.currentRule.set.hColor = value + ] + super("Hair color", pairs) + this.setValue(V.currentRule.set.hColor) + this.onchange = (value) => V.currentRule.set.hColor = value } } class HairStyleList extends List { constructor() { - super("Hair style") - [ + const pairs = [ ["no default setting"], ["neat"], ["shaved"], @@ -1968,16 +1984,16 @@ window.rulesAssistantOptions = (function() { ["tails"], ["afro"], ["strip"] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.hStyle) - this.onchange = (label, value) => V.currentRule.set.hStyle = value + ] + super("Hair style", pairs) + this.setValue(V.currentRule.set.hStyle) + this.onchange = (value) => V.currentRule.set.hStyle = value } } class PubicHairColourList extends List { constructor() { - super("Pubic hair color, when present") - [ + const pairs = [ ["no default setting"], ["blonde"], ["golden"], @@ -2004,16 +2020,16 @@ window.rulesAssistantOptions = (function() { ["neon green"], ["neon blue"], ["neon pink"] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.pubicHColor) - this.onchange = (label, value) => V.currentRule.set.pubicHColor = value + ] + super("Pubic hair color, when present", pairs) + this.setValue(V.currentRule.set.pubicHColor) + this.onchange = (value) => V.currentRule.set.pubicHColor = value } } class PubicHairStyleList extends List { constructor() { - super("Pubic hairstyle") - [ + const pairs = [ ["no default setting"], ["waxed"], ["in a strip"], @@ -2021,16 +2037,16 @@ window.rulesAssistantOptions = (function() { ["bushy"], ["bushy in the front and neat in the rear"], ["very bushy"] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.pubicHStyle) - this.onchange = (label, value) => V.currentRule.set.pubicHStyle = value + ] + super("Pubic hairstyle", pairs) + this.setValue(V.currentRule.set.pubicHStyle) + this.onchange = (value) => V.currentRule.set.pubicHStyle = value } } class ArmpitHairColourList extends List { constructor() { - super("Underarm hair color, when present") - [ + const pairs = [ ["no default setting"], ["blonde"], ["golden"], @@ -2053,24 +2069,327 @@ window.rulesAssistantOptions = (function() { ["grey"], ["silver"], ["white"] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.underArmHColor) - this.onchange = (label, value) => V.currentRule.set.underArmHColor = value + ] + super("Underarm hair color, when present", pairs) + this.setValue(V.currentRule.set.underArmHColor) + this.onchange = (value) => V.currentRule.set.underArmHColor = value } } class ArmpitHairStyleList extends List { constructor() { - super("Underarm hair style") - [ + const pairs = [ ["no default setting"], ["waxed"], ["shaved"], ["neat"], ["bushy"] - ].forEach(pair => this.appendChild(new ListItem(...pair))) - this.selectValue(V.currentRule.set.underArmHStyle) - this.onchange = (label, value) => V.currentRule.set.underArmHStyle = value + ] + super("Underarm hair style", pairs) + this.setValue(V.currentRule.set.underArmHStyle) + this.onchange = (value) => V.currentRule.set.underArmHStyle = value + } + } + + class EarPiecingList extends List { + constructor() { + const pairs = [ + ["No default setting", "no default setting"], + ["None", 0], + ["Light", 1], + ["Heavy", 2] + ] + super("Ear piercings", pairs) + this.setValue(V.currentRule.set.earPiercing) + this.onchange = (value) => V.currentRule.set.earPiercing + } + } + + class NosePiercingList extends List { + constructor() { + const pairs = [ + ["No default setting", "no default setting"], + ["None", 0], + ["Light", 1], + ["Heavy", 2] + ] + super("Nasal piercings", pairs) + this.setValue(V.currentRule.set.nosePiercing) + this.onchange = (value) => V.currentRule.set.earPiercing + } + } + + class EyebrowPiercingList extends List { + constructor() { + const pairs = [ + ["No default setting", "no default setting"], + ["None", 0], + ["Light", 1], + ["Heavy", 2] + ] + super("Eyebrow piercings", pairs) + this.setValue(V.currentRule.set.eyebrowPiercing) + this.onchange = (value) => V.currentRule.set.eyebrowPiercing + } + } + + class NavelPiercingList extends List { + constructor() { + const pairs = [ + ["No default setting", "no default setting"], + ["None", 0], + ["Light", 1], + ["Heavy", 2] + ] + super("Navel piercings", pairs) + this.setValue(V.currentRule.set.navelPiercing) + this.onchange = (value) => V.currentRule.set.navelPiercing + } + } + + class NipplePiercingList extends List { + constructor() { + const pairs = [ + ["No default setting", "no default setting"], + ["None", 0], + ["Light", 1], + ["Heavy", 2] + ] + super("Nipple piercings", pairs) + this.setValue(V.currentRule.set.nipplesPiercing) + this.onchange = (value) => V.currentRule.set.nipplesPiercing + } + } + + class AreolaPiercingList extends List { + constructor() { + const pairs = [ + ["No default setting", "no default setting"], + ["None", 0], + ["Studded", 1] + ] + super("Areola studs", pairs) + this.setValue(V.currentRule.set.areolaePiercing) + this.onchange = (value) => V.currentRule.set.areolaePiercing + } + } + + class LipPiercingList extends List { + constructor() { + const pairs = [ + ["No default setting", "no default setting"], + ["None", 0], + ["Light", 1], + ["Heavy", 2] + ] + super("Lip piercings", pairs) + this.setValue(V.currentRule.set.lipsPiercing) + this.onchange = (value) => V.currentRule.set.lipsPiercing + } + } + + class TonguePiercingList extends List { + constructor() { + const pairs = [ + ["No default setting", "no default setting"], + ["None", 0], + ["Light", 1], + ["Heavy", 2] + ] + super("Tongue piercing", pairs) + this.setValue(V.currentRule.set.tonguePiercing) + this.onchange = (value) => V.currentRule.set.tonguePiercing + } + } + + class CliptPiercingList extends List { + constructor() { + const pairs = [ + ["No default setting", "no default setting"], + ["None", 0], + ["Light", 1], + ["Heavy", 2], + ["Smart (expensive)", 3] + ] + super("Clit piercing", pairs) + this.setValue(V.currentRule.set.clitPiercing) + this.onchange = (value) => V.currentRule.set.clitPiercing + } + } + + class LabiaPiercingList extends List { + constructor() { + const pairs = [ + ["No default setting", "no default setting"], + ["None", 0], + ["Light", 1], + ["Heavy", 2] + ] + super("Pussylips piercings", pairs) + this.setValue(V.currentRule.set.vaginaPiercing) + this.onchange = (value) => V.currentRule.set.vaginaPiercing + } + } + + class ShaftPiercingList extends List { + constructor() { + const pairs = [ + ["No default setting", "no default setting"], + ["None", 0], + ["Light", 1], + ["Heavy", 2] + ] + super("Shaft piercings", pairs) + this.setValue(V.currentRule.set.dickPiercing) + this.onchange = (value) => V.currentRule.set.dickPiercing + } + } + + class PerineumPiercingList extends List { + constructor() { + const pairs = [ + ["No default setting", "no default setting"], + ["None", 0], + ["Light", 1], + ["Heavy", 2] + ] + super("Perianal piercings", pairs) + this.setValue(V.currentRule.set.anusPiercing) + this.onchange = (value) => V.currentRule.set.anusPiercing + } + } + + class CorsetPiercingList extends List { + constructor() { + const pairs = [ + ["No default setting", "no default setting"], + ["None", 0], + ["Apply", 1] + ] + super("Corset piercings", pairs) + this.setValue(V.currentRule.set.corsetPiercing) + this.onchange = (value) => V.currentRule.set.corsetPiercing + } + } + + class AutoBrandingList exnteds List { + constructor() { + const pairs = [ + ["Activate", 1], + ["Off", 0], + ] + super("Automatic branding", pairs) + this.setValue(V.currentRule.set.autoBrand) + this.onchange = (value) => V.currentRule.set.autoBrand = value + } + } + + class BrandingLocationList extends List { + constructor() { + super("Your preferred location for brands is", []) + + const ears = new ListSubSection("Ears", [ + ["Left", "left ear"], + ["Right", "right ear"], + ["Both", "ears"] + ]) + this.appendChild(ears) + + const cheeks = new ListSubSection("Cheeks", [ + ["Left", "left cheek"], + ["Right", "right cheek"], + ["Both", "cheeks"] + ]) + this.appendChild(cheeks) + + const shoulders = new ListSubSection("Shoulders", [ + ["Left", ], + ["Right", ], + ["Both", ] + ]) + this.appendChild(shoulders) + + const breasts = new ListSubSection("Breasts", [ + ["Left", ], + ["Right", ], + ["Both", ] + ]) + this.appendChild(breasts) + + const upper_arms = new ListSubSection("Arms, upper", [ + ["Left", ], + ["Right", ], + ["Both", ] + ]) + this.appendChild(upper_arms) + + const lower_arms = new ListSubSection("Arms, lower", [ + ["Left", ], + ["Right", ], + ["Both", ] + ]) + this.appendChild(lower_arms) + + const wrist = new ListSubSection("Wrist", [ + ["Left", ], + ["Right", ], + ["Both", ] + ]) + this.appendChild(wrist) + + const hand = new ListSubSection("Hand", [ + ["Left", ], + ["Right", ], + ["Both", ] + ]) + this.appendChild(hand) + + const buttocks = new ListSubSection("Buttocks", [ + ["Left", ], + ["Right", ], + ["Both", ] + ]) + this.appendChild(buttocks) + + const thigh = new ListSubSection("Thigh", [ + ["Left", ], + ["Right", ], + ["Both", ] + ]) + this.appendChild(thigh) + + const calf = new ListSubSection("Calf", [ + ["Left", ], + ["Right", ], + ["Both", ] + ]) + this.appendChild(calf) + + const ankle = new ListSubSection("Ankle", [ + ["Left", ], + ["Right", ], + ["Both", ] + ]) + this.appendChild(ankle) + + const feet = new ListSubSection("Feet", [ + ["Left", ], + ["Right", ], + ["Both", ] + ]) + this.appendChild(feet) + + const other = new ListSubSection("Other", [ + ["Neck", ], + ["Chest", ], + ["Belly", ], + ["Pubic mound", ], + ["Back", ] + ]) + this.appendChild(other) + + this.selectValue(V.brandTarget) + this.onchange = (value) => V.brandTarget = value } } })()