From afb1302b75823d2bcc445dc0d36d37017115802f Mon Sep 17 00:00:00 2001 From: Svornost <11434-svornost@users.noreply.gitgud.io> Date: Fri, 9 Oct 2020 13:32:33 -0700 Subject: [PATCH] School sales apply only to first purchase --- src/markets/marketUI.js | 2 +- src/markets/theMarket/buySlaves.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/markets/marketUI.js b/src/markets/marketUI.js index 616a927c907..cd1f12d1634 100644 --- a/src/markets/marketUI.js +++ b/src/markets/marketUI.js @@ -141,7 +141,7 @@ App.Markets.purchaseFramework = function(slaveMarket, {sTitleSingular = "slave", return el; function student() { - if ([App.Data.misc.schools].includes(slaveMarket)) { + if (App.Data.misc.schools.includes(slaveMarket)) { V[slaveMarket].schoolSale = 0; V[slaveMarket].studentsBought += 1; } diff --git a/src/markets/theMarket/buySlaves.js b/src/markets/theMarket/buySlaves.js index 728d250f69a..4bc84e174e3 100644 --- a/src/markets/theMarket/buySlaves.js +++ b/src/markets/theMarket/buySlaves.js @@ -201,7 +201,7 @@ App.UI.buySlaves = function() { if (store.note) { App.UI.DOM.appendNewElement("span", el, ` ${store.note}`, "note"); } - if ([App.Data.misc.schools].includes(store.marketType)) { + if (App.Data.misc.schools.includes(store.marketType)) { if (V[store.marketType].schoolSale === 1) { App.UI.DOM.appendNewElement("span", el, `Offering your first purchase at half price this week. `, "yellow"); } -- GitLab