diff --git a/js/003-data/miscData.js b/js/003-data/miscData.js index 7a17f071a096725c51081b4ce3d8e397a79f3171..69f48673c3aa319d546089cc3c7e5a168da0a8b6 100644 --- a/js/003-data/miscData.js +++ b/js/003-data/miscData.js @@ -1951,16 +1951,56 @@ App.Data.misc = { secExCombatPrestige: ["$He is well known for being a great commander.", "$He is famous for being an incredible commander.", "$He is known as a legendary commander all over the world."], schools: new Map([ - ["GRI", {title:"Growth Research Institute", branchName:"subsidiary lab"}], - ["HA", {title:"The Hippolyta Academy", branchName:"branch campus"}], - ["NUL", {title:"Nueva Universidad de Libertad", branchName:"branch campus"}], - ["SCP", {title:"St. Claver Preparatory", branchName:"branch campus"}], - ["TCR", {title:"The Cattle Ranch", branchName:"local pasture"}], - ["TFS", {title:"The Futanari Sisters", branchName:"community"}], - ["TGA", {title:"The Gymnasium-Academy", branchName:"branch campus"}], - ["TSS", {title:"The Slavegirl School", branchName:"branch campus"}], - ["LDE", {title:"L'École des Enculées", branchName:"branch campus"}], - ["TUO", {title:"The Utopian Orphanage", branchName:"branch campus"}] + ["GRI", { + title:"Growth Research Institute", + branchName:"subsidiary lab", + get requirements() { return (V.seeDicks !== 100); } + }], + ["HA", { + title:"The Hippolyta Academy", + branchName:"branch campus", + get requirements() { return (V.seeDicks !== 100); } + }], + ["NUL", { + title:"Nueva Universidad de Libertad", + branchName:"branch campus", + requirements: true + }], + ["SCP", { + title:"St. Claver Preparatory", + branchName:"branch campus", + get requirements() { return (V.seeDicks !== 100); } + }], + ["TCR", { + title:"The Cattle Ranch", + branchName:"local pasture", + get requirements() { return (V.seeDicks !== 100); } + }], + ["TFS", { + title:"The Futanari Sisters", + branchName:"community", + get requirements() { return (V.seeDicks !== 0); } + }], + ["TGA", { + title:"The Gymnasium-Academy", + branchName:"branch campus", + get requirements() { return (V.seeDicks !== 0); } + }], + ["TSS", { + title:"The Slavegirl School", + branchName:"branch campus", + get requirements() { return (V.seeDicks !== 100); } + }], + ["LDE", { + title:"L'École des Enculées", + branchName:"branch campus", + get requirements() { return (V.seeDicks !== 0); } + }], + ["TUO", { + title:"The Utopian Orphanage", + branchName:"branch campus", + get requirements() { return (V.seeDicks !== 100); } + }] ]), bioreactorFluids: { diff --git a/src/interaction/main/mainLinks.js b/src/interaction/main/mainLinks.js index 5a501292ef8ad1a04a2a6b6fc162f54a7853e414..dfab76fb1dda51647360d6904af8d7f5e6465cea 100644 --- a/src/interaction/main/mainLinks.js +++ b/src/interaction/main/mainLinks.js @@ -245,18 +245,18 @@ App.UI.View.mainLinks = function() { fragment.append(div); - /** - * @param {string} school - */ - function schoolSale(school, abbreviation) { + for (const [SCH, schObj] of App.Data.misc.schools) { + if (!schObj.requirements || V[SCH].schoolSale === 0) { + continue; + } const div = document.createElement("div"); div.append(App.UI.DOM.makeElement("span", "For your first purchase, ", "yellow"), App.UI.DOM.passageLink( - school, + schObj.title, "Market", () => { V.market = new App.Markets.GlobalVariable(); - V.market.slaveMarket = abbreviation; + V.market.slaveMarket = SCH; V.market.newSlaves = []; V.market.numArcology = 1; V.nextButton = "Back to Main"; @@ -266,40 +266,5 @@ App.UI.View.mainLinks = function() { App.UI.DOM.makeElement("span", " will sell at half price this week.", "yellow")); fragment.append(div); } - - if (V.seeDicks !== 100) { - if (V.TSS.schoolSale !== 0) { - schoolSale("The Slavegirl School", "TSS"); - } - if (V.TUO.schoolSale !== 0) { - schoolSale("The Utopian Orphanage", "TUO"); - } - if (V.GRI.schoolSale !== 0) { - schoolSale("Growth Research Institute", "GRI"); - } - if (V.SCP.schoolSale !== 0) { - schoolSale("St. Claver Preparatory", "SCP"); - } - if (V.TCR.schoolSale !== 0) { - schoolSale("The Cattle Ranch", "TCR"); - } - if (V.HA.schoolSale !== 0) { - schoolSale("The Hippolyta Academy", "HA"); - } - } - if (V.seeDicks !== 0) { - if (V.LDE.schoolSale !== 0) { - schoolSale("L'École des Enculées", "LDE"); - } - if (V.TGA.schoolSale !== 0) { - schoolSale("The Gymnasium-Academy", "TGA"); - } - if (V.TFS.schoolSale !== 0) { - schoolSale("The Futanari Sisters", "TFS"); - } - } - if (V.NUL.schoolSale !== 0) { - schoolSale("Nueva Universidad de Libertad", "NUL"); - } return fragment; };