From 33422c7c037b64dc9795abc2a79646ba5c45602c Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Mon, 3 Aug 2020 23:04:35 -0400 Subject: [PATCH] tips --- src/pregmod/FCTV/FCTV.js | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/src/pregmod/FCTV/FCTV.js b/src/pregmod/FCTV/FCTV.js index 244fa09da19..5458cdfa247 100644 --- a/src/pregmod/FCTV/FCTV.js +++ b/src/pregmod/FCTV/FCTV.js @@ -187,7 +187,10 @@ globalThis.FctvDisplay = function({usedRemote = 0, seeAll = 0} = {}) { () => { V.FCTV.channel.selected = i; watch({usedRemote: 1, seeAll: seeAll}); - } + }, + [], + "", + `Current channel` ) ); buttons.push(span); @@ -250,9 +253,7 @@ globalThis.FctvDisplay = function({usedRemote = 0, seeAll = 0} = {}) { const channel = _.sample(channels); const x = showChannel(channel); if (x.canSelect === -1) { - const p = document.createElement("p"); - $(p).append(x.text); - frag.append(p); + App.UI.DOM.appendNewElement("p", frag, channelFailed(x.text)); } else { V.FCTV.channel.selected = channel; break; @@ -271,19 +272,21 @@ globalThis.FctvDisplay = function({usedRemote = 0, seeAll = 0} = {}) { function showChannel(i = 1, {usedRemote = 0, seeAll = 0} = {}) { let x = { canSelect: 1, - text: `A notification is shown: ` }; if (App.Data.FCTV.channels.hasOwnProperty(i)) { if (App.Data.FCTV.channels[i].hasOwnProperty("tags")) { x = checkTags(App.Data.FCTV.channels[i].tags); } if (App.Data.FCTV.channels[i].hasOwnProperty("disableSelection")) { - x.canSelect = -1; x.text += `<i>This channel appears at random times</i>`; + if (usedRemote !== 0) { + x.canSelect = -1; + } + x.text = `This channel appears at random times`; } } if (i === 11) { if (V.purchasedSagBGone && V.FCTV.channel[num(i, true)] > 2) { - x.canSelect = -1; x.text += `<i>Product purchase detected, skipping commercials.</i>`; + x.canSelect = -1; x.text = `Product purchase detected, skipping commercials`; } } @@ -375,39 +378,38 @@ globalThis.FctvDisplay = function({usedRemote = 0, seeAll = 0} = {}) { function checkTags(tags){ let x = { canSelect: 1, - text: `A notification is shown: ` }; for (const tag in tags) { if (tag) { switch (tag) { case "hyperPreg": if (!V.seeHyperPreg) { - x.canSelect = -1; x.text += `<i>Too much happiness detected, changing program.</i>`; + x.canSelect = -1; x.text = `Too much happiness detected`; } break; case "preg": if (!V.seePreg) { - x.canSelect = -1; x.text += `<i>Too much baking detected, changing program.</i>`; + x.canSelect = -1; x.text = `Too much baking detected`; } break; case "extreme": if (!V.seeExtreme) { - x.canSelect = -1; x.text += `<i>Too much hugging detected, changing program.</i>`; + x.canSelect = -1; x.text = `Too much hugging detected`; } break; case "dicks": if (!V.seeDicks && !V.makeDicks) { - x.canSelect = -1; x.text += `<i>Too many hot dogs detected, changing program.</i>`; + x.canSelect = -1; x.text = `Too many hot dogs detected`; } break; case "incest": if (!V.seeIncest && tag === "incest") { - x.canSelect = -1; x.text += `<i>Too much familiarity detected, changing program.</i>`; + x.canSelect = -1; x.text = `Too much familiarity detected`; } break; case "loli": if (V.minimumSlaveAge > 13 && tag === "loli") { - x.canSelect = -1; x.text += `<i>Actor not vintage enough, changing program.</i>`; + x.canSelect = -1; x.text = `Actor not vintage enough`; } break; default: @@ -417,4 +419,12 @@ globalThis.FctvDisplay = function({usedRemote = 0, seeAll = 0} = {}) { } return x; } + + function channelFailed(text) { + const frag = new DocumentFragment; + frag.append(`A notification is shown: `); + App.UI.DOM.appendNewElement("span", frag, text, "note"); + frag.append(`, changing program.`); + return frag; + } }; -- GitLab