Skip to content
Snippets Groups Projects
Commit 5d282585 authored by lowercasedonkey's avatar lowercasedonkey
Browse files

add prison support to marketcontrols

parent 4525ac43
No related branches found
No related tags found
No related merge requests found
App.UI.buyingFromMarketControls = function(slave, slaveCost) { App.UI.buyingFromMarketControls = function(slave, slaveCost, 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 = {};
if (sTitleSingular === "prisoner") {
title = {
decline: `Inspect a different prisoner`,
buyAndKeepShopping: `Buy ${him} and check out other other available ${sTitlePlural}`,
buyJustHer: `Enslave ${him}`,
buyHerAndFinish: `Enslave ${him} and finish your inspection`,
finish: `Finish your enslavement of prisoners`
};
} else {
title = {
decline: `Decline to purchase ${him} and check out another ${sTitleSingular}`,
buyAndKeepShopping: `Buy ${him} and check out other ${sTitlePlural} to order`,
buyJustHer: `Buy ${his} slave contract`,
buyHerAndFinish: `Buy ${him} and finish your order of slaves`,
finish: `Finish your order of slaves`
};
}
App.UI.DOM.appendNewElement( App.UI.DOM.appendNewElement(
"div", "div",
el, el,
App.UI.DOM.link( App.UI.DOM.link(
`Decline to purchase ${him} and check out another slave`, title.decline,
() => { () => {
V.slavesSeen += 1; V.slavesSeen += 1;
}, },
...@@ -18,7 +37,7 @@ App.UI.buyingFromMarketControls = function(slave, slaveCost) { ...@@ -18,7 +37,7 @@ App.UI.buyingFromMarketControls = function(slave, slaveCost) {
"div", "div",
el, el,
App.UI.DOM.link( App.UI.DOM.link(
`Buy ${him} and check out other slaves to order`, title.buyAndKeepShopping,
() => { () => {
cashX(forceNeg(slaveCost), "slaveTransfer", slave); cashX(forceNeg(slaveCost), "slaveTransfer", slave);
V.newSlaves.push(slave); V.newSlaves.push(slave);
...@@ -34,7 +53,7 @@ App.UI.buyingFromMarketControls = function(slave, slaveCost) { ...@@ -34,7 +53,7 @@ App.UI.buyingFromMarketControls = function(slave, slaveCost) {
"div", "div",
el, el,
App.UI.DOM.link( App.UI.DOM.link(
`Buy ${his} slave contract`, title.buyJustHer,
() => { () => {
cashX(forceNeg(slaveCost), "slaveTransfer", slave); cashX(forceNeg(slaveCost), "slaveTransfer", slave);
V.newSlaves.push(slave); V.newSlaves.push(slave);
...@@ -51,7 +70,7 @@ App.UI.buyingFromMarketControls = function(slave, slaveCost) { ...@@ -51,7 +70,7 @@ App.UI.buyingFromMarketControls = function(slave, slaveCost) {
"div", "div",
el, el,
App.UI.DOM.link( App.UI.DOM.link(
`Buy ${him} and finish your order of slaves`, title.buyHerAndFinish,
() => { () => {
cashX(forceNeg(slaveCost), "slaveTransfer", slave); cashX(forceNeg(slaveCost), "slaveTransfer", slave);
V.newSlaves.push(slave); V.newSlaves.push(slave);
...@@ -69,7 +88,7 @@ App.UI.buyingFromMarketControls = function(slave, slaveCost) { ...@@ -69,7 +88,7 @@ App.UI.buyingFromMarketControls = function(slave, slaveCost) {
"div", "div",
el, el,
App.UI.DOM.link( App.UI.DOM.link(
`Finish your order of slaves`, title.finish,
() => { }, () => { },
[], [],
"Bulk Slave Intro" "Bulk Slave Intro"
...@@ -108,7 +127,7 @@ App.UI.buyingFromSchoolControls = function(school, costMod = 1, sTitleSingular = ...@@ -108,7 +127,7 @@ App.UI.buyingFromSchoolControls = function(school, costMod = 1, sTitleSingular =
r.push(`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.`); r.push(`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.`);
} }
const {him, his} = getPronouns(slave); const { him, his } = getPronouns(slave);
App.UI.DOM.appendNewElement( App.UI.DOM.appendNewElement(
"div", "div",
el, el,
...@@ -186,7 +205,7 @@ App.UI.buyingFromSchoolControls = function(school, costMod = 1, sTitleSingular = ...@@ -186,7 +205,7 @@ App.UI.buyingFromSchoolControls = function(school, costMod = 1, sTitleSingular =
App.UI.DOM.appendNewElement( App.UI.DOM.appendNewElement(
"p", "p",
el, el,
App.Desc.longSlave(slave, {market: "generic"}) App.Desc.longSlave(slave, { market: "generic" })
); );
return el; return el;
......
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