diff --git a/src/Mods/SecExp/buildings/secBarracks.tw b/src/Mods/SecExp/buildings/secBarracks.tw index a6aea39b054060c9cf788d201c2122b29b87e419..0ceb9edebb644dafe30169fbf92ee63dbe81c9ec 100644 --- a/src/Mods/SecExp/buildings/secBarracks.tw +++ b/src/Mods/SecExp/buildings/secBarracks.tw @@ -193,7 +193,7 @@ Your current maximum number of units is <<print App.SecExp.battle.maxUnits()>> ( <br>Your drones are equipped with top tier weaponry and armor. <</if>> <<if $SecExp.settings.showStats == 1>> - <br><<= _App.SecExp.getUnit("Bots").printStats()>> + <br><<= App.SecExp.getUnit("Bots").printStats()>> <</if>> <<if $secBots.troops < $secBots.maxTroops>> | diff --git a/src/endWeek/endWeekAnim.js b/src/endWeek/endWeekAnim.js index 0c6a94c40ac75f32b1134eb5b8c564a8d6f57e57..e331ef0ed53780009c6cef187fd4675fe6cd5d7d 100644 --- a/src/endWeek/endWeekAnim.js +++ b/src/endWeek/endWeekAnim.js @@ -21,10 +21,12 @@ App.UI.EndWeekAnim = (function() { function end() { if (loadLockID !== -1) { - infoDiv.remove(); - infoDiv = null; - setTimeout(LoadScreen.unlock(loadLockID), 0); - loadLockID = -1; + setTimeout(() => { + LoadScreen.unlock(loadLockID); + infoDiv.remove(); + infoDiv = null; + loadLockID = -1; + }, 0); } } diff --git a/src/js/porn.js b/src/js/porn.js index f646c25d68c73825a8a718a4be70d13bb9313073..29e8c142f9a41a613b38ff4da6ee7bfd72b3b014 100644 --- a/src/js/porn.js +++ b/src/js/porn.js @@ -620,10 +620,14 @@ App.Porn.getGenresByType = function(type) { return _.values(App.Porn.Genre).filter((g) => g.type === type); }; -/** Returns a string with the pipe-separated SugarCube links necessary to set any valid genre for this slave. +/** Returns the links necessary to set any valid porn genre for this slave. * @param {string} page SugarCube passage name to redirect to when the link is clicked + * @param {App.Entity.SlaveState} slave + * @returns {HTMLElement} */ App.Porn.genreChoiceLinks = function(page, slave) { - let makeLink = function(genre) { return App.UI.link(genre.uiName(), (s, g) => s.porn.focus = g.focusName, [slave, genre], page); }; - return this.getAllGenres().filter((g) => g.valid(slave)).map((g) => makeLink(g)).reduce((acc, cur) => `${acc} | ${cur}`); + let makeLink = (genre) => App.UI.DOM.link(genre.uiName(), (s, g) => s.porn.focus = g.focusName, [slave, genre], page); + let links = this.getAllGenres().filter((g) => g.valid(slave)).map(makeLink); + links.push(App.UI.DOM.link("No focus", (s) => s.porn.focus = "none", [slave], page)); + return App.UI.DOM.generateLinksStrip(links); }; diff --git a/src/uncategorized/slaveInteract.tw b/src/uncategorized/slaveInteract.tw index c80382f4ac85b0cd74029d32c7a8df79057db214..a8fb058ab4e56565d3236713c9025b0efecc246b 100644 --- a/src/uncategorized/slaveInteract.tw +++ b/src/uncategorized/slaveInteract.tw @@ -316,7 +316,7 @@ <<else>> You are focusing attention on the <<= getSlave($AS).porn.focus>> aspect of $his content. <</if>> - <<= App.Porn.genreChoiceLinks("Slave Interact", getSlave($AS))>> | [[No focus|Slave Interact][getSlave($AS).porn.focus = "none"]] + <<includeDOM App.Porn.genreChoiceLinks("Slave Interact", getSlave($AS))>> <</if>> <</if>> <</if>>