diff --git a/src/004-base/arcologyBuilding.js b/src/004-base/arcologyBuilding.js index 1d399872ecd6458c15d3498fe256564107261df7..70ea4fb08bbcc9e8473a3e14d485b65832f10548 100644 --- a/src/004-base/arcologyBuilding.js +++ b/src/004-base/arcologyBuilding.js @@ -91,29 +91,28 @@ App.Arcology.Cell.BaseCell = class extends App.Entity.Serializable { upgrades.append(this._body()); fragment.append(upgrades); - } - if (this.allowedConversions.length > 0 && this.isBaseType()) { - const p = document.createElement("p"); - if (V.rep < 5000) { - fragment.append(App.UI.DOM.makeElement("p", "You don't have the reputation required to convert the sector base type.")); - } else { - for (const ac of this.allowedConversions) { - const cellClass = eval(`App.Arcology.Cell.${ac}`); - if (!(this instanceof cellClass)) { - p.append(this._makeUpgrade(`Convert sector to ${cellClass.cellName}.`, () => { - const newCell = new cellClass(1); - newCell.allowedConversions = this.allowedConversions; - containingBuilding.replaceCell(this, newCell); - repX(-5000, "capEx"); - }, 50000, "and 5000 reputation as many citizens will lose most of what they own.")); + if (this.allowedConversions.length > 0 && this.isBaseType()) { + const p = document.createElement("p"); + if (V.rep < 5000) { + fragment.append(App.UI.DOM.makeElement("p", "You don't have the reputation required to convert the sector base type.")); + } else { + for (const ac of this.allowedConversions) { + const cellClass = App.Arcology.Cell[ac]; + if (!(this instanceof cellClass)) { + p.append(this._makeUpgrade(`Convert sector to ${cellClass.cellName}.`, () => { + const newCell = new cellClass(1); + newCell.allowedConversions = this.allowedConversions; + containingBuilding.replaceCell(this, newCell); + repX(-5000, "capEx"); + }, 50000, "and 5000 reputation as many citizens will lose most of what they own.")); + } } } + fragment.append(p); } - fragment.append(p); } - return fragment; /** diff --git a/src/arcologyBuilding/presets.js b/src/arcologyBuilding/presets.js index 9e5524ff4c0d47ba5b00a89b03bd4a778fabbf01..aa49ae62eb6a23fc936b7c1b278f1a8e11e44006 100644 --- a/src/arcologyBuilding/presets.js +++ b/src/arcologyBuilding/presets.js @@ -99,7 +99,7 @@ App.Arcology.presets = (function() { /** * @param {string} rowTemplate - * @returns {[App.Arcology.Cell.BaseCell]} + * @returns {App.Arcology.Cell.BaseCell[]} */ function getRow(rowTemplate) { const cells = []; @@ -108,12 +108,12 @@ App.Arcology.presets = (function() { let next = iter.next(); while (!next.done) { if (next.value === "(") { - const cell = charToCell(iter.next().value).cell; next = iter.next(); - while (next.value !== ")") { + const cell = charToCell(next.value).cell; + do { cell.allowedConversions.push(charToCell(next.value).code); next = iter.next(); - } + } while (next.value !== ")"); cells.push(cell); } else if (next.value === "[") { let number = ""; @@ -252,8 +252,8 @@ App.Arcology.presets = (function() { randomShop().type = "Eugenics"; return () => { V.FSPromenade.Eugenics = 1; }; case "HedonisticDecadence": - randomShop().type = "Hedonistic Decadence"; - return () => { V.FSPromenade.HedonisticDecadence = 1; }; + randomShop().type = "Hedonism"; + return () => { V.FSPromenade.Hedonism = 1; }; case "IntellectualDependency": randomShop().type = "Intellectual Dependency"; return () => { V.FSPromenade.IntellectualDependency = 1; }; diff --git a/src/data/backwardsCompatibility/backwardsCompatibility.js b/src/data/backwardsCompatibility/backwardsCompatibility.js index 4a2b6f872cdbf8ed90efd5492a4c8c1d2129cfd2..8474514128b86bfcdb02d105bc07051ac4422d39 100644 --- a/src/data/backwardsCompatibility/backwardsCompatibility.js +++ b/src/data/backwardsCompatibility/backwardsCompatibility.js @@ -1253,7 +1253,10 @@ App.Update.globalVariables = function(node) { V.boughtItem.toys.buckets = V.boughtItem.toys.buckets || V.buckets || 0; V.boughtItem.toys.enema = V.boughtItem.toys.enema || V.enema || 0; - V.boughtItem.toys.medicalEnema = V.boughtItem.toys.medicalEnema || V.medicalEnema || 0; + V.boughtItem.toys.medicalEnema = V.boughtItem.toys.medicalEnema || V.medicalEnema || 0; + + V.FSPromenade.Hedonism = V.FSPromenade.Hedonism || V.FSPromenade.HedonisticDecadence || 0; + V.building.findCells(cell => cell instanceof App.Arcology.Cell.Shop && cell.type === "Hedonistic Decadence").forEach(cell => cell.type = "Hedonism"); node.append(`Done!`); }; diff --git a/src/gui/tooltips.js b/src/gui/tooltips.js index b821534873d7be11baabcc19c973a73f3067f71d..b3856abfd80ece48bb3af64d7d3712209eda1203 100644 --- a/src/gui/tooltips.js +++ b/src/gui/tooltips.js @@ -32,7 +32,7 @@ }; /** - * @param {HTMLElement} container + * @param {Document|HTMLElement} container */ function addTooltips(container) { if (V.tooltipsEnabled === 0) { diff --git a/src/js/salon.js b/src/js/salon.js index 05ceb4323926af5e0dee05925c6ff9efa6d0b662..5d01883a4e758db166979acace82af6748fd0744 100644 --- a/src/js/salon.js +++ b/src/js/salon.js @@ -336,7 +336,7 @@ App.Medicine.Salon.hair = function(slave, {primaryHairColor = 0, secondaryHairCo } else { // Bald if (slave.hStyle === "bald") { - frag.append(`${He} is completely bald.`); + frag.append(`${He} is completely bald. `); } else { frag.append(wigDye()); } diff --git a/src/uncategorized/personalAttentionSelect.tw b/src/uncategorized/personalAttentionSelect.tw index 1f52bae005cb55866918141e98b2ce52e542ad4d..b8479a7f72506b8fbe657b81904bf6047665e7e4 100644 --- a/src/uncategorized/personalAttentionSelect.tw +++ b/src/uncategorized/personalAttentionSelect.tw @@ -17,7 +17,7 @@ <<if ($arcologies[0].prosperity + 1 * (1 + Math.ceil($PC.skill.engineering/100))) < $AProsperityCap>> [[Contribute to a local development project|Main][$personalAttention = "development project"]] <<else>> - contributing to a local development project @@.yellow;would be futile.@@ + Contributing to a local development project @@.yellow;would be futile.@@ <</if>> <</if>> <<if $PC.skill.hacking > 25>>