diff --git a/src/js/rulesAssistantOptions.tw b/src/js/rulesAssistantOptions.tw index cdb6b56def7d6dad6c8120d4cef7a7a50d6d2cad..b6ef8a374f3f7b4d44e68a8b0ba59b109a55cb3c 100644 --- a/src/js/rulesAssistantOptions.tw +++ b/src/js/rulesAssistantOptions.tw @@ -5,7 +5,6 @@ // 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 -// TODO: automatic set assignment or facility // TODO: specific inclusion and exclusion fix window.rulesAssistantOptions = (function() { @@ -829,6 +828,7 @@ window.rulesAssistantOptions = (function() { class BehaviourSection extends Section { constructor() { super("Behavior Settings"); + this.appendChild(new AutomaticAssignmentList()); this.appendChild(new LivingStandardList()); this.appendChild(new PunishmentList()); this.appendChild(new RewardList()); @@ -2887,6 +2887,37 @@ window.rulesAssistantOptions = (function() { this.onchange = (value) => current_rule.set.surgery_hair = value; } } + + class AutomaticAssignmentList extends List { + constructor() { + const items = [ + ["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"] + ] + if (V.HGSuite > 0) items.push(["Head Girl Suite", "live with your Head Girl"]); + if (V.brothel > 0) items.push(["Brothel", "work in the brothel"]); + if (V.club > 0) items.push(["Club", "serve in the club"]); + if (V.arcade > 0) items.push(["Arcade", "be confined in the arcade"]); + if (V.dairy > 0) items.push(["Dairy", "work in the dairy"]); + if (V.servantQuarters > 0) items.push(["Servant Quarters", "work as a servant"]); + if (V.masterSuite > 0) items.push(["Master Suite", "serve in the master suite"]); + if (V.schoolroom > 0) items.push(["Schoolroom", "learn in the schoolroom"]); + if (V.spa > 0) items.push(["Spa", "rest in the spa"]); + if (V.clinic > 0) items.push(["Clinic", "get treatment in the clinic"]); + if (V.cellblock > 0) items.push(["Cellblock", "be confined in the cellblock"]); + + super("Automatically set assignment", items); + this.setValue(current_rule.set.setAssignment); + this.onchange = (value) => current_rule.set.setAssignment = value; + } return rulesAssistantOptions; })();