From 9e06fb799b8544f1e4551211cbe697dbe20b51d9 Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Wed, 28 Oct 2020 20:32:19 -0400 Subject: [PATCH] fix ads --- src/facilities/ads.js | 12 +++++++----- src/uncategorized/brothelReport.js | 3 +-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/facilities/ads.js b/src/facilities/ads.js index 54b79c0e21a..8494ed0c014 100644 --- a/src/facilities/ads.js +++ b/src/facilities/ads.js @@ -245,11 +245,13 @@ App.Ads.AdManager = class { } }; -App.Ads.report = function(building, preview) { - "use strict"; - if (typeof preview === undefined) { - preview =false; - } +/** + * + * @param {string} building + * @param {boolean} [preview] + * @returns {string} + */ +App.Ads.report = function(building, preview = false) { let r = ``; /** @type {App.Entity.Facilities.Facility} */ diff --git a/src/uncategorized/brothelReport.js b/src/uncategorized/brothelReport.js index c0a51abfe1b..51dfb042f47 100644 --- a/src/uncategorized/brothelReport.js +++ b/src/uncategorized/brothelReport.js @@ -346,8 +346,7 @@ globalThis.brothelReport = function() { getSlaveStatisticData(slave, V.facility.brothel).adsIncome += _adsIncome; cashX(_cashX, "brothelAds"); } - - App.UI.DOM.appendNewElement("p", el, App.Ads.report("brothel")); + App.Events.addParagraph(el, [App.Ads.report("brothel", false)]); _profits += V.cash - _oldCash; // <!-- Record statistics gathering --> -- GitLab