Skip to content
Snippets Groups Projects
Commit 18add658 authored by lowercasedonkey's avatar lowercasedonkey
Browse files

fixes

parent 944ef3b0
No related branches found
No related tags found
1 merge request!7611Markets to JS
App.UI.buyingFromMarketControls = function(slave, slaveCost, sTitleSingular = "slave", sTitlePlural = "slaves") { App.UI.buyingFromMarketControls = function(slave, slaveCost, market, sTitleSingular = "slave", sTitlePlural = "slaves") {
const {him, his} = getPronouns(slave); const {him, his} = getPronouns(slave);
const el = document.createElement("p"); const el = document.createElement("p");
let title = {}; let title = {};
...@@ -27,9 +27,8 @@ App.UI.buyingFromMarketControls = function(slave, slaveCost, sTitleSingular = "s ...@@ -27,9 +27,8 @@ App.UI.buyingFromMarketControls = function(slave, slaveCost, sTitleSingular = "s
title.decline, title.decline,
() => { () => {
V.slavesSeen += 1; V.slavesSeen += 1;
jQuery("#slave-markets").empty().append(App.Markets[market]);
}, },
[],
passage()
) )
); );
if (V.cash >= slaveCost) { if (V.cash >= slaveCost) {
...@@ -43,9 +42,8 @@ App.UI.buyingFromMarketControls = function(slave, slaveCost, sTitleSingular = "s ...@@ -43,9 +42,8 @@ App.UI.buyingFromMarketControls = function(slave, slaveCost, sTitleSingular = "s
V.newSlaves.push(slave); V.newSlaves.push(slave);
V.introType = "multi"; V.introType = "multi";
V.slavesSeen += 1; V.slavesSeen += 1;
jQuery("#slave-markets").empty().append(App.Markets[market]);
}, },
[],
passage()
) )
); );
if (V.newSlaves.length === 0) { if (V.newSlaves.length === 0) {
...@@ -60,9 +58,9 @@ App.UI.buyingFromMarketControls = function(slave, slaveCost, sTitleSingular = "s ...@@ -60,9 +58,9 @@ App.UI.buyingFromMarketControls = function(slave, slaveCost, sTitleSingular = "s
V.nextButton = "Continue"; V.nextButton = "Continue";
V.nextLink = "AS Dump"; V.nextLink = "AS Dump";
V.returnTo = "Main"; V.returnTo = "Main";
newSlave(slave);
jQuery("#slave-markets").empty().append(App.UI.newSlaveIntro(slave));
}, },
[],
passage()
) )
); );
} else { } else {
......
...@@ -106,7 +106,7 @@ while you browse. ...@@ -106,7 +106,7 @@ while you browse.
<<set _slaveCost = 500*Math.trunc(_slaveCost/500)>> <<set _slaveCost = 500*Math.trunc(_slaveCost/500)>>
The offered price is <<print cashFormat(_slaveCost)>>.<<if $slavesSeen > $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.<</if>> The offered price is <<print cashFormat(_slaveCost)>>.<<if $slavesSeen > $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.<</if>>
<br> <br>
<<includeDOM App.UI.buyingFromMarketControls($activeSlave, _slaveCost)>> <<includeDOM App.UI.buyingFromMarketControls($activeSlave, _slaveCost, "Corporate Market")>>
<<link "End corporate slave sales here and return this sector to standard markets">> <<link "End corporate slave sales here and return this sector to standard markets">>
<<set $corp.Market = 0>> <<set $corp.Market = 0>>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment