add description paragraph to bosses section

This commit is contained in:
ReznoRMichael 2021-07-12 23:03:34 +02:00
commit 0bcbd30e8f
9 changed files with 99 additions and 62 deletions

View file

@ -88,7 +88,7 @@ let benchmarkTimes = {
timeStart: 0,
timeEnd: 0
}
}
};
/* -------------------------- Functions ----------------------------- */
@ -1324,7 +1324,7 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
function CountMaps(mapArray) {
let totalMaps = 0;
for (let i = 0, len = mapArray.length; i < len; i++) {
if (playerData[mapArray[i]] === true) totalMaps++
if (playerData[mapArray[i]] === true) totalMaps++;
}
return totalMaps;
}

View file

@ -157,6 +157,7 @@ const HK = {
bosses: {
h2: "Bosses",
id: "hk-bosses",
description: "Bosses in this section are part of the Game Completion Percentage set by the game developers. Each boss from this list equals 1% Completion (to a total of 14%).",
percent: 0,
maxPercent: 14,
entries: {

View file

@ -354,6 +354,12 @@ function GenerateInnerHTML(db) {
default:
/* ###################### Create section descriptions under each H2 title ##################### */
if (sections[section].hasOwnProperty("description")) {
textFill += SectionDescription(sections[section]);
}
/* ###################### Create each single entry (from all other sections) ##################### */
for (let entry in entries) {
@ -477,6 +483,11 @@ function GenerateInnerHTML(db) {
benchmarkTimes.GenerateInnerHTML.timeEnd = new Date();
}
function SectionDescription(section) {
return `<p class="section-description">${section.description}</p>`;
}
function SectionStart(section) {
return `<div id="${section.id}">\n`;