Skip to content
Snippets Groups Projects
Commit 02e8f1ba authored by vas's avatar vas
Browse files

fix bugs

parent 8538c984
No related branches found
No related tags found
No related merge requests found
......@@ -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;
})();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment