diff --git a/src/markets/marketUI.js b/src/markets/marketUI.js index 62a8a55c97112dfde15aa925e6f3256337e37522..981baec4b2e0a85ca42e932cb084708eb4eff5ad 100644 --- a/src/markets/marketUI.js +++ b/src/markets/marketUI.js @@ -9,7 +9,8 @@ App.Markets.purchaseFramework = function(slaveMarket, {sTitleSingular = "slave", sTitlePlural = "slaves", costMod = 1} = {}) { const el = new DocumentFragment(); const {slave, text} = generateMarketSlave(slaveMarket, (V.market.numArcology || 1)); - const cost = getCost(); + const costObj = getCost(); + const cost = costObj.cost; let prisonCrime = ""; if (slaveMarket === V.prisonCircuit[V.prisonCircuitIndex]) { prisonCrime = pronounsForSlaveProp(slave, text); @@ -17,16 +18,18 @@ App.Markets.purchaseFramework = function(slaveMarket, {sTitleSingular = "slave", $(el).append(` ${text}`); } - App.UI.DOM.appendNewElement("p", - el, - `The offered price is ${cashFormat(cost)}. ${(V.slavesSeen > V.slaveMarketLimit) ? `You have cast such a wide net for slaves this week that it is becoming more expensive to find more for sale. Your reputation helps determine your reach within the slave market.` : ``}` - ); + App.Events.addParagraph(el, [ + `The offered price is`, + App.UI.DOM.combineNodes(costObj.report, "."), + V.slavesSeen > V.slaveMarketLimit ? `You have cast such a wide net for slaves this week that it is becoming more expensive to find more for sale. Your reputation helps determine your reach within the slave market.` : `` + ]); el.append(choices()); return el; function getCost() { - let cost = slaveCost(slave, false, !App.Data.misc.lawlessMarkets.includes(slaveMarket)); + const costObj = slaveCost(slave, false, !App.Data.misc.lawlessMarkets.includes(slaveMarket), false, true); + let cost = costObj.cost; if (V.slavesSeen > V.slaveMarketLimit) { cost += cost * ((V.slavesSeen - V.slaveMarketLimit) * 0.1); } @@ -37,7 +40,7 @@ App.Markets.purchaseFramework = function(slaveMarket, {sTitleSingular = "slave", } console.log("CostMod: ", costMod); cost = 500 * Math.trunc(cost / 500); - return cost; + return {cost, report: costObj.report}; } function choices() {