diff --git a/src/interaction/siPhysicalRegimen.js b/src/interaction/siPhysicalRegimen.js index 6e8a6e9665da2dfd269041f2923a040133961222..6c5a2e6974ceb0a076add5b763af2aa23b785c17 100644 --- a/src/interaction/siPhysicalRegimen.js +++ b/src/interaction/siPhysicalRegimen.js @@ -263,16 +263,16 @@ App.UI.SlaveInteract.physicalRegimen = function(slave) { title.appendChild(App.UI.SlaveInteract.generateRows(drugLevelOptions, slave, "", false, refresh)); el.append(title); - App.UI.SlaveInteract.appendLabeledChoiceRow(el, "Lips", lips, slave, refresh); - App.UI.SlaveInteract.appendLabeledChoiceRow(el, "Breasts", breasts, slave, refresh); - App.UI.SlaveInteract.appendLabeledChoiceRow(el, "Nipples", nipples, slave, refresh); - App.UI.SlaveInteract.appendLabeledChoiceRow(el, "Butt", butt, slave, refresh); - App.UI.SlaveInteract.appendLabeledChoiceRow(el, slave.dick > 0 ? "Dick" : "Clit", dick, slave, refresh); - App.UI.SlaveInteract.appendLabeledChoiceRow(el, "Balls", balls, slave, refresh); - App.UI.SlaveInteract.appendLabeledChoiceRow(el, "Fertility", fertility, slave, refresh); - App.UI.SlaveInteract.appendLabeledChoiceRow(el, "Hormones", hormones, slave, refresh); - App.UI.SlaveInteract.appendLabeledChoiceRow(el, "Psych", psych, slave, refresh); - App.UI.SlaveInteract.appendLabeledChoiceRow(el, "Misc", misc, slave, refresh); + appendLabeledChoiceRow("Lips", lips); + appendLabeledChoiceRow("Breasts", breasts); + appendLabeledChoiceRow("Nipples", nipples); + appendLabeledChoiceRow("Butt", butt); + appendLabeledChoiceRow(slave.dick > 0 ? "Dick" : "Clit", dick); + appendLabeledChoiceRow("Balls", balls); + appendLabeledChoiceRow("Fertility", fertility); + appendLabeledChoiceRow("Hormones", hormones); + appendLabeledChoiceRow("Psych", psych); + appendLabeledChoiceRow("Misc", misc); return el; } @@ -938,11 +938,11 @@ App.UI.SlaveInteract.physicalRegimen = function(slave) { } } - App.UI.SlaveInteract.appendLabeledChoiceRow(el, "Health", health, slave, refresh); - App.UI.SlaveInteract.appendLabeledChoiceRow(el, "Weight", weight, slave, refresh); - App.UI.SlaveInteract.appendLabeledChoiceRow(el, "Muscle", muscle, slave, refresh); - App.UI.SlaveInteract.appendLabeledChoiceRow(el, "Production", production, slave, refresh); - App.UI.SlaveInteract.appendLabeledChoiceRow(el, "Hormone", hormone, slave, refresh); + appendLabeledChoiceRow("Health", health); + appendLabeledChoiceRow("Weight", weight); + appendLabeledChoiceRow("Muscle", muscle); + appendLabeledChoiceRow("Production", production); + appendLabeledChoiceRow("Hormone", hormone); return el; } @@ -999,8 +999,8 @@ App.UI.SlaveInteract.physicalRegimen = function(slave) { title.append(choice); el.append(title); - App.UI.SlaveInteract.appendLabeledChoiceRow(el, "Milk", milk, slave, refresh); - App.UI.SlaveInteract.appendLabeledChoiceRow(el, "Cum", cum, slave, refresh); + appendLabeledChoiceRow("Milk", milk); + appendLabeledChoiceRow("Cum", cum); return el; } @@ -1037,4 +1037,18 @@ App.UI.SlaveInteract.physicalRegimen = function(slave) { function refresh() { jQuery("#si-physical-regimen").empty().append(physicalRegimenContent()); } + + /** Append a simple row of choices with a label to a container, if there are choices to be made. + * @param {string} label + * @param {RowItem[]} array + */ + function appendLabeledChoiceRow(label, array) { + if (array.length > 0) { + const links = document.createElement('div'); + links.append(`${label}: `); + links.appendChild(App.UI.SlaveInteract.generateRows(array, slave, "", false, refresh)); + links.className = "choices"; + return el.appendChild(links); + } + } }; diff --git a/src/interaction/siUtilities.js b/src/interaction/siUtilities.js index 017d7ff0e79708e6334bacca3782bc7913f240cd..3c959cb80778975d4a27a501b717d0e79a16ef31 100644 --- a/src/interaction/siUtilities.js +++ b/src/interaction/siUtilities.js @@ -34,23 +34,6 @@ App.UI.SlaveInteract.placeInLine = function(slave) { * @property {string} [note] */ -/** Append a simple row of choices with a label to a container, if there are choices to be made. - * @param {Node} parent - * @param {string} label - * @param {RowItem[]} array - * @param {App.Entity.SlaveState} slave - * @param {Function} refresh - */ -App.UI.SlaveInteract.appendLabeledChoiceRow = function(parent, label, array, slave, refresh) { - if (array.length > 0) { - let links = document.createElement('div'); - links.append(`${label}: `); - links.appendChild(App.UI.SlaveInteract.generateRows(array, slave, "", false, refresh)); - links.className = "choices"; - return parent.appendChild(links); - } -}; - /** Generate a row of choices * @param {RowItem[]} array * @param {App.Entity.SlaveState} slave