diff --git a/js/003-data/slaveSorting.js b/js/003-data/slaveSorting.js new file mode 100644 index 0000000000000000000000000000000000000000..c1cf31c5f35b102689eb668bb3ff1b86a0e1b4ee --- /dev/null +++ b/js/003-data/slaveSorting.js @@ -0,0 +1,23 @@ +/** + * @type {Map<string, string>} + */ +App.Data.SlaveSorting = new Map([ + ["Devotion", "devotion"], + ["Trust", "trust"], + ["Name", "name"], + ["Assignment", "assignment"], + ["Date purchased", "seniority"], + ["Age", "actualAge"], + ["How old they look", "visualAge"], + ["Age of their body", "physicalAge"], + ["Weekly Income", "weeklyIncome"], + ["Beauty", "beauty"], + ["Health", "health"], + ["Weight", "height"], + ["Height", "weight"], + ["Muscles", "muscles"], + ["Intelligence", "intelligence"], + ["Sex Drive", "sexDrive"], + ["Pregnancy", "pregnancy"], + ["Prestige", "prestige"], +]); diff --git a/src/facilities/dairy/dairy.js b/src/facilities/dairy/dairy.js index ffbfa57328eec8116ef018b363a03784300573e1..879953478b237f08c0a8eb5281758d979d102cf1 100644 --- a/src/facilities/dairy/dairy.js +++ b/src/facilities/dairy/dairy.js @@ -15,6 +15,7 @@ App.Facilities.Dairy.dairy = class Dairy extends App.Facilities.Facility { V.dairyUpgradeMenials = 0; V.cumPipeline = 0; V.milkPipeline = 0; + V.dairyPiping = 0; App.Arcology.cellUpgrade(V.building, App.Arcology.Cell.Manufacturing, "Dairy", "Manufacturing"); }; diff --git a/src/gui/options/summaryOptions.js b/src/gui/options/summaryOptions.js index 93c442b422f37a905f77080969d407b68ffe3667..50816d19f7f15ee1795dfbf6574b4974ca583b82 100644 --- a/src/gui/options/summaryOptions.js +++ b/src/gui/options/summaryOptions.js @@ -24,16 +24,7 @@ App.UI.summaryOptions = function() { .addValueList([["Ascending", "ascending"], ["Descending", "descending"]]); options.addOption("Slaves are sorted by", "sortSlavesBy") - .addValueList([ - ["Devotion", "devotion"], - ["Name", "name"], - ["Date purchased", "seniority"], - ["Age", "actualAge"], - ["How old they look", "visualAge"], - ["Age of their body", "physicalAge"], - ["Assignment", "assignment"], - ["Weekly Income", "weeklyIncome"] - ]); + .addValueList(Array.from(App.Data.SlaveSorting.entries())); } el.append(options.render()); diff --git a/src/js/rulesAssistantOptions.js b/src/js/rulesAssistantOptions.js index f4721668f4c5568f521b97d367151bc681cf2faf..6ee116f948f9113cffdb91dd6f8c344894875cf5 100644 --- a/src/js/rulesAssistantOptions.js +++ b/src/js/rulesAssistantOptions.js @@ -2460,6 +2460,10 @@ App.RA.options = (function() { if (V.wcPiping === 1) { enemas.push(["urine"]); } + if (V.dairyPiping === 1 && V.arcologies[0].FSPastoralistLaw === 1) { + enemas.push([InflationLiquid.CUM]); + enemas.push([InflationLiquid.MILK]); + } super("Enemas", enemas); this.setValue(current_rule.set.inflationType); this.onchange = (value) => current_rule.set.inflationType = value; diff --git a/src/js/slaveListing.js b/src/js/slaveListing.js index 5991ecc6275b68da0252e89faf0404040f19094d..3641df7be435c31320c7c0de6b606accd224972d 100644 --- a/src/js/slaveListing.js +++ b/src/js/slaveListing.js @@ -495,15 +495,12 @@ App.UI.SlaveList.SlaveInteract.decoratedInteract = function(slave, decoratorFunc */ App.UI.SlaveList.sortingLinks = function(passage) { const div = document.createElement("div"); - const textify = string => capFirstChar(string.replace(/([A-Z])/g, " $1")); let span = App.UI.DOM.makeElement("span", "Sort by: "); - let order = ["devotion", "trust", "name", "assignment", "seniority", "actualAge", "visualAge", "physicalAge", - "weeklyIncome", "beauty", "health", "height", "weight", "muscles", "intelligence", "sexDrive", "pregnancy", "prestige"]; - const orderMap = order.map(so => { - return {key: so, name: capFirstChar(so)}; - }); - + const orderMap = Array.from(App.Data.SlaveSorting.entries()) + .map(([name, key]) => { + return {key: key, name: name}; + }); div.append( span, App.UI.DOM.makeSelect(orderMap, V.sortSlavesBy, val => { @@ -513,10 +510,10 @@ App.UI.SlaveList.sortingLinks = function(passage) { ); span = App.UI.DOM.makeElement("span", " Sort direction: "); - order = ["descending", "ascending"]; + const order = ["descending", "ascending"]; span.append(App.UI.DOM.generateLinksStrip(order.map(so => - V.sortSlavesOrder === so ? textify(so) - : App.UI.DOM.link(textify(so), () => { + V.sortSlavesOrder === so ? capFirstChar(so) + : App.UI.DOM.link(capFirstChar(so), () => { V.sortSlavesOrder = so; App.UI.reload(); })