diff --git a/src/facilities/fsPassage.js b/src/facilities/fsPassage.js index 8367c6a268b1779687d309ab1a548d221c0748b4..429fffd808c1130f10d4f60946c642ee8bb45abf 100644 --- a/src/facilities/fsPassage.js +++ b/src/facilities/fsPassage.js @@ -346,50 +346,6 @@ App.UI.FSPassage = function() { let r; let p; - // TODO: move to wider scope and use in fsDevelopments - function pursuit() { - return App.UI.DOM.makeElement("span", "You are pursuing", "bold"); - } - - /** - * - * @param {FC.FutureSociety} FS - * @param {Array} [itemArray] - */ - function FSIsChosen(FS, itemArray) { - const el = new DocumentFragment(); - const r = []; - - // Abandon - if (FS === "FSRestart" && V.eugenicsFullControl !== 1) { - r.push(`The Societal Elite will not permit you to abandon Eugenics.`); - } else { - r.push( - App.UI.DOM.link( - "Abandon", - () => { - FutureSocieties.remove(FS); - App.UI.reload(); - } - ) - ); - } - - // Decoration - r.push(App.UI.FSChangeDecoration(FS, itemArray)); - - // Assistant - if (V.policies.publicPA === 1) { - if (App.Data.Assistant.appearanceForFS.get(FS).includes(V.assistant.appearance)) { - const {hisA} = getPronouns(assistant.pronouns().main).appendSuffix('A'); - r.push(App.UI.DOM.makeElement("div", `With ${hisA} ${V.assistant.appearance} appearance, ${V.assistant.name} is a good public mascot for this goal.`, "note")); - } - } - - App.Events.addNode(el, r); - return el; - } - /* Race */ p = document.createElement("p"); r = []; @@ -1339,5 +1295,48 @@ App.UI.FSPassage = function() { el.append(p); return el; + + function pursuit() { + return App.UI.DOM.makeElement("span", "You are pursuing", "bold"); + } + + /** + * + * @param {FC.FutureSociety} FS + * @param {Array} [itemArray] + */ + function FSIsChosen(FS, itemArray) { + const el = new DocumentFragment(); + const r = []; + + // Abandon + if (FS === "FSRestart" && V.eugenicsFullControl !== 1) { + r.push(`The Societal Elite will not permit you to abandon Eugenics.`); + } else { + r.push( + App.UI.DOM.link( + "Abandon", + () => { + FutureSocieties.remove(FS); + App.UI.reload(); + } + ) + ); + } + + // Decoration + r.push(App.UI.FSChangeDecoration(FS, itemArray)); + + // Assistant + if (V.policies.publicPA === 1) { + if (App.Data.Assistant.appearanceForFS.get(FS).includes(V.assistant.appearance)) { + const {hisA} = getPronouns(assistant.pronouns().main).appendSuffix('A'); + r.push(App.UI.DOM.makeElement("div", `With ${hisA} ${V.assistant.appearance} appearance, ${V.assistant.name} is a good public mascot for this goal.`, "note")); + } + } + + App.Events.addNode(el, r); + return el; + } } };