Newer
Older
:: Rules Assistant Options [script]
// rewrite of the rules assistant options page in javascript
// uses an object-oriented widget pattern
// wrapped in a closure so as not to polute the global namespace
// the widgets are generic enough to be reusable; if similar user interfaces are ported to JS, we could move the classes to the global scope
window.rulesAssistantOptions = (function() {
"use strict"
let V
let r = ""
V = State.variables
V.nextButton = "Back to Main"
V.nextLink = "Main"
V.returnTo = "Main"
V.showEncyclopedia = 1
V.encyclopedia = "Personal Assistant"
function onreturn(e, cb) {
if (e.keyCode === 13) cb()
}
// create a new rule and reload
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
ID: id,
name: `Rule ${id}`,
condition: {
function: false,
data: {},
excludeSpecialSlaves: false,
assignment: [],
excludeAssignment: [],
selectedSlaves: [],
excludedSlaves: [],
facility: [],
excludeFacility: [],
},
set: {
releaseRules: "no default setting",
clitSetting: "no default setting",
clitSettingXY: "no default setting",
clitSettingXX: "no default setting",
clitSettingEnergy: "no default setting",
speechRules: "no default setting",
clothes: "no default setting",
collar: "no default setting",
shoes: "no default setting",
virginAccessory: "no default setting",
aVirginAccessory: "no default setting",
vaginalAccessory: "no default setting",
aVirginDickAccessory: "no default setting",
dickAccessory: "no default setting",
bellyAccessory: "no default setting",
aVirginButtplug: "no default setting",
buttplug: "no default setting",
eyeColor: "no default setting",
makeup: "no default setting",
nails: "no default setting",
hColor: "no default setting",
hLength: "no default setting",
hStyle: "no default setting",
pubicHColor: "no default setting",
pubicHStyle: "no default setting",
nipplesPiercing: "no default setting",
areolaePiercing: "no default setting",
clitPiercing: "no default setting",
vaginaLube: "no default setting",
vaginaPiercing: "no default setting",
dickPiercing: "no default setting",
anusPiercing: "no default setting",
lipsPiercing: "no default setting",
tonguePiercing: "no default setting",
earPiercing: "no default setting",
nosePiercing: "no default setting",
eyebrowPiercing: "no default setting",
navelPiercing: "no default setting",
corsetPiercing: "no default setting",
boobsTat: "no default setting",
buttTat: "no default setting",
vaginaTat: "no default setting",
dickTat: "no default setting",
lipsTat: "no default setting",
anusTat: "no default setting",
shouldersTat: "no default setting",
armsTat: "no default setting",
legsTat: "no default setting",
backTat: "no default setting",
stampTat: "no default setting",
curatives: "no default setting",
livingRules: "no default setting",
relationshipRules: "no default setting",
standardPunishment: "no default setting",
standardReward: "no default setting",
diet: "no default setting",
dietCum: "no default setting",
dietMilk: "no default setting",
muscles: "no default setting",
XY: "no default setting",
XX: "no default setting",
gelding: "no default setting",
preg: "no default setting",
growth_boobs: "no default setting",
growth_butt: "no default setting",
growth_lips: "no default setting",
growth_dick: "no default setting",
growth_balls: "no default setting",
aphrodisiacs: "no default setting",
autoSurgery: 0,
autoBrand: 0,
pornFameSpending: "no default setting",
dietGrowthSupport: 0,
eyewear: "no default setting",
setAssignment: "no default setting",
facilityRemove: false,
removalAssignment: "rest",
surgery_eyes: "no default setting",
surgery_lactation: "no default setting",
surgery_prostate: "no default setting",
surgery_cosmetic: "no default setting",
surgery_accent: "no default setting",
surgery_shoulders: "no default setting",
surgery_shouldersImplant: "no default setting",
surgery_boobs: "no default setting",
surgery_hips: "no default setting",
surgery_hipsImplant: "no default setting",
surgery_butt: "no default setting",
surgery_faceShape: "no default setting",
surgery_lips: "no default setting",
surgery_holes: "not default setting",
underArmHColor: "no default setting",
underArmHStyle: "no default setting",
drug: "no default setting",
eyes: "no default setting",
pregSpeed: "no default setting",
bellyImplantVol: -1,
}
})
V.currentRule = V.defaultRules[V.defaultRules.length-1]
reload(root)
}
function removeRule(root) {
const idx = V.defaultRules.findIndex(rule => rule.ID === V.currentRule.ID)
V.defaultRules.splice(idx, 1)
V.currentRule = idx < V.defaultRules.length ? idx : V.defaultRules.length - 1
function lowerPriority(root) {
if (V.defaultRules.length === 1) return // nothing to swap with
const idx = V.defaultRules.findIndex(rule => rule.ID === V.currentRule.ID)
if (idx === 0) return // no lower rule
arraySwap(V.defaultRules, idx, idx-1)
reload(root)
}
function higherPriority(root) {
if (V.defaultRules.length === 1) return // nothing to swap with
const idx = V.defaultRules.findIndex(rule => rule.ID === V.currentRule.ID)
if (idx === V.defaultRules.length - 1) return // no higher rule
arraySwap(V.defaultRules, idx, idx+1)
reload(root)
}
function changeName(name, root) {
if (name === V.currentRule.name) return
V.currentRule = name
reload(root)
}
// reload the passage
function reload(root) {
root.element.remove()
rulesAssistantOptions()
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
}
// the Element class wraps around a DOM element and adds extra functionality
// this is safer than extending DOM objects directly
// it also turns DOM manipulation into an implementation detail
class Element {
constructor(...args) {
this.parent = null
this.element = this.render(...args)
this.children = []
}
appendChild(child) {
child.parent = this
this.children.push(child)
this.element.appendChild(child.element)
}
// return the first argument to simplify creation of basic container items
render(...args) {
return args[0]
}
}
// list of clickable elements
// has a short explanation (the prefix) and a value display
// 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) {
this.selectedItem = null
this.value = this.element.querySelector(".rajs-value")
}
render(prefix, textinput) {
const elem = document.createElement("div")
const label = document.createElement("span")
label.innerHTML = prefix
let value
if (textinput) {
value = document.createElement("input")
value.classList.add("rajs-value")
// call the variable binding when the input field is no longer being edited, and when the enter key is pressed
value.onfocusout = () => { this.propagateChange() }
value.onkeypress = (e) => { onreturn(e, () => { this.propagateChange() })}
} else {
value = document.createElement("strong")
}
value.setAttribute("type", "text")
elem.appendChild(value)
elem.classList.add("rajs-list")
return elem
}
selectItem(item) {
if (this.selectedItem) this.selectedItem.deselect()
this.selectedItem = item
setValue(item.setValue)
this.propagateChange()
}
selectValue(what) {
this.children.some(child => {
if (child.data === what) {
child.select()
return true
}
else return false
})
}
setValue(what) {
if (this.value.tagName === "input")
this.value.value = what
else
this.value.innerHTML = what
}
getValue(what) {
return (this.value.tagName === "input" ? this.parse(this.value.value) : this.value.innerHTML)
}
// customisable input field parser / sanity checker
parse(what) { return what }
propagateChange() {
if (this.onchange instanceof Function)
const parse = {
integer(string) {
let n = parseInt(string, 10)
return n === NaN? 0: n
},
boobs(string) {
// a clickable item of a list
class ListItem extends Element {
this.setvalue = setvalue !== undefined ? setvalue : displayvalue
this.data = data !== undefined ? data : this.setvalue !== undefined ? this.setvalue : displayvalue
this.selected = false
}
render(displayvalue) {
const elem = document.createElement("span")
elem.classList.add("rajs-listitem")
elem.innerHTML = displayvalue
elem.onclick = () => { return this.select() }
return elem
}
select() {
if (this.selected) return false
this.parent.selectItem(this)
this.elem.classList.add("selected")
this.selected = true
}
deselect() {
this.elem.classList.remove("selected")
this.selected = false
}
}
// a way to organise lists with too many elements in subsections
// children are bound to the master list
class ListSubSection extends Element {
render(label) {
elem.innerText = label + ":"
return elem
}
appendChild(child) {
super.appendChild(child)
child.parent = this.parent
class Options extends Element {
constructor(elements=[]) {
elements.forEach(element => { this.appendChild(element) })
}
render() {
const elem = document.createElement("div")
elem.classList.add("rajs-list")
return elem
}
}
class OptionsItem extends Element {
constructor(label, onclick) {
super(label)
this.onclick = onclick
}
render(label, onclick) {
const elem = document.createElement("span")
elem.classList.add("rajs-listitem")
elem.innerHTML = label
elem.onclick = () => { return this.onclick() }
return elem
}
}
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
class ButtonList extends Element {
render(label) {
const elem = document.createElement("div")
const labelel = document.createElement("span")
labelel.innerhTML = label += ":"
elem.appendChild(labelel)
return elem
}
getSelection() {
return (this.children
.filter(child => child.selected)
.map(child => child.setvalue)
)
}
onchange() { return }
}
class ButtonItem extends Element {
constructor(label, setvalue, selected=false) {
super(label, selected)
this.selected = selected
this.setvalue = setvalue ? setvalue : label
}
render(label, selected) {
const container = document.createElement("div")
container.classList.add("rajs-listitem")
const labelel = document.createElement("span")
labelel.innerHTML = label
const button = document.createElement("input")
button.setAttribute("type", "checkbox")
button.checked = selected
button.onchange = () => this.onchange(button.checked)
container.appendChild(labelel)
container.appendChild(button)
return container
}
onchange(value) {
this.selected = value
parent.onchange(this)
}
}
class NewRuleField extends Element {
constructor(root) {
super()
this.root = root
}
render() {
const container = document.createElement("div")
const textarea = document.createElmenet("textarea")
textarea.placeholder = "Paste your rule here"
container.appendChild(textarea)
this.textarea = textarea
const button = document.createElement("button")
button.name = "Load"
button.onclick = () => { this.loadNewRule() }
container.appendChild(button)
return container
}
loadNewRule() {
const text = this.textarea.value
try {
const rule = JSON.parse(text)
reload(this.root)
} catch (e) {
alert(e)
}
}
}
if(V.defaultRules.length === 0) {
const paragraph = document.createElement("p")
paragraph.innerHTML = "<strong>No rules</strong>"
this.appendChild(new Element(paragraph))
this.appendChild(new NoRules(this))
return
this.appendChild(new RuleSelector(this))
this.appendChild(new RuleOptions(this))
}
render(element) {
const greeting = document.createElement("p")
greeting.innerHTML = `<em>${properTitle()}, I will review your slaves and make changes that will have a beneficial effect. Apologies, ${properTitle()}, but this function is... not fully complete. It may have some serious limitations. Please use the 'no default setting' option to identify areas I should not address.</em>`
element.appendChild(greeting)
return element
class NoRules extends Options {
constructor(root) {
super()
this.root = root
const newrule = new OptionsItem("Add a new rule", () => { newRule(this.root) })
this.appendChild(newrule)
const importrule = new OptionsItem("Import a rule", () => { this.root.appendChild(new NewRuleField()) })
this.appendChild(importrule)
}
}
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
// 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) {
V.currentRule = rule
reload(root)
}
}
}
// buttons for doing transformations on rules
class RuleOptions extends Options {
constructor(root) {
super()
this.appendChild(new OptionsItem("New Rule", () => newRule(root)))
this.appendChild(new OptionsItem("Remove Rule", () => removeRule(root)))
this.appendChild(new OptionsItem("Apply rules", () => this.appendChild(new ApplicationLog())))
this.appendChild(new OptionsItem("Lower Priotity", () => lowerPriority(root)))
this.appendChild(new OptionsItem("Higher Priority", () => higherPriority(root)))
this.appendChild(new OptionsItem("Rename", () => this.appendChild(new RenameField(root))))
this.appendChild(new OptionsItem("Export this rule", () => this.appendChild(new ExportField())))
this.appendChild(new OptionsItem("Export all rules", () => this.appendChild(new ExportField(true))))
this.appendChild(new OptionsItem("Import a rule", () => this.appendChild(new NewRuleField())))
}
}
class ApplicationLog extends Element {
render() {
const elem = document.createElement("div")
elem.innerHTML = DefaultRules()
return elem
}
}
class RenameField extends Element {
constructor(root) {
super()
this.element.onfocusout = () => changeName(this.element.value, root)
this.element.onkeypress = (e) => onreturn(e, () => changeName(this.element.value, root))
}
render() {
const elem = document.createElement("div")
elem.setAttribute("type", "text")
elem.setAttribute("value", V.currentRule.name)
}
}
class ExportField extends Element {
render(all=false) {
const element = document.createElement("textarea")
element.value = all ? JSON.stringify(V.currentRule) : map(i => JSON.stringify(i), V.defaultRules).join("\n\n")
return element
}
}
// parent section for condition editing
class ConditionEditor extends Element {
constructor() {
super()
this.appendChild(new ConditionFunction())
this.appendChild(new AssignmentInclusion())
this.appendChild(new FacilityInclusion())
this.appendChild(new SpecialExclusion())
this.appendChild(new SpecificInclusionExclusion())
}
render() {
const element = document.createElement("div")
return element
}
}
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
class ConditionFunction extends Element {
constructor() {
super()
this.fnlist = new List("Activation function:")
this.fneditor = null
["Never", "Always", "Custom"].forEach(i => this.fnlist.appendChild(i))
["Devotion", "Trust", "Health", "Sex drive", "Weight", "Age", "Body Age", "Visible Age", "Muscles", "Lactation", "Pregnancy", "Pregnancy Multiples", "Belly Implant", "Belly Size"].forEach(i => this.fnlist.appendChild(i, this.getAttribute(i)))
this.fnlist.onchange = () => this.fnchanged
switch(V.currentRule.condition.function) {
case "Never":
case "Always":
break
case "Custom":
this.appendChild(new CustomEditor(V.currentRule.condition.data))
break
default:
this.appendChild(new RangeEditor(V.currentRule.condition.function, V.currentRule.condition.data))
break
}
}
render() {
return document.createElement("div")
}
getAttribute(what) {
return {
"Devotion": "devotion",
"Trust": "trust",
"Health": "health",
"Sex drive": "energy",
"weight": "weight",
"Age": "actualAge",
"Body Age": "physicalAge",
"Visible Age": "visualAge",
"Muscles": "muscles",
"Lactation": "lactation",
"Pregnancy": "preg",
"Pregnancy Multiples": "pregType",
"Belly implant": "bellyImplant",
"Belly Size": "belly",
}[what]
}
fnchanged(value) {
if (this.fneditor !== null) {
this.fneditor.element.remove()
this.fneditor = null
}
switch(value) {
case "Never":
V.currentRule.condition.function = false
V.currentRule.condition.data = {}
break
case "Always":
V.currentRule.condition.function = true
V.currentRule.condition.data = {}
break
case "Custom":
V.currentRule.condition.function = "custom"
V.currentRule.condition.data = {}
this.appendChild(new CustomEditor(V.currentRule.condition.data))
break
default:
V.currentRule.condition.function = "between"
V.currentRule.condition.data = { attribute: value, value: [null, null] }
this.appendChild(new RangeEditor(V.currentRule.condition.data))
break
}
}
}
class CustomEditor extends Element {
constructor(data) {
if (data.length === 0) data = "function(slave) { return slave.slaveName === 'Fancy Name'; }"
super(data)
this.elem.onfocusout = () => V.currentRule.data = this.elem.value
}
render(data) {
const elem = document.createElement("textarea")
elem.setAttribute(value, data)
return elem
}
}
class RangeEditor extends Element {
render(data) {
const elem = document.createElement("div")
const min = document.createElement("input")
min.setAttribute("type", "text")
min.value = data.between[0]
min.onkeypress = e => onreturn(e, () => this.setmin(min.value))
min.onfocusout = e => this.setmin(min.value)
elem.appendChild(min)
const max = document.createElement("input")
max.setAttribute("type", "text")
max.value = data.between[0]
max.onkeypress = e => onreturn(e, () => this.setmax(max.value))
max.onfocusout = e => this.setmax(max.value)
elem.appendChild(max)
const infobar = document.createElement("div")
infobar.innerHTML = this.info(data.attribute)
elem.appendChild(infobar)
return elem
}
parse(value) {
value = value.strip()
if (value === "null") value = null
else {
value = parseInt(value)
if (value === NaN) value = null
}
return value
}
setmin(value) {
V.currentRule.data.between[0] = this.parse(value)
}
setmax(value) {
V.currentRule.data.between[1] = this.parse(value)
}
info(attribute) {
return "TODO"
}
}
class AssignmentInclusion extends ButtonList() {
constructor() {
super("Apply to assignments")
["Rest", "Fucktoy", "Subordinate Slave", "House Servant", "Confined", "Whore", "Public Servant", "Classes", "Milked", "Gloryhole"].forEach(
i => this.appendChild(new ButtonItem(i, this.getAttribute(i), V.currentRule.condition.assignment.includes(i))))
}
onchange() {
V.currentRule.condition.assignment = this.getSelection()
}
getAttribute(what) {
return {
"Rest": "rest",
"Fucktoy": "please you",
"Subordinate Slave": "be a subordinate slave",
"House Servant": "be a servant",
"Confined": "stay confined",
"Whore": "whore",
"Public Servant": "serve the public",
"Classes": "take classes",
"Milked": "get milked",
"Gloryhole": "work a glory hole",
}[what]
}
}
class FacilityInclusion extends ButtonList() {
constructor() {
super("Apply to assignments")
const facilities = []
if (V.HGSuite > 0) facilities.push("Head Girl Suite")
if (V.brothel > 0) facilities.push("Brothel")
if (V.club > 0) facilities.push("Club")
if (V.arcade > 0) facilities.push("Arcade")
if (V.dairy > 0) facilities.push("Dairy")
if (V.servantQuarters > 0) facilities.push("Servant Quarters")
if (V.masterSuite > 0) facilities.push("Master Suite")
if (V.schoolroom > 0) facilities.push("Schoolroom")
if (V.spa > 0) facilities.push("Spa")
if (V.clinic > 0) facilities.push("Clinic")
if (V.cellblock > 0) facilities.push("Cellblock")
facilities.forEach(
i => this.appendChild(new ButtonItem(i, this.getAttribute(i), V.currentRule.condition.facility.includes(i))))
}
onchange(value) {
V.currentRule.condition.facility = this.getSelection()
}
getAttribute(what) {
return {
"Head Girl Suite": "live with your Head Girl",
"Brothel": "work in the brothel",
"Club": "serve in the club",
"Arcade": "be confined in the arcade",
"Dairy": "work in the dairy",
"Servant Quarters": "work as a servant",
"Master Suite": "serve in the master suite",
"Schoolroom": "learn in the schoolroom",
"Spa": "rest in the spa",
"Clinic": "get treatment in the clinic",
"Cellblock": "be confined in the cellblock",
}[what]
}
}
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
}
}
class SpecificInclusionExclusion extends Options {
constructor() {
super()
this.appendChild(new OptionsItem("Limit to specific slaves", () => Engine.display("Rules Slave Select")))
this.appendChild(new OptionsItem("Exclude specific slaveS", () => Engine.display("Rules Slave Exclude")))
}
}
// parent section for effect editing
class EffectEditor extends Element {
constructor() {
this.appendChild(new AppearanceSection())
this.appendChild(new CosmeticSection())
this.appendChild(new BodyModSection())
this.appendChild(new AutosurgerySection())
this.appendChild(new RegimenSection())
this.appendChild(new BehaviourSection())
}
render() {
const element = document.createElement("div")
return element
}
}
class AppearanceSection extends Element {
constructor() {
super()
this.appendChild(new ClothesList())
this.appendChild(new CollarList())
this.appendChild(new ShoeList())
this.appendChild(new CorsetList())
this.appendChild(new VagAccVirginsList())
this.appendChild(new VagAccAVirginsList())
this.appendChild(new VagAccOtherList())
this.appendChild(new DickAccVirginsList())
this.appendChild(new DickAccOtherList())
this.appendChild(new ButtplugsVirginsList())
this.appendChild(new ButtplugsOtherList())
this.appendChild(new ImplantVolumeList())
this.appendChild(new AutosurgerySwitch())
}
render() {
return document.createElement("div")
}
}
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
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 nclothes = [
["No default clothes setting", "no default setting"],
["Bangles", "slutty jewelry"],
["Bodysuit", "a comfortable bodysuit"],
["Cheerleader outfit", "a cheerleader outfit"],
["Clubslut netting", "clubslut netting"],
["Cutoffs and a t-shirt", "cutoffs and a t-shirt"],
["Fallen nun", "a fallen nuns habit"],
["Halter top", "a halter top dress"],
["Hijab and abaya", "a hijab and abaya"],
["Latex catsuit", "a latex catsuit"],
["Leotard", "a leotard"],
["Maid (nice)", "a nice maid outfit"],
["Maid (slutty)", "a slutty maid outfit"],
["Military uniform", "a military uniform"],
["Mini dress", "a mini dress"],
["Nice lingerie", "attractive lingerie"],
["Nurse (nice)", "a nice nurse outfit"],
["Schoolgirl", "a schoolgirl outfit"],
["Silken ballgown", "a ball gown"],
["Skimpy battledress", "battledress"],
["Slave gown", "a slave gown"],
["Slutty outfit", "a slutty outfit"],
["String bikini", "a stirng bikini"],
["Scalemail bikini", "a scalemail bikini"],
["Succubus costume", "a succubus outfit"],
["Suit (nice)", "nice business sattire"],
["Suit (slutty", "slutty business attire"],
["Spats and tank top", "spats and a tank top"]
]
const fsnclothes = [
["Body oil (FS)", "body oil"],
["Bunny outfit (FS)", "a bunny outfit"],
["Chattel habit (FS)", "a chattel habit"],
["Conservative clothing (FS)", "conservative clothing"],
["Harem gauze (FS)", "harem gauze"],
["Huipil (FS)", "a huipil"],
["Kimono (FS)", "a kimono"],
["Maternity dress (FS)", "a maternity dress"],
["Maternity lingerie (FS)", "attractive lingerie for a pregnant woman"],
["Slutty qipao (FS)", "a slutty qipao"],
["Stretch pants and a crop-top (FS)", "stretch pants and a crop-top"],
["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)
const hclothes = [
["Nude", "no clothing"]
["Penitent nun", "a penitent nuns habit"],
["Restrictive latex", "restrictive latex"],
["Shibari ropes", "shibari ropes"],
["Uncomfortable straps", "uncomfortable straps"]
]
const fshclothes = [
["Chains (FS)", "chains"],
]
hclothes.forEach(pair => nice.appendChild(new ListItem(...pair)))
fshclothes.forEach(pair => { if (isItemAccessible(pair[1])) nice.appendChild(new ListItem(...pair))})
this.selectValue(V.currentRule.set.clothes)
this.onchange = (label, value) => 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 ncollars = [
["Stylish leather", "stylish leather"],
["Satin choker", "satin choker"],
["Silken Ribbon", "silk ribbon"],
["Heavy Gold", "heavy gold"],
["Pretty jewelry", "pretty jewelry"],
["Cowbell", "leather with cowbell"]
]
if (V.seeAge !== 0)
ncollars.push(["Nice retirement counter", "nice retirement counter"])
const fsncollars = [
["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)
const hcollars = [
["Tight steel", "tight steel"],
["Uncomfortable leather", "uncomfortable leather"],
["Pregnancy biometrics", "preg biometrics"],
["Shock punishment", "shock punishment"],
["Dildo gag", "dildo gag"],
["Ball gag", "ball gag"],
["Bit gag", "bit gag"],
["Neck corset", "neck corset"],
]
if (V.seeAge !== 0)
harsh.appendChild(["Cruel retirement counter", "cruel retirement counter"])
if (V.toysBoughtGags === 1)
harsh.appendChild(["Massive dildo gag", "massive dildo gag"])
hcollars.forEach(pair => harsh.appendChild(...pair))
this.selectValue(V.currentRule.set.collar)
this.onchange = (label, value) => V.currentRule.set.collar = value
}
}
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
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
}
}
class CorsetList extends List {
constructor() {
super("Corsetage")
const bellies = []
setup.bellyAccessories.forEach(acc => {
if (acc.fs === undefined && acc.rs === undefined)
bellies.push([acc.name, acc.value])
else if (acc.fs === "repopulation" && V.arcologies[0].FSRepopulationFocus !== "unset")
bellies.push([acc.name + " (FS)", acc.value])
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
}
}
class VagAccVirginsList extends List {
constructor() {
super("Vaginal Accessories for Virgins")
const accs = []
setup.vaginalAccessories.forEach(acc => {
if (acc.fs === undefined && acc.rs === undefined)
accs.push([acc.name, acc.value])
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