diff --git a/src/markets/marketUI.js b/src/markets/marketUI.js index cd1f12d163420ec598359add4b51781c0cecc332..c94b9c2803c888ed93001eb56d12ba5bc873220a 100644 --- a/src/markets/marketUI.js +++ b/src/markets/marketUI.js @@ -170,3 +170,60 @@ App.Markets.GlobalVariable = function() { this.numArcology = 0; return this; }; + +/** + * User facing names for the markets + * @param {*} market + * @param {*} arcIndex + */ +App.Markets.marketName = function(market = "kidnappers", arcIndex = 1) { + switch (market) { + case "corporate": + return `your corporation`; + case "neighbor": + return `${V.arcologies[arcIndex].name}`; + case "kidnappers": + return `the Kidnappers' Market`; + case "indentures": + return `the Indentures Market`; + case "hunters": + return `the Runaway Hunters' Market`; + case "raiders": + return `the Raiders' Market`; + case "underage raiders": + return `the Raiders' Black Market`; + case "heap": + return `the Flesh Heap as alive as when you purchased them.`; + case "wetware": + return `the Wetware CPU market`; + case "trainers": + return `the Trainers' Market`; + case "TSS": + return `The Slavegirl School`; + case "TUO": + return `The Utopian Orphanage`; + case "GRI": + return `Growth Research Institute`; + case "SCP": + return `St. Claver Preparatory`; + case "LDE": + return `L'école des Enculées`; + case "TGA": + return `The Gymnasium-Academy`; + case "TCR": + return `The Cattle Ranch`; + case "TFS": + return `The Futanari Sisters`; + case "HA": + return `The Hippolyta Academy`; + case "NUL": + return `Nueva Universidad de Libertad`; + case "low tier criminals": + case "gangs and smugglers": + case "white collar": + case "military prison": + return `the prisoner sale`; + default: + return `Someone messed up.${market} is not known.`; + } +}; diff --git a/src/uncategorized/bulkSlaveIntro.tw b/src/uncategorized/bulkSlaveIntro.tw index 75810af08ffe3f8d3474cfc4c62d6b4870565153..c2d0f5c8ae4db65f6c147f15061c1415e00e5eb5 100644 --- a/src/uncategorized/bulkSlaveIntro.tw +++ b/src/uncategorized/bulkSlaveIntro.tw @@ -12,13 +12,13 @@ /* No message to give */ <<case "multi">> <<if $market.newSlaves.length > 1>> - Your selection of $market.newSlaves.length slaves arrives from <<MarketNamePeriod $market.slaveMarket $market.numArcology>> + Your selection of $market.newSlaves.length slaves arrives from <<= App.Markets.marketName($market.slaveMarket, $market.numArcology)>>. <<else>> - Your new slave from <<MarketName $market.slaveMarket $market.numArcology>> has arrived. + Your new slave from <<= App.Markets.marketName($market.slaveMarket, $market.numArcology)>> has arrived. <</if>> <<case "bulk">> - Your delivery of $market.newSlaves.length slaves arrives from <<MarketNamePeriod $market.slaveMarket $market.numArcology>> + Your delivery of $market.newSlaves.length slaves arrives from <<= App.Markets.marketName($market.slaveMarket, $market.numArcology)>>. <<if $market.newSlaves.length != $market.numSlaves>> You were going to order $market.numSlaves, but $assistant.name lowered it on financial grounds. <</if>> @@ -38,7 +38,7 @@ You spent @@.yellowgreen;<<print cashFormat($spent)>>@@ on your new slaves.<br><br> <<case "inStock">> - You clear out <<MarketName $market.slaveMarket $market.numArcology>> of its stock of $market.newSlaves.length slaves. + You clear out <<= App.Markets.marketName($market.slaveMarket, $market.numArcology)>> of its stock of $market.newSlaves.length slaves. <<if $market.slaveMarket == "TFS">> /* Put line about The Futanari Sisters discount & pricing */ <<elseif $discount == 475>> diff --git a/src/utility/slaveCreationWidgets.tw b/src/utility/slaveCreationWidgets.tw deleted file mode 100644 index 4d43fe50b414c03d5f5ec138c93ef9a71d43fe7e..0000000000000000000000000000000000000000 --- a/src/utility/slaveCreationWidgets.tw +++ /dev/null @@ -1,130 +0,0 @@ - -/% - Call as <<MarketName 'market' ['arcology']>> - If $args[0] is undefined, will generate a kidnapper's market slave. - If $args[0] is "corporate" and $args[1] is undefined, will use neighboring arcology 1. -%/ -<<widget MarketName>> -<<if $args[0]>> - <<set _market = $args[0]>> -<<else>> - <<set _market = "kidnappers">> -<</if>> - -<<switch _market>> -<<case "corporate">> - your corporation -<<case "neighbor">> - <<if $args[1]>> - <<print $arcologies[$args[1]].name>> - <<else>> - <<print $arcologies[1].name>> - <</if>> -<<case "kidnappers">> - the Kidnappers' Market -<<case "indentures">> - the Indentures Market -<<case "hunters">> - the Runaway Hunters' Market -<<case "raiders">> - the Raiders' Market -<<case "underage raiders">> - the Raiders' Black Market -<<case "heap">> - the Flesh Heap as alive as when you purchased them. -<<case "wetware">> - the Wetware CPU market -<<case "trainers">> - the Trainers' Market -<<case "TSS">> - The Slavegirl School -<<case "TUO">> - The Utopian Orphanage -<<case "GRI">> - Growth Research Institute -<<case "SCP">> - St. Claver Preparatory -<<case "LDE">> - L'école des Enculées -<<case "TGA">> - The Gymnasium-Academy -<<case "TCR">> - The Cattle Ranch -<<case "TFS">> - The Futanari Sisters -<<case HA>> - The Hippolyta Academy -<<case NUL>> - Nueva Universidad de Libertad -<<case "low tier criminals" "gangs and smugglers" "white collar" "military prison">> - the prisoner sale -<<default>> - Someone messed up. _market is not known. - -<</switch>> -<</widget>> - -/% - Call as <<MarketNamePeriod 'market' ['arcology']>> - If $args[0] is undefined, will generate a kidnapper's market slave. - If $args[0] is "corporate" and $args[1] is undefined, will use neighboring arcology 1. -%/ -<<widget MarketNamePeriod>> -<<if $args[0]>> - <<set _market = $args[0]>> -<<else>> - <<set _market = "kidnappers">> -<</if>> - -<<switch _market>> -<<case "corporate">> - your corporation. -<<case "neighbor">> - <<if $args[1]>> - <<print $arcologies[$args[1]].name>>. - <<else>> - <<print $arcologies[1].name>>. - <</if>> -<<case "kidnappers">> - the Kidnappers' Market. -<<case "indentures">> - the Indentures Market. -<<case "hunters">> - the Runaway Hunters' Market. -<<case "raiders">> - the Raiders' Market. -<<case "underage raiders">> - the Raiders' Black Market. -<<case "heap">> - the Flesh Heap, alive and not dead. -<<case "wetware">> - the Wetware CPU market. -<<case "trainers">> - the Trainers' Market. -<<case "TSS">> - The Slavegirl School. -<<case "TUO">> - The Utopian Orphanage. -<<case "GRI">> - Growth Research Institute. -<<case "SCP">> - St. Claver Preparatory. -<<case "LDE">> - L'école des Enculées. -<<case "TGA">> - The Gymnasium-Academy. -<<case "TCR">> - The Cattle Ranch. -<<case "TFS">> - The Futanari Sisters. -<<case HA>> - The Hippolyta Academy. -<<case NUL>> - Nueva Universidad de Libertad. -<<case "low tier criminals" "gangs and smugglers" "white collar" "military prison">> - the prisoner sale. -<<default>> - Someone messed up. _market is not known. - -<</switch>> -<</widget>>