diff --git a/src/facilities/ads.js b/src/facilities/ads.js index ef7f9ab9439348afb28539edde02a9cdb15a1d0b..8e069d49c165168b61008539f78d1a4d1bc91afa 100644 --- a/src/facilities/ads.js +++ b/src/facilities/ads.js @@ -248,11 +248,9 @@ App.Ads.AdManager = class { * * @param {string} building * @param {boolean} [preview] - * @returns {string} + * @returns {DocumentFragment} */ App.Ads.report = function(building, preview = false) { - let r = ``; - /** @type {App.Entity.Facilities.Facility} */ const facility = App.Entity.facilities[building]; const DL = facility.employeesIDs().size; @@ -275,85 +273,64 @@ App.Ads.report = function(building, preview = false) { spending: V[building + "AdsSpending"] }; - return report(building, preview); + return report(); - function report(building, preview) { + function report() { + const frag = new DocumentFragment(); if (preview) { - r += `<p><h3>Asset size</h3>`; - r += stacked(building, preview); - r += links(building, "stacked"); - r += `</p>`; + App.UI.DOM.appendNewElement("h3", frag, "Asset size"); + frag.append(stacked()); + frag.append(links("stacked")); - r += `<p><h3>Asset origin</h3>`; - r += implanted(building, preview); - r += links(building, "implanted"); - r += `</p>`; + App.UI.DOM.appendNewElement("h3", frag, "Asset origin"); + frag.append(implanted()); + frag.append(links("implanted")); - r += `<p><h3>Body mods</h3>`; - r += modded(building, preview); - r += links(building, "modded"); - r += `</p>`; + App.UI.DOM.appendNewElement("h3", frag, "Body mods"); + frag.append(modded()); + frag.append(links("modded")); if (V.seePreg !== 0) { - r += `<p><h3>Pregnancy</h3>`; - r += preg(building, preview); - r += links(building, "preg"); - r += `</p>`; + App.UI.DOM.appendNewElement("h3", frag, "Pregnancy"); + frag.append(preg()); + frag.append(links("preg")); } - r += `<p><h3>Age</h3>`; - r += age(building, preview); - r += links(building, "age"); - r += `</p>`; + App.UI.DOM.appendNewElement("h3", frag, "Age"); + frag.append(age()); + frag.append(links("age")); if (V.seeDicks !== 0) { - r += `<p><h3>Genitalia</h3>`; - r += XX(building, preview); - r += links(building, "XX"); - r += `</p>`; + App.UI.DOM.appendNewElement("h3", frag, "Genitalia"); + frag.append(XX()); + frag.append(links("age")); } - - r += `<p>`; - r += final(building, preview); - r += `</p>`; + App.UI.DOM.appendNewElement("p", frag, final()); } else { - r += `<p>`; - r += intro(building, preview); - r += `</p><p>`; - r += stacked(building, preview); - r += `</p><p>`; - r += preg(building, preview); - r += `</p><p>`; - r += modded(building, preview); - r += `</p><p>`; - r += implanted(building, preview); - r += `</p><p>`; - r += XX(building, preview); - r += `</p><p>`; - r += age(building, preview); - r += `</p><p>`; - r += final(building, preview); - r += `</p>`; + App.UI.DOM.appendNewElement("p", frag, intro()); + App.UI.DOM.appendNewElement("p", frag, stacked()); + App.UI.DOM.appendNewElement("p", frag, preg()); + App.UI.DOM.appendNewElement("p", frag, modded()); + App.UI.DOM.appendNewElement("p", frag, implanted()); + App.UI.DOM.appendNewElement("p", frag, XX()); + App.UI.DOM.appendNewElement("p", frag, age()); + App.UI.DOM.appendNewElement("p", frag, final()); } - return r; + return frag; } - function intro(building, preview) { - let t = ``; + function intro() { + const frag = new DocumentFragment(); + let t = []; if (adCampaign.spending !== 0) { if (building === "brothel") { - t += `<div>An ad campaign is supporting business there, and `; - if (building === "brothel") { - t += `whores `; - } else { - t += `sluts `; - } - t += `that match it make more ¤.</div>`; + t.push(App.UI.DOM.makeElement("div", `An ad campaign is supporting business there, and whores that match it make more ¤.`)); } else if (building === "club") { - t += `<div>An ad campaign is getting citizens into the ${building} every night, and sluts that match it gratify patrons.</div>`; + t.push(App.UI.DOM.makeElement("div", `An ad campaign is getting citizens into the ${building} every night, and sluts that match it gratify patrons.`)); } } - return t; + App.Events.addNode(frag, t, "div"); + return frag; } function payBonus() { @@ -368,52 +345,51 @@ App.Ads.report = function(building, preview = false) { } } - function stacked(building, preview) { - let t = ``; + function stacked() { + const frag = new DocumentFragment(); + let t = []; const pref = App.Ads.Categories.assetSize.classifyLocalPreference(); let girls = adMgr.slavesMajority(App.Ads.Categories.assetSize); - if (V.debugMode === 1) { t += `Girls: ${girls}, Pref: ${pref}, Ads: ${adCampaign.stacked}`; } + if (V.debugMode === 1) { + t.push(App.UI.DOM.makeElement("div", `Girls: ${girls}, Pref: ${pref}, Ads: ${adCampaign.stacked}`)); + } // Ads if (adCampaign.spending !== 0) { - t += `<div>`; if (adCampaign.stacked === 1) { - t += `Its advertisements feature girls with plenty up top and rears to match. `; + t.push(App.UI.DOM.makeElement("div", `Its advertisements feature girls with plenty up top and rears to match.`)); } else if (adCampaign.stacked === -1) { - t += `Its advertisements feature trim girls with little in the way of T&A. `; + t.push(App.UI.DOM.makeElement("div", `Its advertisements feature trim girls with little in the way of T&A.`)); } else { - t += `Its advertisements feature a variety of girls, some that are trim and others that are curvaceous. `; + t.push(App.UI.DOM.makeElement("div", `Its advertisements feature a variety of girls, some that are trim and others that are curvaceous.`)); } - t += `</div>`; } // Preferences if (pref === 1) { - t += `Most customers prefer their girls well endowed. `; + t.push(`Most customers prefer their girls well endowed.`); } else if (pref === -1) { - t += `Most customers prefer their girls light. `; + t.push(`Most customers prefer their girls light.`); } else { let variety = adMgr.varietyBonus(App.Ads.Categories.assetSize); if (variety === 1) { payBonus(); - t += `The ${building} offers a `; - if (building === "brothel") { - t += `<span class="yellowgreen">`; - } else if (building === "club") { - t += `<span class="green">`; - } - t += `wide</span> variety of slim and stacked slaves. `; + t.push( + `The ${building} offers a`, + App.UI.DOM.makeElement("span", `wide`, (building === "brothel") ? "yellowgreen" : "green"), + `variety of slim and stacked slaves.` + ); } - t += `Most customers don't mind the selection of assets. `; + t.push(`Most customers don't mind the selection of assets.`); } // Girls if (girls === -1) { - t += `Most of the slaves in the ${building} have small tits and asses. `; + t.push(`Most of the slaves in the ${building} have small tits and asses.`); } else if (girls === 1) { - t += `Most of the slaves in the ${building} have large tits and asses. `; + t.push(`Most of the slaves in the ${building} have large tits and asses.`); } else { - t += `The slaves in the ${building} vary in asset size. `; + t.push(`The slaves in the ${building} vary in asset size.`); } // Results @@ -421,136 +397,136 @@ App.Ads.report = function(building, preview = false) { } else if (adCampaign.spending > 0) { if ((adCampaign.stacked === pref) && (girls === adCampaign.stacked)) { payBonus(); - t += `Its advertising for `; + t.push(`Its advertising for`); if (adCampaign.stacked === 1) { - t += `stacked `; + t.push(`stacked`); } else if (adCampaign.stacked === -1) { - t += `trim `; + t.push(`trim`); } - t += `girls matched most customers' preferences and the girls in the ${building} matched its advertisements. `; - t += reputation(building, 1, preview); + t.push(`girls matched most customers' preferences and the girls in the ${building} matched its advertisements.`); + t.push(reputation(1)); } else if ((adCampaign.stacked === pref) && (girls !== adCampaign.stacked)) { - t += `Its advertising for `; + t.push(`Its advertising for`); if (adCampaign.stacked === 1) { - t += `stacked `; + t.push(`stacked`); } else if (adCampaign.stacked === -1) { - t += `trim `; + t.push(`trim`); } - t += `girls matched most customers preferences, but most of the girls in the ${building} were not as advertised. `; - t += reputation(building, -1, preview); + t.push(`girls matched most customers preferences, but most of the girls in the ${building} were not as advertised.`); + t.push(reputation(-1)); } else if ((girls === pref) && (girls !== adCampaign.stacked)) { - t += `The `; + t.push(`The`); if (girls === 1) { - t += `stacked `; + t.push(`stacked`); } else if (girls === -1) { - t += `trim `; + t.push(`trim`); } - t += `girls in the ${building} did not match its advertisements, but since the girls in the ${building} matched most customers preferences for `; + t.push(`girls in the ${building} did not match its advertisements, but since the girls in the ${building} matched most customers preferences for`); if (pref === 1) { - t += `stacked `; + t.push(`stacked`); } else if (pref === -1) { - t += `slim `; + t.push(`slim`); } - t += `girls, `; - t += reputation(building, 0, preview); + t.push(`girls,`); + t.push(reputation(0)); } else if (girls !== pref) { - t += `Some customers were put off since the `; + t.push(`Some customers were put off since the`); if (girls === 1) { - t += `stacked `; + t.push(`stacked`); } else if (girls === -1) { - t += `trim `; + t.push(`trim`); } - t += `girls there did not match their preferences for `; + t.push(`girls there did not match their preferences for`); if (pref === 1) { - t += `stacked `; + t.push(`stacked`); } else if (pref === -1) { - t += `slim `; + t.push(`slim`); } - t += `girls. `; - t += reputation(building, -1, preview); + t.push(`girls.`); + t.push(reputation(-1)); } } else { if (girls === pref) { - t += `The `; + t.push(`The`); if (girls === 1) { - t += `stacked `; + t.push(`stacked`); } else if (girls === -1) { - t += `trim `; + t.push(`trim`); } - t += `girls in the ${building} match most customers' preferences for `; + t.push(`girls in the ${building} match most customers' preferences for`); if (pref === 1) { - t += `stacked `; + t.push(`stacked`); } else if (pref === -1) { - t += `slim `; + t.push(`slim`); } - t += `girls. `; - t += reputation(building, 1, preview); + t.push(`girls.`); + t.push(reputation(1)); } else { - t += `Some customers were put off since the `; + t.push(`Some customers were put off since the`); if (girls === 1) { - t += `stacked `; + t.push(`stacked`); } else if (girls === -1) { - t += `trim `; + t.push(`trim`); } - t += `girls there did not match their preferences for `; + t.push(`girls there did not match their preferences for`); if (pref === 1) { - t += `large `; + t.push(`large`); } else if (pref === -1) { - t += `slim `; + t.push(`slim`); } - t += `girls. `; - t += reputation(building, -1, preview); + t.push(`girls.`); + t.push(reputation(-1)); } } - return t; + App.Events.addNode(frag, t, "div"); + return frag; } - function preg(building, preview) { - let t = ``; + function preg() { + const frag = new DocumentFragment(); + let t = []; const pref = App.Ads.Categories.preg.classifyLocalPreference(); let girls = adMgr.slavesMajority(App.Ads.Categories.preg); - if (V.debugMode === 1) { t += `Girls: ${girls}, Pref: ${pref}, Ads: ${adCampaign.preg}`; } + if (V.debugMode === 1) { + t.push(App.UI.DOM.makeElement("div", `Girls: ${girls}, Pref: ${pref}, Ads: ${adCampaign.preg}`)); + } if (V.seePreg === 1) { // Ads if (adCampaign.spending > 0) { - t += `<div>`; if (adCampaign.preg === 1) { - t += `Its advertisements feature girls that are clearly pregnant. `; + t.push(App.UI.DOM.makeElement("div", `Its advertisements feature girls that are clearly pregnant.`)); } else if (adCampaign.preg === -1) { - t += `Its advertisements feature girls that have flat, usually firm, bellies. `; + t.push(App.UI.DOM.makeElement("div", `Its advertisements feature girls that have flat, usually firm, bellies.`)); } else { - t += `Its advertisements feature some girls that are pregnant. `; + t.push(App.UI.DOM.makeElement("div", `Its advertisements feature some girls that are pregnant.`)); } - t += `</div>`; } // Preferences if (pref === 1) { - t += `Most customers prefer their girls rounded with child. `; + t.push(`Most customers prefer their girls rounded with child.`); } else if (pref === -1) { - t += `Most customers prefer girls that aren't gravid. `; + t.push(`Most customers prefer girls that aren't gravid.`); } else { let variety = adMgr.varietyBonus(App.Ads.Categories.preg); if (variety === 1) { payBonus(); - t += `The ${building} offers a `; - if (building === "brothel") { - t += `<span class="yellowgreen">`; - } else if (building === "club") { - t += `<span class="green">`; - } - t += `wide</span> selection of slaves with a variety of middles. `; + t.push( + `The ${building} offers a`, + App.UI.DOM.makeElement("span", `wide`, (building === "brothel") ? "yellowgreen" : "green"), + `selection of slaves with a variety of middles.` + ); } - t += `Most customers don't have preferences for either big-bellied or flat-bellied girls. `; + t.push(`Most customers don't have preferences for either big-bellied or flat-bellied girls.`); } // Girls if (girls === -1) { - t += `Most of the slaves in the ${building} sport flat bellies. `; + t.push(`Most of the slaves in the ${building} sport flat bellies.`); } else if (girls === 1) { - t += `Most of the slaves in the ${building} sport gravid middles. `; + t.push(`Most of the slaves in the ${building} sport gravid middles.`); } else { - t += `The slaves in the ${building} vary in belly type. `; + t.push(`The slaves in the ${building} vary in belly type.`); } // Results @@ -558,137 +534,137 @@ App.Ads.report = function(building, preview = false) { } else if (adCampaign.spending > 0) { if ((adCampaign.preg === pref) && (girls === adCampaign.preg)) { payBonus(); - t += `Its advertising for `; + t.push(`Its advertising for`); if (adCampaign.preg === 1) { - t += `pregnant `; + t.push(`pregnant`); } else if (adCampaign.preg === -1) { - t += `flat-bellied `; + t.push(`flat-bellied`); } - t += `girls matched most customers' preferences and the girls in the ${building} matched its advertisements. `; - t += reputation(building, 1, preview); + t.push(`girls matched most customers' preferences and the girls in the ${building} matched its advertisements.`); + t.push(reputation(1)); } else if ((adCampaign.preg === pref) && (girls !== adCampaign.preg)) { - t += `Its advertising for `; + t.push(`Its advertising for`); if (adCampaign.preg === 1) { - t += `pregnant `; + t.push(`pregnant`); } else if (adCampaign.preg === -1) { - t += `flat-bellied `; + t.push(`flat-bellied`); } - t += `girls matched most customers' preferences, but the girls in the ${building} did not. `; - t += reputation(building, -1, preview); + t.push(`girls matched most customers' preferences, but the girls in the ${building} did not.`); + t.push(reputation(-1)); } else if ((girls === pref) && (girls !== adCampaign.preg)) { - t += `The `; + t.push(`The`); if (girls === 1) { - t += `pregnant `; + t.push(`pregnant`); } else if (girls === -1) { - t += `flat-bellied `; + t.push(`flat-bellied`); } - t += `girls in the ${building} did not match its advertisements, but since the girls in the ${building} matched most customers preferences for `; + t.push(`girls in the ${building} did not match its advertisements, but since the girls in the ${building} matched most customers preferences for`); if (pref === 1) { - t += `fecund `; + t.push(`fecund`); } else if (pref === -1) { - t += `flat-bellied `; + t.push(`flat-bellied`); } - t += `girls, `; - t += reputation(building, 0, preview); + t.push(`girls,`); + t.push(reputation(0)); } else if (girls !== pref) { - t += `Some customers were put off since the `; + t.push(`Some customers were put off since the`); if (girls === 1) { - t += `pregnant `; + t.push(`pregnant`); } else if (girls === -1) { - t += `flat-bellied `; + t.push(`flat-bellied`); } - t += `girls there did not match their preferences for `; + t.push(`girls there did not match their preferences for`); if (pref === 1) { - t += `fecund `; + t.push(`fecund`); } else if (pref === -1) { - t += `flat-bellied `; + t.push(`flat-bellied`); } - t += `girls. `; - t += reputation(building, -1, preview); + t.push(`girls.`); + t.push(reputation(-1)); } } else { if (girls === pref) { - t += `The `; + t.push(`The`); if (girls === 1) { - t += `pregnant `; + t.push(`pregnant`); } else if (girls === -1) { - t += `flat-bellied `; + t.push(`flat-bellied`); } - t += `girls in the ${building} match most customers' preferences for `; + t.push(`girls in the ${building} match most customers' preferences for`); if (pref === 1) { - t += `fecund `; + t.push(`fecund`); } else if (pref === -1) { - t += ` flat-bellied `; + t.push(`flat-bellied`); } - t += `girls. `; - t += reputation(building, 1, preview); + t.push(`girls.`); + t.push(reputation(1)); } else { - t += `Some customers were put off since the `; + t.push(`Some customers were put off since the`); if (girls === 1) { - t += `pregnant `; + t.push(`pregnant`); } else if (girls === -1) { - t += `flat-bellied `; + t.push(`flat-bellied`); } - t += `girls there did not match their preferences for `; + t.push(`girls there did not match their preferences for`); if (pref === 1) { - t += `fecund `; + t.push(`fecund`); } else if (pref === -1) { - t += `flat-bellied `; + t.push(`flat-bellied`); } - t += `girls. `; - t += reputation(building, -1, preview); + t.push(`girls.`); + t.push(reputation(-1)); } } } - return t; + App.Events.addNode(frag, t, "div"); + return frag; } - function modded(building, preview) { - let t = ``; + function modded() { + const frag = new DocumentFragment(); + let t = []; const pref = App.Ads.Categories.mods.classifyLocalPreference(); let girls = adMgr.slavesMajority(App.Ads.Categories.mods); - if (V.debugMode === 1) { t += `Girls: ${girls}, Pref: ${pref}, Ads: ${adCampaign.modded}`; } + if (V.debugMode === 1) { + t.push(App.UI.DOM.makeElement("div", `Girls: ${girls}, Pref: ${pref}, Ads: ${adCampaign.modded}`)); + } // Ads if (adCampaign.spending > 0) { - t += `<div>`; if (adCampaign.modded === 1) { - t += `Its advertisements feature girls that are heavily pierced and tattooed. `; + t.push(App.UI.DOM.makeElement("div", `Its advertisements feature girls that are heavily pierced and tattooed.`)); } else if (adCampaign.modded === -1) { - t += `Its advertisements feature girls that are free from piercings and tattoos. `; + t.push(App.UI.DOM.makeElement("div", `Its advertisements feature girls that are free from piercings and tattoos.`)); } else { - t += `Its advertisements feature some girls that are tattooed and pierced, and some that aren't. `; + t.push(App.UI.DOM.makeElement("div", `Its advertisements feature some girls that are tattooed and pierced, and some that aren't.`)); } - t += `</div>`; } // Preferences if (pref === 1) { - t += `Most customers prefer heavily modified girls. `; + t.push(`Most customers prefer heavily modified girls.`); } else if (pref === -1) { - t += `Most customers prefer natural girls. `; + t.push(`Most customers prefer natural girls.`); } else { let variety = adMgr.varietyBonus(App.Ads.Categories.mods); if (variety === 1) { payBonus(); - t += `The ${building} offers `; - if (building === "brothel") { - t += `<span class="yellowgreen">`; - } else if (building === "club") { - t += `<span class="green">`; - } - t += `both</span> a selection of heavily altered slaves and those with more natural bodies. `; + t.push( + `The ${building} offers`, + App.UI.DOM.makeElement("span", `both`, (building === "brothel") ? "yellowgreen" : "green"), + `a selection of heavily altered slaves and those with more natural bodies.` + ); } - t += `Most customers don't have preferences for either modded or natural slaves. `; + t.push(`Most customers don't have preferences for either modded or natural slaves.`); } // Girls if (girls === 1) { - t += `Most of the slaves in the ${building} are heavily pierced and tattooed. `; + t.push(`Most of the slaves in the ${building} are heavily pierced and tattooed.`); } else if (girls === -1) { - t += `Most of the slaves in the ${building} have natural, unmodded bodies. `; + t.push(`Most of the slaves in the ${building} have natural, unmodded bodies.`); } else { - t += `Some girls in the ${building} have piercings or tattoos, some have none and others have both. `; + t.push(`Some girls in the ${building} have piercings or tattoos, some have none and others have both.`); } // Results @@ -696,136 +672,137 @@ App.Ads.report = function(building, preview = false) { } else if (adCampaign.spending > 0) { if ((adCampaign.modded === pref) && (girls === adCampaign.modded)) { payBonus(); - t += `Its advertising for `; + t.push(`Its advertising for`); if (adCampaign.modded === 1) { - t += `heavily modified `; + t.push(`heavily modified`); } else if (adCampaign.modded === -1) { - t += `natural bodied `; + t.push(`natural bodied`); } - t += `girls matched most customers' preferences and the girls in the ${building} matched its advertisements. `; - t += reputation(building, 1, preview); + t.push(`girls matched most customers' preferences and the girls in the ${building} matched its advertisements.`); + t.push(reputation(1)); } else if ((adCampaign.modded === pref) && (girls !== adCampaign.modded)) { - t += `Its advertising for `; + t.push(`Its advertising for`); if (adCampaign.modded === 1) { - t += `heavily modified ;`; + t.push(`heavily modified`); } else if (adCampaign.modded === -1) { - t += `natural bodied `; + t.push(`natural bodied`); } - t += `girls matched most customers preferences, but the girls in the ${building} did not. `; - t += reputation(building, -1, preview); + t.push(`girls matched most customers preferences, but the girls in the ${building} did not.`); + t.push(reputation(-1)); } else if ((girls === pref) && (girls !== adCampaign.modded)) { - t += `The `; + t.push(`The`); if (girls === 1) { - t += `heavily modified `; + t.push(`heavily modified`); } else if (girls === -1) { - t += `natural bodied `; + t.push(`natural bodied`); } - t += `girls in the ${building} did not match its advertisements, but since the girls in the ${building} matched most customers preferences for `; + t.push(`girls in the ${building} did not match its advertisements, but since the girls in the ${building} matched most customers preferences for`); if (pref === 1) { - t += `heavily modded `; + t.push(`heavily modded`); } else if (pref === -1) { - t += `natural bodied `; + t.push(`natural bodied`); } - t += `girls, `; - t += reputation(building, 0, preview); + t.push(`girls,`); + t.push(reputation(0)); } else if (girls !== pref) { - t += `Some customers were put off since the `; + t.push(`Some customers were put off since the`); if (girls === 1) { - t += `heavily modified `; + t.push(`heavily modified`); } else if (girls === -1) { - t += `natural bodied `; + t.push(`natural bodied`); } - t += `girls there did not match their preferences for `; + t.push(`girls there did not match their preferences for`); if (pref === 1) { - t += `heavily modded `; + t.push(`heavily modded`); } else if (pref === -1) { - t += `natural bodied `; + t.push(`natural bodied`); } - t += `girls. `; - t += reputation(building, -1, preview); + t.push(`girls.`); + t.push(reputation(-1)); } } else { if (girls === pref) { - t += `The `; + t.push(`The`); if (girls === 1) { - t += `heavily modified `; + t.push(`heavily modified`); } else if (girls === -1) { - t += `natural bodied `; + t.push(`natural bodied`); } - t += `girls in the ${building} match most customers' preferences for `; + t.push(`girls in the ${building} match most customers' preferences for`); if (pref === 1) { - t += `heavily modded `; + t.push(`heavily modded`); } else if (pref === -1) { - t += `natural unmodded `; + t.push(`natural unmodded`); } - t += `girls. `; - t += reputation(building, 1, preview); + t.push(`girls.`); + t.push(reputation(1)); } else { - t += `Some customers were put off since the `; + t.push(`Some customers were put off since the`); if (girls === 1) { - t += `heavily modified `; + t.push(`heavily modified`); } else if (girls === -1) { - t += `natural bodied `; + t.push(`natural bodied`); } - t += `girls there did not match their preferences for `; + t.push(`girls there did not match their preferences for`); if (pref === 1) { - t += `heavily modded `; + t.push(`heavily modded`); } else if (pref === -1) { - t += `natural bodied `; + t.push(`natural bodied`); } - t += `girls. `; - t += reputation(building, -1, preview); + t.push(`girls.`); + t.push(reputation(-1)); } } - return t; + App.Events.addNode(frag, t, "div"); + return frag; } - function implanted(building, preview) { - let t = ``; + function implanted() { + const frag = new DocumentFragment(); + let t = []; const pref = App.Ads.Categories.assetOrigin.classifyLocalPreference(); let girls = adMgr.slavesMajority(App.Ads.Categories.assetOrigin); - if (V.debugMode === 1) { t += `Girls: ${girls}, Pref: ${pref}, Ads: ${adCampaign.implanted}`; } + if (V.debugMode === 1) { + t.push(App.UI.DOM.makeElement("div", `Girls: ${girls}, Pref: ${pref}, Ads: ${adCampaign.implanted}`)); + } // Ads if (adCampaign.spending > 0) { - t += `<div>`; if (adCampaign.implanted === 1) { - t += `Its advertisements feature girls that are augmented by implants or improved surgically. `; + t.push(App.UI.DOM.makeElement("div", `Its advertisements feature girls that are augmented by implants or improved surgically.`)); } else if (adCampaign.implanted === -1) { - t += `Its advertisements feature girls that have all natural bodies. `; + t.push(App.UI.DOM.makeElement("div", `Its advertisements feature girls that have all natural bodies.`)); } else { - t += `Its advertisements feature some girls that are surgically improved and implanted and some that are all-natural. `; + t.push(App.UI.DOM.makeElement("div", `Its advertisements feature some girls that are surgically improved and implanted and some that are all-natural.`)); } - t += `</div>`; } // Preferences if (pref === 1) { - t += `Most customers prefer heavily implanted and surgically enhanced girls. `; + t.push(`Most customers prefer heavily implanted and surgically enhanced girls.`); } else if (pref === -1) { - t += `Most customers prefer all-natural girls. `; + t.push(`Most customers prefer all-natural girls.`); } else { let variety = adMgr.varietyBonus(App.Ads.Categories.assetOrigin); if (variety === 1) { payBonus(); - t += `The ${building} offers `; - if (building === "brothel") { - t += `<span class="yellowgreen">`; - } else if (building === "club") { - t += `<span class="green">`; - } - t += `both</span> all-natural girls, and slaves whose beauty has been improved by surgical means. `; + t.push( + `The ${building} offers`, + App.UI.DOM.makeElement("span", `both`, (building === "brothel") ? "yellowgreen" : "green"), + `all-natural girls, and slaves whose beauty has been improved by surgical means.` + ); + t.push(); } - t += `Most customers don't have preferences for either all-natural or surgically enhanced and implanted girls. `; + t.push(`Most customers don't have preferences for either all-natural or surgically enhanced and implanted girls.`); } // Girls if (girls === 1) { - t += `Most of the slaves in the ${building} are heavily implanted or surgically enhanced. `; + t.push(`Most of the slaves in the ${building} are heavily implanted or surgically enhanced.`); } else if (girls === -1) { - t += `Most of the slaves in the ${building} have naturally pure bodies. `; + t.push(`Most of the slaves in the ${building} have naturally pure bodies.`); } else { - t += `The slaves in the ${building} vary in body modification. `; + t.push(`The slaves in the ${building} vary in body modification.`); } // Results @@ -833,142 +810,142 @@ App.Ads.report = function(building, preview = false) { } else if (adCampaign.spending > 0) { if ((adCampaign.implanted === pref) && (girls === adCampaign.implanted)) { payBonus(); - t += `Its advertising for `; + t.push(`Its advertising for`); if (adCampaign.implanted === 1) { - t += `implanted or surgically improved `; + t.push(`implanted or surgically improved`); } else if (adCampaign.implanted === -1) { - t += `naturally pure `; + t.push(`naturally pure`); } - t += `girls matched most customers' preferences and the girls in the ${building} matched its advertisements. `; - t += reputation(building, 1, preview); + t.push(`girls matched most customers' preferences and the girls in the ${building} matched its advertisements.`); + t.push(reputation(1)); } else if ((adCampaign.implanted === pref) && (girls !== adCampaign.implanted)) { - t += `Its advertising for `; + t.push(`Its advertising for`); if (adCampaign.implanted === 1) { - t += `implanted or surgically improved `; + t.push(`implanted or surgically improved`); } else if (adCampaign.implanted === -1) { - t += `naturally pure `; + t.push(`naturally pure`); } - t += `girls matched most customers preferences, but the girls in the ${building} did not. `; - t += reputation(building, -1, preview); + t.push(`girls matched most customers preferences, but the girls in the ${building} did not.`); + t.push(reputation(-1)); } else if ((girls === pref) && (girls !== adCampaign.implanted)) { - t += `The `; + t.push(`The`); if (girls === 1) { - t += `implanted or surgically improved `; + t.push(`implanted or surgically improved`); } else if (girls === -1) { - t += `naturally pure `; + t.push(`naturally pure`); } - t += `girls in the ${building} did not match its advertisements, but since the girls in the ${building} matched most customers preferences for `; + t.push(`girls in the ${building} did not match its advertisements, but since the girls in the ${building} matched most customers preferences for`); if (pref === 1) { - t += `implanted or surgically improved `; + t.push(`implanted or surgically improved`); } else if (pref === -1) { - t += `naturally pure `; + t.push(`naturally pure`); } - t += `girls, `; - t += reputation(building, 0, preview); + t.push(`girls,`); + t.push(reputation(0)); } else if (girls !== pref) { - t += `Some customers were put off since the `; + t.push(`Some customers were put off since the`); if (girls === 1) { - t += `implanted or surgically improved `; + t.push(`implanted or surgically improved`); } else if (girls === -1) { - t += `naturally pure `; + t.push(`naturally pure`); } - t += `girls there did not match their preferences for `; + t.push(`girls there did not match their preferences for`); if (pref === 1) { - t += `implanted or surgically improved `; + t.push(`implanted or surgically improved`); } else if (pref === -1) { - t += `naturally pure `; + t.push(`naturally pure`); } - t += `girls. `; - t += reputation(building, -1, preview); + t.push(`girls.`); + t.push(reputation(-1)); } } else { if (girls === pref) { - t += `The `; + t.push(`The`); if (girls === 1) { - t += `implanted or surgically improved `; + t.push(`implanted or surgically improved`); } else if (girls === -1) { - t += `naturally pure `; + t.push(`naturally pure`); } - t += `girls in the ${building} match most customers' preferences for `; + t.push(`girls in the ${building} match most customers' preferences for`); if (pref === 1) { - t += `implanted or surgically improved `; + t.push(`implanted or surgically improved`); } else if (pref === -1) { - t += `natural unmodded `; + t.push(`natural unmodded`); } - t += `girls. `; - t += reputation(building, 1, preview); + t.push(`girls.`); + t.push(reputation(1)); } else { - t += `Some customers were put off since the `; + t.push(`Some customers were put off since the`); if (girls === 1) { - t += `implanted or surgically improved `; + t.push(`implanted or surgically improved`); } else if (girls === -1) { - t += `naturally pure `; + t.push(`naturally pure`); } - t += `girls there did not match their preferences for `; + t.push(`girls there did not match their preferences for`); if (pref === 1) { - t += `implanted or surgically improved `; + t.push(`implanted or surgically improved`); } else if (pref === -1) { - t += `naturally pure `; + t.push(`naturally pure`); } - t += `girls. `; - t += reputation(building, -1, preview); + t.push(`girls.`); + t.push(reputation(-1)); } } - return t; + App.Events.addNode(frag, t, "div"); + return frag; } - function XX(building, preview) { - let t = ``; + function XX() { + const frag = new DocumentFragment(); + let t = []; const pref = App.Ads.Categories.genitalia.classifyLocalPreference(); let girls = adMgr.slavesMajority(App.Ads.Categories.genitalia); - if (V.debugMode === 1) { t += `Girls: ${girls}, Pref: ${pref}, Ads: ${adCampaign.XX}`; } + if (V.debugMode === 1) { + t.push(App.UI.DOM.makeElement("div", `Girls: ${girls}, Pref: ${pref}, Ads: ${adCampaign.XX}`)); + } if (V.seeDicks !== 0) { // Ads if (adCampaign.spending > 0) { - t += `<div>`; if (adCampaign.XX === 1) { - t += `Its advertisements feature girls with female genitalia. `; + t.push(App.UI.DOM.makeElement("div", `Its advertisements feature girls with female genitalia.`)); } else if (adCampaign.XX === -1) { - t += `Its advertisements feature girls with male genitalia. `; + t.push(App.UI.DOM.makeElement("div", `Its advertisements feature girls with male genitalia.`)); } else { - t += `Its advertisements feature a variety of girls with both male and female genitalia. `; + t.push(App.UI.DOM.makeElement("div", `Its advertisements feature a variety of girls with both male and female genitalia.`)); } - t += `</div>`; } // Preferences if (pref === 1) { - t += `Most customers prefer girls with pussies. `; + t.push(`Most customers prefer girls with pussies.`); } else if (pref === -1) { - t += `Most customers prefer girls with dicks. `; + t.push(`Most customers prefer girls with dicks.`); } else { let variety = adMgr.varietyBonus(App.Ads.Categories.genitalia); if (variety === 1) { payBonus(); - t += `The ${building} offers a `; + t.push( + `The ${building} offers a`, + App.UI.DOM.makeElement("span", `mix`, (building === "brothel") ? "yellowgreen" : "green"), + `of` + ); if (building === "brothel") { - t += `<span class="yellowgreen">`; - } else if (building === "club") { - t += `<span class="green">`; - } - t += `mix</span> of `; - if (building === "brothel") { - t += `whores `; + t.push(`whores`); } else { - t += `sluts `; + t.push(`sluts`); } - t += `that can appeal to varied tastes in genitalia. `; + t.push(`that can appeal to varied tastes in genitalia.`); } - t += `Most customers don't have preferences for either girls with dicks or girls with pussies. `; + t.push(`Most customers don't have preferences for either girls with dicks or girls with pussies.`); } // Girls if (girls === 1) { - t += `Most of the slaves in the ${building} have female genitalia. `; + t.push(`Most of the slaves in the ${building} have female genitalia.`); } else if (girls === -1) { - t += `Most of the slaves in the ${building} have male genitalia. `; + t.push(`Most of the slaves in the ${building} have male genitalia.`); } else { - t += `The slaves in the ${building} vary in genitalia. `; + t.push(`The slaves in the ${building} vary in genitalia.`); } // Results @@ -976,141 +953,137 @@ App.Ads.report = function(building, preview = false) { } else if (adCampaign.spending > 0) { if ((adCampaign.XX === pref) && (girls === adCampaign.XX)) { payBonus(); - t += `Its advertising for girls `; + t.push(`Its advertising for girls`); if (adCampaign.XX === 1) { - t += `with pussies `; + t.push(`with pussies`); } else if (adCampaign.XX === -1) { - t += `with dicks `; + t.push(`with dicks`); } - t += `matches most customers' preferences as advertised. `; - t += reputation(building, 1, preview); + t.push(`matches most customers' preferences as advertised.`); + t.push(reputation(1)); } else if ((adCampaign.XX === pref) && (girls !== adCampaign.XX)) { - t += `Its advertising for girls `; + t.push(`Its advertising for girls`); if (adCampaign.XX === 1) { - t += `with pussies `; + t.push(`with pussies`); } else if (adCampaign.XX === -1) { - t += `with dicks `; + t.push(`with dicks`); } - t += `matched most customers preferences, but the girls in the ${building} are not as advertised. `; - t += reputation(building, -1, preview); + t.push(`matched most customers preferences, but the girls in the ${building} are not as advertised.`); + t.push(reputation(-1)); } else if ((girls === pref) && (girls !== adCampaign.XX)) { - t += `The girls `; + t.push(`The girls`); if (girls === 1) { - t += ` with pussies`; + t.push(`with pussies`); } else if (girls === -1) { - t += ` with dicks`; + t.push(`with dicks`); } - t += `in the ${building} did not match the advertisements, but since the girls in the ${building} matched most customers preferences for girls`; + t.push(`in the ${building} did not match the advertisements, but since the girls in the ${building} matched most customers preferences for girls`); if (pref === 1) { - t += ` with pussies`; + t.push(`with pussies,`); } else if (pref === -1) { - t += ` with dicks`; + t.push(`with dicks,`); } - t += `, `; - t += reputation(building, 0, preview); + t.push(reputation(0)); } else if (girls !== pref) { - t += `Some customers were put off since the girls `; + t.push(`Some customers were put off since the girls`); if (girls === 1) { - t += `with female genitalia `; + t.push(`with female genitalia`); } else if (girls === -1) { - t += `with male genitalia `; + t.push(`with male genitalia`); } - t += `did not match their preferences for girls`; + t.push(`did not match their preferences for girls`); if (pref === 1) { - t += ` with pussies`; + t.push(`with pussies.`); } else if (pref === -1) { - t += ` with dicks`; + t.push(`with dicks.`); } - t += `. `; - t += reputation(building, -1, preview); + t.push(reputation(-1)); } } else { if (girls === pref) { - t += `The girls in the ${building} match most customers preferences for girls `; + t.push(`The girls in the ${building} match most customers preferences for girls`); if (girls === 1) { - t += `with female genitalia `; + t.push(`with female genitalia.`); } else if (girls === -1) { - t += `with male genitalia `; + t.push(`with male genitalia.`); } - t += `. `; - t += reputation(building, 1, preview); + t.push(reputation(1)); } else { - t += `Some customers were put off since the girls `; + t.push(`Some customers were put off since the girls`); if (girls === 1) { - t += `with female genitalia `; + t.push(`with female genitalia`); } else if (girls === -1) { - t += `with male genitalia `; + t.push(`with male genitalia`); } - t += `did not match their preferences for girls `; + t.push(`did not match their preferences for girls`); if (pref === 1) { - t += `with pussies`; + t.push(`with pussies.`); } else if (pref === -1) { - t += `with dicks`; + t.push(`with dicks.`); } - t += `. `; - t += reputation(building, -1, preview); + t.push(reputation(-1)); } } } - return t; + App.Events.addNode(frag, t, "div"); + return frag; } - function age(building, preview) { - let t = ``; + function age() { + const frag = new DocumentFragment(); + let t = []; const pref = App.Ads.Categories.age.classifyLocalPreference(); let girls = adMgr.slavesMajority(App.Ads.Categories.age); - if (V.debugMode === 1) { t += `Girls: ${girls}, Pref: ${pref}, Ads: ${adCampaign.age}`; } + if (V.debugMode === 1) { + t.push(App.UI.DOM.makeElement("div", `Girls: ${girls}, Pref: ${pref}, Ads: ${adCampaign.age}`)); + } // Ads if (adCampaign.spending > 0) { - t += `<div>`; switch (adCampaign.age) { case 1: - t += `Its advertisements feature mature slaves. `; + t.push(App.UI.DOM.makeElement("div", `Its advertisements feature mature slaves.`)); break; case -1: - t += `Its advertisements feature young slaves. `; + t.push(App.UI.DOM.makeElement("div", `Its advertisements feature young slaves.`)); break; case -2: - t += `Its advertisements feature teenagers. `; + t.push(App.UI.DOM.makeElement("div", `Its advertisements feature teenagers.`)); break; case -3: - t += `Its advertisements feature lolis. `; + t.push(App.UI.DOM.makeElement("div", `Its advertisements feature lolis.`)); break; default: - t += `Its advertisements feature slaves of a variety of ages. `; + t.push(App.UI.DOM.makeElement("div", `Its advertisements feature slaves of a variety of ages.`)); break; } - t += `</div>`; } // Preferences if (pref === 1) { - t += `Most customers prefer mature girls. `; + t.push(`Most customers prefer mature girls.`); } else if (pref === -1) { - t += `Most customers prefer young girls. `; + t.push(`Most customers prefer young girls.`); } else { let variety = adMgr.varietyBonus(App.Ads.Categories.age); if (variety === 1) { payBonus(); - t += `The ${building} offers girls `; - if (building === "brothel") { - t += `<span class="yellowgreen">`; - } else if (building === "club") { - t += `<span class="green">`; - } - t += `both</span> young and mature. `; + t.push( + `The ${building} offers girls`, + App.UI.DOM.makeElement("span", `both`, (building === "brothel") ? "yellowgreen" : "green"), + `young and mature.` + ); } - t += `Most customers don't have preferences for either mature or young girls. `; + t.push(`Most customers don't have preferences for either mature or young girls.`); } // Girls if (girls === -1) { - t += `Most of the slaves in the ${building} are young. `; + t.push(`Most of the slaves in the ${building} are young.`); } else if (girls === 1) { - t += `Most of the slaves in the ${building} are mature. `; + t.push(`Most of the slaves in the ${building} are mature.`); } else { - t += `The slaves in the ${building} vary in age. `; + t.push(`The slaves in the ${building} vary in age.`); } // Results @@ -1118,32 +1091,34 @@ App.Ads.report = function(building, preview = false) { } else if (adCampaign.spending > 0) { if ((adCampaign.age === pref) && (girls === adCampaign.age)) { payBonus(); - t += `Its advertising matches most customers' age preferences and the girls in the ${building} match the ages as advertised. `; - t += reputation(building, 1, preview); + t.push(`Its advertising matches most customers' age preferences and the girls in the ${building} match the ages as advertised.`); + t.push(reputation(1)); } else if ((adCampaign.age === pref) && (girls !== adCampaign.age)) { - t += `Its advertising matched most customers age preferences, but the girls in the ${building} are not as advertised. `; - t += reputation(building, -1, preview); + t.push(`Its advertising matched most customers age preferences, but the girls in the ${building} are not as advertised.`); + t.push(reputation(-1)); } else if ((girls === pref) && (girls !== adCampaign.age)) { - t += `The ages of girls in the ${building} did not match the ages as advertised, but since the girls in the ${building} matched most customers age preferences, `; - t += reputation(building, 0, preview); + t.push(`The ages of girls in the ${building} did not match the ages as advertised, but since the girls in the ${building} matched most customers age preferences,`); + t.push(reputation(0)); } else if (girls !== pref) { - t += `Some customers were put off since the ages of girls there did not match their preferences. `; - t += reputation(building, -1, preview); + t.push(`Some customers were put off since the ages of girls there did not match their preferences.`); + t.push(reputation(-1)); } } else { if (girls === pref) { - t += `The girls in the ${building} match most customers' age preferences. `; - t += reputation(building, 1, preview); + t.push(`The girls in the ${building} match most customers' age preferences.`); + t.push(reputation(1)); } else { - t += `Some customers were put off since the ages of girls there did not match their preferences. `; - t += reputation(building, -1, preview); + t.push(`Some customers were put off since the ages of girls there did not match their preferences.`); + t.push(reputation(-1)); } } - return t; + App.Events.addNode(frag, t, "div"); + return frag; } - function final(building, preview) { - let t = ``; + function final() { + const frag = new DocumentFragment(); + let t = []; if (adMgr.overallVarietyBonus()) { if (!preview) { if (building === "brothel") { @@ -1154,115 +1129,121 @@ App.Ads.report = function(building, preview = false) { repX(DL * random(10, 15), (building + "Ads")); } } - t += `<div>There is a `; + App.Events.addNode(frag, t, "div"); + t = []; + t.push( + `There is a`, + App.UI.DOM.makeElement("span", `perfect variety`, [(building === "brothel") ? "yellowgreen" : "green", "bold"]), + `of slave` + ); if (building === "brothel") { - t += `<span class="yellowgreen" style="font-weight:bold">perfect variety</span> of slave whores `; + t.push(`whores`); } else if (building === "club") { - t += `<span class="green" style="font-weight:bold">perfect variety</span> of slave sluts `; + t.push(`sluts`); } - t += `working in the ${building}.</div>`; + t.push(`working in the ${building}.`); + App.Events.addNode(frag, t, "div"); } else { if (building === "club") { - t += `<div>${capFirstChar(V.clubName)} does not offer enough variety to satisfy all visitors.</div>`; + t.push(App.UI.DOM.makeElement("div", `${capFirstChar(V.clubName)} does not offer enough variety to satisfy all visitors.`)); } } - return t; + App.Events.addNode(frag, t, "div"); + return frag; } - function reputation(building, change, preview) { + function reputation(change) { const minBonus = 50; const maxBonus = 150; + const frag = new DocumentFragment(); + let t = []; if (change > 0) { if (preview) { - return `<div>The current campaign would <span class="green">increase</span> your reputation.</div>`; + t.push(`The current campaign would <span class="green">increase</span> your reputation.`); } else { repX(random(minBonus, maxBonus), building); - return `Your <span class="green">reputation</span> increased slightly as a result. `; + t.push(`Your <span class="green">reputation</span> increased slightly as a result.`); } } else if (change < 0) { if (preview) { - return `<div>The current campaign would <span class="red">lower</span> your reputation.</div>`; + t.push(`The current campaign would <span class="red">lower</span> your reputation.`); } else { repX(forceNeg(random(minBonus, maxBonus)), building); - return `Your <span class="red">reputation</span> dropped slightly as a result. `; + t.push(`Your <span class="red">reputation</span> dropped slightly as a result.`); } } else if (change === 0) { if (preview) { - return `<div>your reputation would not be affected.</div>`; + t.push(`your reputation would not be affected.`); } else { - return `your reputation was not affected. `; + t.push(`your reputation was not affected.`); } } + App.Events.addNode(frag, t, "div"); + return frag; } - function links(building, category) { - let r = ``; - let passage = (capFirstChar(building) + " Advertisement"); + function links(category) { + const linkArray = []; - function radioLink(name, variable, value, last) { - let r = ``; + function radioLink(name, variable, value) { if (V[variable] !== value) { - r += App.UI.passageLink(name, passage, `${variable} = ${value}`); + linkArray.push( + App.UI.DOM.link( + name, + () => { + V[variable] = value; + App.UI.reload(); + }, + ) + ); } else { - r += name; - } - if (!last) { - r += " | "; + linkArray.push( + App.UI.DOM.disabledLink(name, ["Selected"]) + ); } - return r; + return App.UI.DOM.generateLinksStrip(linkArray); } switch (category) { case "stacked": - r += `<div>`; - r += radioLink("Stacked", `${building}AdsStacked`, 1, false); - r += radioLink("Slim", `${building}AdsStacked`, -1, false); - r += radioLink("Variety", `${building}AdsStacked`, 0, true); - r += `</div>`; - return r; + radioLink("Stacked", `${building}AdsStacked`, 1); + radioLink("Slim", `${building}AdsStacked`, -1); + radioLink("Variety", `${building}AdsStacked`, 0); + break; case "preg": - r += `<div>`; - r += radioLink("Gravid", `${building}AdsPreg`, 1, false); - r += radioLink("None", `${building}AdsPreg`, -1, false); - r += radioLink("Variety", `${building}AdsPreg`, 0, true); - r += `</div>`; - return r; + radioLink("Gravid", `${building}AdsPreg`, 1); + radioLink("None", `${building}AdsPreg`, -1); + radioLink("Variety", `${building}AdsPreg`, 0); + break; case "modded": - r += `<div>`; - r += radioLink("Modded", `${building}AdsModded`, 1, false); - r += radioLink("Unmodded", `${building}AdsModded`, -1, false); - r += radioLink("Variety", `${building}AdsModded`, 0, true); - r += `</div>`; - return r; + radioLink("Modded", `${building}AdsModded`, 1); + radioLink("Unmodded", `${building}AdsModded`, -1); + radioLink("Variety", `${building}AdsModded`, 0); + break; case "implanted": - r += `<div>`; - r += radioLink("Implants", `${building}AdsImplanted`, 1, false); - r += radioLink("All natural", `${building}AdsImplanted`, -1, false); - r += radioLink("Variety", `${building}AdsImplanted`, 0, true); - r += `</div>`; - return r; + radioLink("Implants", `${building}AdsImplanted`, 1); + radioLink("All natural", `${building}AdsImplanted`, -1); + radioLink("Variety", `${building}AdsImplanted`, 0); + break; case "XX": - r += `<div>`; - r += radioLink("Pussies", `${building}AdsXX`, 1, false); - r += radioLink("Dicks", `${building}AdsXX`, -1, false); - r += radioLink("Variety", `${building}AdsXX`, 0, true); - r += `</div>`; - return r; + radioLink("Pussies", `${building}AdsXX`, 1); + radioLink("Dicks", `${building}AdsXX`, -1); + radioLink("Variety", `${building}AdsXX`, 0); + break; case "age": - r += `<div>`; - r += radioLink("MILF", `${building}AdsOld`, 1, false); - r += radioLink("Young", `${building}AdsOld`, -1, false); + radioLink("MILF", `${building}AdsOld`, 1); + radioLink("Young", `${building}AdsOld`, -1); if (V.minimumSlaveAge < 18) { - r += radioLink("Teen", `${building}AdsOld`, -2, false); + radioLink("Teen", `${building}AdsOld`, -2); } if (V.minimumSlaveAge < 13) { - r += radioLink("Loli", `${building}AdsOld`, -3, false); + radioLink("Loli", `${building}AdsOld`, -3); } - r += radioLink("Variety", `${building}AdsOld`, 0, true); - r += `</div>`; - return r; + radioLink("Variety", `${building}AdsOld`, 0); + break; default: console.log("You done fucked up. Building: " + building + " Category: " + category); } + return App.UI.DOM.makeElement("div", App.UI.DOM.generateLinksStrip(linkArray)); } }; diff --git a/src/uncategorized/brothelAdvertisement.tw b/src/uncategorized/brothelAdvertisement.tw index 1b4c8d8ce3e0fc65311de1d24f3cac18bd5623df..1e7ac07fbf06659f3add118ffc195ff683d4ae60 100644 --- a/src/uncategorized/brothelAdvertisement.tw +++ b/src/uncategorized/brothelAdvertisement.tw @@ -161,5 +161,5 @@ </div> <p> - <<= App.Ads.report("brothel", true)>> + <<includeDOM App.Ads.report("brothel", true)>> </p> diff --git a/src/uncategorized/clubAdvertisement.tw b/src/uncategorized/clubAdvertisement.tw index dd0cac4c160b1eed4da5d5e5de52e3f42f10a85f..cb85188466022d2c8a40d3f4d93388786f05f330 100644 --- a/src/uncategorized/clubAdvertisement.tw +++ b/src/uncategorized/clubAdvertisement.tw @@ -158,5 +158,5 @@ </div> <p> - <<= App.Ads.report("club", true)>> + <<includeDOM App.Ads.report("club", true)>> </p>