diff --git a/src/interaction/siRules.js b/src/interaction/siRules.js index 1a116b7f1aaa2570c12db533a215b18ade78b927..7a7a5b772105dfd92ecd99abbcd50695ec65c2d8 100644 --- a/src/interaction/siRules.js +++ b/src/interaction/siRules.js @@ -139,7 +139,6 @@ App.UI.SlaveInteract.rules = function(slave) { if (["be a servant", "be a subordinate slave", "get milked", "please you", "serve in the club", "serve the public", "whore", "work as a farmhand", "work in the brothel", "work a glory hole"].includes(slave.assignment) || (V.dairyRestraintsSetting < 2 && slave.assignment === "work in the dairy")) { div = document.createElement("div"); div.append("Sleep rules: "); - App.UI.DOM.appendNewElement("span", div, slave.rules.rest, "bold"); choices = [ {value: "none"}, {value: "cruel"}, @@ -157,7 +156,6 @@ App.UI.SlaveInteract.rules = function(slave) { } else if (!canWalk(slave) && canMove(slave)) { div = document.createElement("div"); div.append("Use of mobility aids: "); - App.UI.DOM.appendNewElement("span", div, slave.rules.mobility, "bold"); choices = [ {value: "restrictive"}, {value: "permissive"}, @@ -169,7 +167,6 @@ App.UI.SlaveInteract.rules = function(slave) { // Punishment div = document.createElement("div"); div.append("Typical punishment: "); - App.UI.DOM.appendNewElement("span", div, `${slave.rules.punishment}. `, "bold"); choices = [ {value: "confinement"}, {value: "whipping"}, @@ -182,7 +179,6 @@ App.UI.SlaveInteract.rules = function(slave) { // Reward div = document.createElement("div"); div.append("Typical reward: "); - App.UI.DOM.appendNewElement("span", div, `${slave.rules.reward}. `, "bold"); choices = [ {value: "relaxation"}, {value: "drugs"}, @@ -196,7 +192,6 @@ App.UI.SlaveInteract.rules = function(slave) { if (slave.lactation !== 2) { div = document.createElement("div"); div.append("Lactation maintenance: "); - App.UI.DOM.appendNewElement("span", div, slave.rules.lactation, "bold"); choices = [ { title: "Left alone", @@ -228,7 +223,6 @@ App.UI.SlaveInteract.rules = function(slave) { if (slave.voice !== 0) { div = document.createElement("div"); div.append("Speech rules: "); - App.UI.DOM.appendNewElement("span", div, `${slave.rules.speech}. `, "bold"); choices = [ {value: "restrictive"}, {value: "permissive"}, @@ -248,7 +242,6 @@ App.UI.SlaveInteract.rules = function(slave) { div = document.createElement("div"); div.append("Relationship rules: "); - App.UI.DOM.appendNewElement("span", div, `${slave.rules.relationship} .`, "bold"); choices = [ {value: "restrictive"}, {value: "just friends"}, @@ -271,6 +264,13 @@ App.UI.SlaveInteract.rules = function(slave) { title, c.disabled ) ); + } else if (slave.rules[property] === c.value) { + links.push( + App.UI.DOM.disabledLink( + title, + ["Current Setting"] + ) + ); } else { links.push( App.UI.DOM.link( diff --git a/src/interaction/siUtilities.js b/src/interaction/siUtilities.js index 017d7ff0e79708e6334bacca3782bc7913f240cd..ef2ea4748f619afe882ed58f1e5110caf6aaf1d7 100644 --- a/src/interaction/siUtilities.js +++ b/src/interaction/siUtilities.js @@ -75,7 +75,16 @@ App.UI.SlaveInteract.generateRows = function(array, slave, category, accessCheck } if (accessCheck === false || unlocked) { // is it just text? - if (array[i].disabled) { + let updateKeys; + let value; + if (!jQuery.isEmptyObject(array[i].updateSlave)) { + updateKeys = Object.keys(array[i].updateSlave); // ["clitsettings", ...] + value = array[i].updateSlave[updateKeys[0]]; + } + + if (updateKeys && slave[updateKeys[0]] === value) { + link = App.UI.DOM.disabledLink(array[i].text, ["Currently selected"]); + } else if (array[i].disabled) { link = App.UI.DOM.disabledLink(array[i].text, [array[i].disabled]); } else if (typeof unlocked === 'string') { link = App.UI.DOM.disabledLink(array[i].text, [unlocked]);