diff --git a/src/markets/theMarket/buySlaves.js b/src/markets/theMarket/buySlaves.js index 789586dc972e38d681be381e1bb5e8e171924bec..ee31f8031688e3c445fe9c3c41a50c5b739fcfbb 100644 --- a/src/markets/theMarket/buySlaves.js +++ b/src/markets/theMarket/buySlaves.js @@ -131,26 +131,38 @@ App.UI.buySlaves = function() { el.append(requirements); return el; } - if (!App.Markets[store.marketType]) { + if (!App.Markets[store.marketType] && V.debugMode) { App.UI.DOM.appendNewElement("span", el, "marketType not set up", "red"); } const linkArray = []; - - linkArray.push( - App.UI.DOM.link( - store.title, - () => { - V.slavesSeen += 1; - App.UI.specificMarket({ - market: store.marketType, - slaveMarket: 0, - newSlaves: [], - numArcology: 1 - }); - }, - ) - ); + if (store.marketType === "Custom Slave") { // hardcoding this exception because converting this is going to be a bitch. + linkArray.push( + App.UI.DOM.link( + store.title, + () => { + V.slavesSeen += 1; + }, + [], + store.marketType + ) + ); + } else { + linkArray.push( + App.UI.DOM.link( + store.title, + () => { + V.slavesSeen += 1; + App.UI.specificMarket({ + market: store.marketType, + slaveMarket: 0, + newSlaves: [], + numArcology: 1 + }); + }, + ) + ); + } if (store.bulkAvailable !== false) { if (V.cash > (minCost * 5)) { linkArray.push( @@ -181,6 +193,7 @@ App.UI.buySlaves = function() { ); } } + el.append(App.UI.DOM.generateLinksStrip(linkArray)); if (store.sale) {