diff --git a/src/js/rulesAssistantOptions.tw b/src/js/rulesAssistantOptions.tw index b6ef8a374f3f7b4d44e68a8b0ba59b109a55cb3c..3444d8635e359fa7e4c30dd84f2d9b970e30b16d 100644 --- a/src/js/rulesAssistantOptions.tw +++ b/src/js/rulesAssistantOptions.tw @@ -75,7 +75,7 @@ window.rulesAssistantOptions = (function() { // reload the passage function reload(root) { const elem = root.element; - elem.innerHTML = "" + elem.innerHTML = ""; rulesAssistantOptions(elem); } @@ -392,7 +392,7 @@ window.rulesAssistantOptions = (function() { try { const rule = JSON.parse(text); if (!rule.ID) rule.ID = generateNewID(); - V.defaultRules.push(rule) + V.defaultRules.push(rule); reload(this.root); } catch (e) { alert("Couldn't import that rule:\n" + e.message); @@ -441,7 +441,7 @@ window.rulesAssistantOptions = (function() { class RuleSelector extends List { constructor(root) { super("Current rule", V.defaultRules.map(i => [i.name, i])); - this.setValue(current_rule.name) + this.setValue(current_rule.name); this.onchange = function (rule) { V.currentRule = rule.ID; reload(root); @@ -468,7 +468,7 @@ window.rulesAssistantOptions = (function() { class ApplicationLog extends Element { render() { const elem = document.createElement("div"); - elem.innerHTML = V.slaves.map(slave => DefaultRules(slave)).join("") + elem.innerHTML = V.slaves.map(slave => DefaultRules(slave)).join(""); return elem; } } @@ -495,7 +495,7 @@ window.rulesAssistantOptions = (function() { element = document.getElementById("exportfield") || document.createElement("textarea"); element.id = "exportfield"; } - element.value = args.map(i => JSON.stringify(i, null, 2)).join("\n\n") + element.value = args.map(i => JSON.stringify(i, null, 2)).join("\n\n"); return element; } } @@ -535,7 +535,7 @@ window.rulesAssistantOptions = (function() { ["Belly Size", "belly"], ]; this.fnlist = new List("Activation function", items); - this.fnlist.setValue(current_rule.condition.function === "between" ? current_rule.condition.data.attribute : current_rule.condition.function) + this.fnlist.setValue(current_rule.condition.function === "between" ? current_rule.condition.data.attribute : current_rule.condition.function); this.fnlist.onchange = (value) => this.fnchanged(value); this.appendChild(this.fnlist); this.fneditor = null; @@ -610,7 +610,7 @@ window.rulesAssistantOptions = (function() { render(data) { const elem = document.createElement("textarea"); elem.innerHTML = data; - elem.onfocusout = () => current_rule.condition.data = elem.value + elem.onfocusout = () => current_rule.condition.data = elem.value; return elem; } } @@ -1554,8 +1554,8 @@ window.rulesAssistantOptions = (function() { } setValue(what) { - what = this.value2string(what.cum, what.milk) - super.setValue(what) + what = this.value2string(what.cum, what.milk); + super.setValue(what); } } @@ -2891,18 +2891,20 @@ window.rulesAssistantOptions = (function() { class AutomaticAssignmentList extends List { constructor() { const items = [ + ["No default setting", "no default setting"], ["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"], + ["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.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"]); @@ -2918,6 +2920,7 @@ window.rulesAssistantOptions = (function() { this.setValue(current_rule.set.setAssignment); this.onchange = (value) => current_rule.set.setAssignment = value; } + } return rulesAssistantOptions; })();