diff --git a/src/pregmod/FCTV/FCTV.js b/src/pregmod/FCTV/FCTV.js index 4cac2736db8a45f15af416e10e2b2c859679c0a4..4b1153c006fe4d5b047383991cfbb280ed1401b4 100644 --- a/src/pregmod/FCTV/FCTV.js +++ b/src/pregmod/FCTV/FCTV.js @@ -27,7 +27,7 @@ globalThis.FCTV = (function() { }; /** Produce an array of numbers representing all available channels in App.Data.FCTV.shows - * @returns {array} + * @returns {Array} */ function channels() { const array = []; @@ -149,9 +149,9 @@ globalThis.FCTV = (function() { } /** - * + * * @param {number} i channel - * @param {*} operation + * @param {*} operation * @returns {number} array place of episode to play */ function showRange(i, operation = 'rand') { @@ -161,7 +161,7 @@ globalThis.FCTV = (function() { App.Data.FCTV.shows[i].episode[episode].hasOwnProperty("tags") { } - if + if } */ const epLength = App.Data.FCTV.shows[i].episode.length; @@ -185,7 +185,6 @@ globalThis.FCTV = (function() { })(); globalThis.FCTVdisplay = function({ usedRemote = 0, seeAll = 0 } = {}) { - return watch({ usedRemote: usedRemote, seeAll: seeAll }); function watch({ usedRemote = 0, seeAll = 0 } = {}) { @@ -385,14 +384,27 @@ globalThis.FCTVdisplay = function({ usedRemote = 0, seeAll = 0 } = {}) { } FCTV.incrementChannel(sel); console.log(channel, epToShow); + let slave; if (channel.episode[epToShow].slaves) { - App.Events.drawEventArt(frag, channel.episode[epToShow].slaves); + slave = channel.episode[epToShow].slaves[0]; + App.Events.drawEventArt(frag, slave); } if (channel.intro) { $(frag).append(channel.intro); } if (channel.episode[epToShow].text) { - $(frag).append(channel.episode[epToShow].text); + if (typeof channel.episode[epToShow].text === 'function') { + $(frag).append(channel.episode[epToShow].text(slave)); + } else { + $(frag).append(channel.episode[epToShow].text); + } + } + if (channel.extro) { + if (typeof channel.extro === 'function') { + frag.append(channel.extro(slave, epToShow)); + } else { + frag.append(channel.extro); + } } return frag; } diff --git a/src/pregmod/FCTV/FCTVshows.js b/src/pregmod/FCTV/FCTVshows.js index ab9c07ddf7e2d21cc58cbc5e544d0ed062fd6e19..656a98c79b609a1ddbf3d1bc1f37579a820d6b6b 100644 --- a/src/pregmod/FCTV/FCTVshows.js +++ b/src/pregmod/FCTV/FCTVshows.js @@ -742,33 +742,35 @@ App.Data.FCTV.shows = { loop: true, intro: `which is currently streaming 'Home Slave Shopping'. It's a bit strange, shopping for slaves without inspecting them in person, but you have to admit it's kind of convenient. Plus, you might find something that'd be difficult to get in your own arcology's markets. You start watching at the end of one slave being displayed; the program goes into a lot of detail that isn't always available from shady salesmen at the market. Two hosts are displaying the merchandise and an older male reads details on each slave from a prompter, while a fit female works the slave for the camera to give viewers a good look at what they might purchase.`, extro: function(slave, show) { // TODO: test. - const r = []; - let slaveCost = slaveCost(slave); + const p = document.createElement("p"); + let cost = slaveCost(slave); if (show < 3 || show > 6) { - slaveCost *= 1.3; + cost *= 1.3; } else if (show === 4) { - slaveCost *= 2; + cost *= 2; } else if (show === 6) { - slaveCost *= 0.7; + cost *= 0.7; } - slaveCost = 500 * Math.trunc(slaveCost / 500); - r.push(`<p>The offered price is ${cashFormat(slaveCost)}.`); + cost = 500 * Math.trunc(cost / 500); + p.append(`The offered price is ${cashFormat(cost)}.`); - if (V.cash >= slaveCost) { - App.UI.passageLink( - "Buy this contract.", - "New Slave Intro", - () => { - cashX(forceNeg(slaveCost), "slaveTransfer", _slave); - V.nextLink = "Scheduled Event"; - V.returnTo = "Scheduled Event"; - } + if (V.cash >= cost) { + p.append( + App.UI.DOM.passageLink( + "Buy this contract.", + "New Slave Intro", + () => { + cashX(forceNeg(cost), "slaveTransfer", slave); + V.nextLink = "Scheduled Event"; + V.returnTo = "Scheduled Event"; + } + ) ); } else { - r.push(`<i><span class="red">You lack the necessary funds.</span></i>`); + App.UI.DOM.appendNewElement("span", p, `You lack the necessary funds.`, ["red", "note"]); } - r.push(App.Desc.longSlave(slave, {market: "generic"}).outerHTML); - return r.join(" "); + p.append(App.Desc.longSlave(slave, {market: "generic"})); + return p; }, episode: [ {// premium virgin @@ -827,7 +829,7 @@ App.Data.FCTV.shows = { const r = []; const {girl, his, he, him} = getPronouns(slave); r.push(`<p>Next up, we have a bargain discount offer on a young ${slave.race} ${girl}. Unlike our usual stock ${he}'s something of a <span class="red">disobedient</span> slave, but that means savings for you, and all the fun of breaking in a new slave. We have to admit that ${his} previous owner had a hard time training ${him}, but I'm sure you can tell that ${his} body has`); - if (_slave.clit > 4) { + if (slave.clit > 4) { r.push(`potential, just look at the <span class="pink">clit</span> on ${him}!"</p>`); } else { r.push(`potential!"</p>`); @@ -1993,11 +1995,10 @@ App.Data.FCTV.shows = { if (S.Concubine !== 0 && S.Concubine.vagina > 0 && canDoVaginal(S.Concubine)) { const {him} = getPronouns(S.Concubine); r.push(`grab ${S.Concubine.slaveName} and recreate the entire ending with ${him}.`); - let _fctvs = V.slaveIndices[S.Concubine.ID]; - V.slaves[_fctvs].counter.vaginal++; + S.Concubine.counter.vaginal++; V.vaginalTotal++; if (canImpreg(S.Concubine, V.PC)) { - r.push(knockMeUp(V.slaves[_fctvs], 10, 0, -1, 1)); + r.push(knockMeUp(S.Concubine, 10, 0, -1, 1)); } } else if (V.fuckSlaves > 0) { r.push(`grab the nearest slave watching with you, who is overjoyed to recreate the entire ending with you.`); @@ -2011,8 +2012,7 @@ App.Data.FCTV.shows = { const {him} = getPronouns(S.Concubine); r.push(`get ${S.Concubine.slaveName} nice and hard before recreating the entire ending with ${him}. You've never had a more hope-filled orgasm.`); r.push(knockMeUp(V.PC, 10, 0, S.Concubine.ID, 1)); - let _fctvs = V.slaveIndices[S.Concubine.ID]; - V.slaves[_fctvs].counter.penetrative++; + S.Concubine.counter.penetrative++; V.penetrativeTotal++; } else if (V.policies.sexualOpeness === 1) { r.push(`find your favorite cock to get a creampie from. You've never had a more lust-filled orgasm.`);