grimm troupe backwards compatibility
This commit is contained in:
parent
eb5cb48027
commit
e4dd0ca37a
4 changed files with 35 additions and 7 deletions
File diff suppressed because one or more lines are too long
|
|
@ -14,7 +14,7 @@
|
||||||
position: 'bottom',
|
position: 'bottom',
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
displayTime: 0,
|
displayTime: 0,
|
||||||
text: 'This tool requires local cookies to work properly, and uses cookies for statistics. By using the tool you agree to store and read cookies depending on your browser\'s settings.',
|
text: 'This tool uses cookies for user convenience and statistics. By using the tool you agree to store and read cookies depending on your browser\'s settings.',
|
||||||
cookiePolicy: 'https://www.allaboutcookies.org/'
|
cookiePolicy: 'https://www.allaboutcookies.org/'
|
||||||
},
|
},
|
||||||
setCookie: function (name, value, expire) {
|
setCookie: function (name, value, expire) {
|
||||||
|
|
|
||||||
|
|
@ -176,9 +176,6 @@ function HKCheckCompletion(jsonObject) {
|
||||||
|
|
||||||
CheckIfDataTrue(HK.DIV_ID.grimmTroupe, HK.GRIMMTROUPE, HKPlayerData);
|
CheckIfDataTrue(HK.DIV_ID.grimmTroupe, HK.GRIMMTROUPE, HKPlayerData);
|
||||||
|
|
||||||
(HKPlayerData.grimmChildLevel >= 4) ? CurrentDataTrue(HK.DIV_ID.grimmTroupe): CurrentDataFalse();
|
|
||||||
FillHTML(HK.DIV_ID.grimmTroupe, "Nightmare King Grimm / Banishment", "Dirtmouth or Howling Cliffs");
|
|
||||||
|
|
||||||
// ---------------- Lifeblood Content Pack --------------------- //
|
// ---------------- Lifeblood Content Pack --------------------- //
|
||||||
|
|
||||||
CheckIfDataTrue(HK.DIV_ID.lifeblood, HK.LIFEBLOOD, HKPlayerData);
|
CheckIfDataTrue(HK.DIV_ID.lifeblood, HK.LIFEBLOOD, HKPlayerData);
|
||||||
|
|
@ -559,16 +556,43 @@ function CheckNotches(divId, totalNotches = 3, filledNotches = 0) {
|
||||||
* @param {object} playerData Reference/pointer to specific data where to search
|
* @param {object} playerData Reference/pointer to specific data where to search
|
||||||
*/
|
*/
|
||||||
function CheckIfDataTrue(divId, dataObject, playerData) {
|
function CheckIfDataTrue(divId, dataObject, playerData) {
|
||||||
|
|
||||||
|
let {textPrefix, textSuffix} = "";
|
||||||
|
|
||||||
for (let i in dataObject) {
|
for (let i in dataObject) {
|
||||||
|
|
||||||
|
textPrefix = dataObject[i].name;
|
||||||
|
textSuffix = dataObject[i].spoiler;
|
||||||
|
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case "gotCharm_36":
|
case "gotCharm_36":
|
||||||
// prevents green checkbox and adding 1% when only got one white fragment
|
// prevents green checkbox and adding 1% when only got one white fragment
|
||||||
(playerData.gotQueenFragment === true && playerData.gotKingFragment === true) ? CurrentDataTrue(divId): CurrentDataFalse();
|
(playerData.gotQueenFragment === true && playerData.gotKingFragment === true) ? CurrentDataTrue(divId): CurrentDataFalse();
|
||||||
break;
|
break;
|
||||||
|
case "gotCharm_37":
|
||||||
|
case "gotCharm_38":
|
||||||
|
case "gotCharm_39":
|
||||||
|
case "gotCharm_40":
|
||||||
|
case "killedGrimm":
|
||||||
|
case "grimmChildLevel":
|
||||||
|
// fades out the entries if save file is from older game versions
|
||||||
|
if (!playerData.hasOwnProperty(i)) {
|
||||||
|
CurrentDataBlank();
|
||||||
|
textPrefix = `<del>${textPrefix}</del>`;
|
||||||
|
textSuffix = `<del>${textSuffix}</del>`;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (i === "grimmChildLevel") {
|
||||||
|
(playerData.grimmChildLevel >= 4) ? CurrentDataTrue(divId): CurrentDataFalse();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
(playerData[i] === true) ? CurrentDataTrue(divId): CurrentDataFalse();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
(playerData[i] === true) ? CurrentDataTrue(divId): CurrentDataFalse();
|
(playerData[i] === true) ? CurrentDataTrue(divId): CurrentDataFalse();
|
||||||
}
|
}
|
||||||
FillHTML(divId, dataObject[i].name, dataObject[i].spoiler);
|
|
||||||
|
FillHTML(divId, textPrefix, textSuffix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -702,6 +702,10 @@ const HK = {
|
||||||
killedGrimm: {
|
killedGrimm: {
|
||||||
name: "Troupe Leader Grimm",
|
name: "Troupe Leader Grimm",
|
||||||
spoiler: "Dirtmouth, collect 6 flames"
|
spoiler: "Dirtmouth, collect 6 flames"
|
||||||
|
},
|
||||||
|
grimmChildLevel: {
|
||||||
|
name: "Nightmare King Grimm / Banishment",
|
||||||
|
spoiler: "Dirtmouth or Howling Cliffs"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
LIFEBLOOD: {
|
LIFEBLOOD: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue