From d26dea7d61a450f94dafac4108a12a78fd734853 Mon Sep 17 00:00:00 2001 From: ezsh <ezsh.junk@gmail.com> Date: Fri, 1 Nov 2019 11:27:30 +0100 Subject: [PATCH] Copy weight targets from descriptions to RA widget Ensure the shortcut labels and their values in the RA weight widget correspond to the limits and descriptions in the regular descriptions. Fixes #1153. --- src/js/rulesAssistantOptions.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/js/rulesAssistantOptions.js b/src/js/rulesAssistantOptions.js index add70b98472..97617fa7a37 100644 --- a/src/js/rulesAssistantOptions.js +++ b/src/js/rulesAssistantOptions.js @@ -8,7 +8,7 @@ window.rulesAssistantOptions = (function() { "use strict"; const noDefaultSetting = {value: "!NDS!", text: "no default setting"}; - + /** @type {App.RA.Rule} */ let current_rule; @@ -1548,7 +1548,6 @@ window.rulesAssistantOptions = (function() { this.appendChild(new ClearLabelSwitch()); this.appendChild(new LabelList()); this.appendChild(new LabelRemoveList()); - } } @@ -2504,16 +2503,19 @@ window.rulesAssistantOptions = (function() { class WeightEditor extends NumericRangeEditor { constructor() { + const hdp = V.arcologies[0].FSHedonisticDecadence !== "unset"; const pairs = [ - ["rail thin", App.RA.makeRange(-100, -96)], - ["thin", App.RA.makeRange(-95, -31)], + ["emaciated", App.RA.makeRange(-100, -96)], + ["very thin", App.RA.makeRange(-95, -31)], ["pleasingly thin", App.RA.makeRange(-30, -11)], ["healthy", App.RA.makeRange(-10, 10)], - ["curvy", App.RA.makeRange(10, 30)], - ["quite curvy", App.RA.makeRange(10, 30)], - ["extremely curvy", App.RA.makeRange(31, 95)] + ["nicely plush", App.RA.makeRange(11, 30)], + [hdp ? "quite curvy" : "chubby", App.RA.makeRange(31, 95)], + [hdp ? "extremely curvy": "overweight", App.RA.makeRange(96, 130)], + [hdp ? "amazingly curvy": "very overweight", App.RA.makeRange(131, 160)], + [hdp ? "spectacularly curvy": "extremely overweight", App.RA.makeRange(161, 190)], + [hdp ? "perfectly curvy" : "dangerously overweight", App.RA.makeRange(191, 200)] ]; - super("Weight", pairs, true, -100, 200); this.setValue(current_rule.set.weight); this.onchange = (value) => current_rule.set.weight = value; -- GitLab