don't display amount for disabled entry
This commit is contained in:
parent
e15f5d4fe4
commit
49bafb7fde
4 changed files with 53 additions and 3 deletions
27
build/app.js
27
build/app.js
|
|
@ -453,6 +453,7 @@ function CheckIfDataTrue(section, dataObject, playerData) {
|
||||||
// fades out the entries if save file is from older game versions
|
// fades out the entries if save file is from older game versions
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank(section, i);
|
CurrentDataBlank(section, i);
|
||||||
|
dataObject[i].disabled = true;
|
||||||
textPrefix = "<del>".concat(textPrefix, "</del>");
|
textPrefix = "<del>".concat(textPrefix, "</del>");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -494,6 +495,7 @@ function CheckIfDataTrue(section, dataObject, playerData) {
|
||||||
|
|
||||||
if (checkText === "PropertyNotFound") {
|
if (checkText === "PropertyNotFound") {
|
||||||
CurrentDataBlank(section, i);
|
CurrentDataBlank(section, i);
|
||||||
|
dataObject[i].disabled = true;
|
||||||
textPrefix = "<del>".concat(textPrefix, "</del>");
|
textPrefix = "<del>".concat(textPrefix, "</del>");
|
||||||
break;
|
break;
|
||||||
} else if (checkText === "PantheonCompleted") {
|
} else if (checkText === "PantheonCompleted") {
|
||||||
|
|
@ -742,9 +744,11 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
// backwards compatibility with earlier game versions
|
// backwards compatibility with earlier game versions
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank(section, i);
|
CurrentDataBlank(section, i);
|
||||||
|
dataObject[i].disabled = true;
|
||||||
textPrefix = "<del>".concat(dataObject[i].name, "</del>");
|
textPrefix = "<del>".concat(dataObject[i].name, "</del>");
|
||||||
break;
|
break;
|
||||||
} else if (playerData.zoteDead === true || playerData.zoteRescuedBuzzer === false && playerData.hasWalljump === true) {
|
} else if (playerData.zoteDead === true || playerData.zoteRescuedBuzzer === false && playerData.hasWalljump === true) {
|
||||||
|
dataObject[i].disabled = true;
|
||||||
textPrefix = "<del>".concat(textPrefix, "</del>");
|
textPrefix = "<del>".concat(textPrefix, "</del>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -753,6 +757,7 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
// backwards compatibility with earlier game versions
|
// backwards compatibility with earlier game versions
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank(section, i);
|
CurrentDataBlank(section, i);
|
||||||
|
dataObject[i].disabled = true;
|
||||||
textPrefix = "<del>".concat(dataObject[i].name, "</del>");
|
textPrefix = "<del>".concat(dataObject[i].name, "</del>");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -773,6 +778,7 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
// fade out if not on Steel Soul
|
// fade out if not on Steel Soul
|
||||||
if (playerData.permadeathMode < 1) {
|
if (playerData.permadeathMode < 1) {
|
||||||
CurrentDataBlank(section, i);
|
CurrentDataBlank(section, i);
|
||||||
|
dataObject[i].disabled = true;
|
||||||
textPrefix = "<del>".concat(textPrefix, "</del>");
|
textPrefix = "<del>".concat(textPrefix, "</del>");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -857,6 +863,7 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
case "bossDoorStateTier5":
|
case "bossDoorStateTier5":
|
||||||
if (playerData.hasOwnProperty("bossDoorStateTier5") === false) {
|
if (playerData.hasOwnProperty("bossDoorStateTier5") === false) {
|
||||||
CurrentDataBlank(section, i);
|
CurrentDataBlank(section, i);
|
||||||
|
dataObject[i].disabled = true;
|
||||||
textPrefix = "<del>".concat(textPrefix, "</del>");
|
textPrefix = "<del>".concat(textPrefix, "</del>");
|
||||||
} else {
|
} else {
|
||||||
playerData[i].completed === true ? CurrentDataTrue(section, i) : CurrentDataFalse(section, i);
|
playerData[i].completed === true ? CurrentDataTrue(section, i) : CurrentDataFalse(section, i);
|
||||||
|
|
@ -867,6 +874,7 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
case "killsBindingSeal":
|
case "killsBindingSeal":
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank(section, i);
|
CurrentDataBlank(section, i);
|
||||||
|
dataObject[i].disabled = true;
|
||||||
textPrefix = "<del>".concat(textPrefix, "</del>");
|
textPrefix = "<del>".concat(textPrefix, "</del>");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -881,6 +889,7 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
case "killedVoidIdol_1":
|
case "killedVoidIdol_1":
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank(section, i);
|
CurrentDataBlank(section, i);
|
||||||
|
dataObject[i].disabled = true;
|
||||||
textPrefix = "<del>".concat(textPrefix, "</del>");
|
textPrefix = "<del>".concat(textPrefix, "</del>");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -892,6 +901,7 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
case "killedVoidIdol_2":
|
case "killedVoidIdol_2":
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank(section, i);
|
CurrentDataBlank(section, i);
|
||||||
|
dataObject[i].disabled = true;
|
||||||
textPrefix = "<del>".concat(textPrefix, "</del>");
|
textPrefix = "<del>".concat(textPrefix, "</del>");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -904,9 +914,11 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
// compatibility with earlier game versions
|
// compatibility with earlier game versions
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank(section, i);
|
CurrentDataBlank(section, i);
|
||||||
|
dataObject[i].disabled = true;
|
||||||
textPrefix = "<del>".concat(textPrefix, "</del>");
|
textPrefix = "<del>".concat(textPrefix, "</del>");
|
||||||
break;
|
break;
|
||||||
} else if (playerData.zoteDead === true || playerData.zoteRescuedBuzzer === false && playerData.hasWalljump === true) {
|
} else if (playerData.zoteDead === true || playerData.zoteRescuedBuzzer === false && playerData.hasWalljump === true) {
|
||||||
|
dataObject[i].disabled = true;
|
||||||
textPrefix = "<del>".concat(textPrefix, "</del>");
|
textPrefix = "<del>".concat(textPrefix, "</del>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -982,6 +994,7 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
// backwards compatibility with earlier game versions
|
// backwards compatibility with earlier game versions
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank(section, i);
|
CurrentDataBlank(section, i);
|
||||||
|
dataObject[i].disabled = true;
|
||||||
textPrefix = "<del>".concat(dataObject[i].name, "</del>");
|
textPrefix = "<del>".concat(dataObject[i].name, "</del>");
|
||||||
break;
|
break;
|
||||||
} else if (playerData[i] === true) {
|
} else if (playerData[i] === true) {
|
||||||
|
|
@ -5222,7 +5235,13 @@ function SingleEntryFill(section, entry) {
|
||||||
spoiler = ["<span class='spoiler-text'>", "</span>"];
|
spoiler = ["<span class='spoiler-text'>", "</span>"];
|
||||||
|
|
||||||
if (entry.hasOwnProperty("amount")) {
|
if (entry.hasOwnProperty("amount")) {
|
||||||
textPrefix += ": ".concat(entry.amount);
|
if (entry.hasOwnProperty("disabled")) {
|
||||||
|
if (entry.disabled !== true) {
|
||||||
|
textPrefix += ": ".concat(entry.amount);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
textPrefix += ": ".concat(entry.amount);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entry.hasOwnProperty("amountTotal")) {
|
if (entry.hasOwnProperty("amountTotal")) {
|
||||||
|
|
@ -5240,6 +5259,12 @@ function SingleEntryFill(section, entry) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (entry.hasOwnProperty("disabled")) {
|
||||||
|
if (entry.disabled === true) {
|
||||||
|
textPrefix = "<del>".concat(textPrefix, "</del>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (textSuffix.length && textPrefix.length) textSuffix = "\u2014 ".concat(textSuffix);
|
if (textSuffix.length && textPrefix.length) textSuffix = "\u2014 ".concat(textSuffix);
|
||||||
if (textPrefix.includes("<del>")) textSuffix = "<del>".concat(textSuffix, "</del>");
|
if (textPrefix.includes("<del>")) textSuffix = "<del>".concat(textSuffix, "</del>");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -552,6 +552,7 @@ function CheckIfDataTrue(section, dataObject, playerData, worldData = []) {
|
||||||
// fades out the entries if save file is from older game versions
|
// fades out the entries if save file is from older game versions
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank(section, i);
|
CurrentDataBlank(section, i);
|
||||||
|
dataObject[i].disabled = true;
|
||||||
textPrefix = `<del>${textPrefix}</del>`;
|
textPrefix = `<del>${textPrefix}</del>`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -590,6 +591,7 @@ function CheckIfDataTrue(section, dataObject, playerData, worldData = []) {
|
||||||
checkText = CheckGodmasterDoors(dataObject[i], playerData);
|
checkText = CheckGodmasterDoors(dataObject[i], playerData);
|
||||||
if (checkText === "PropertyNotFound") {
|
if (checkText === "PropertyNotFound") {
|
||||||
CurrentDataBlank(section, i);
|
CurrentDataBlank(section, i);
|
||||||
|
dataObject[i].disabled = true;
|
||||||
textPrefix = `<del>${textPrefix}</del>`;
|
textPrefix = `<del>${textPrefix}</del>`;
|
||||||
break;
|
break;
|
||||||
} else if (checkText === "PantheonCompleted") {
|
} else if (checkText === "PantheonCompleted") {
|
||||||
|
|
@ -838,9 +840,11 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
// backwards compatibility with earlier game versions
|
// backwards compatibility with earlier game versions
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank(section, i);
|
CurrentDataBlank(section, i);
|
||||||
|
dataObject[i].disabled = true;
|
||||||
textPrefix = `<del>${dataObject[i].name}</del>`;
|
textPrefix = `<del>${dataObject[i].name}</del>`;
|
||||||
break;
|
break;
|
||||||
} else if (playerData.zoteDead === true || (playerData.zoteRescuedBuzzer === false && playerData.hasWalljump === true)) {
|
} else if (playerData.zoteDead === true || (playerData.zoteRescuedBuzzer === false && playerData.hasWalljump === true)) {
|
||||||
|
dataObject[i].disabled = true;
|
||||||
textPrefix = `<del>${textPrefix}</del>`;
|
textPrefix = `<del>${textPrefix}</del>`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -849,6 +853,7 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
// backwards compatibility with earlier game versions
|
// backwards compatibility with earlier game versions
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank(section, i);
|
CurrentDataBlank(section, i);
|
||||||
|
dataObject[i].disabled = true;
|
||||||
textPrefix = `<del>${dataObject[i].name}</del>`;
|
textPrefix = `<del>${dataObject[i].name}</del>`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -870,6 +875,7 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
// fade out if not on Steel Soul
|
// fade out if not on Steel Soul
|
||||||
if (playerData.permadeathMode < 1) {
|
if (playerData.permadeathMode < 1) {
|
||||||
CurrentDataBlank(section, i);
|
CurrentDataBlank(section, i);
|
||||||
|
dataObject[i].disabled = true;
|
||||||
textPrefix = `<del>${textPrefix}</del>`;
|
textPrefix = `<del>${textPrefix}</del>`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -954,6 +960,7 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
case "bossDoorStateTier5":
|
case "bossDoorStateTier5":
|
||||||
if (playerData.hasOwnProperty("bossDoorStateTier5") === false) {
|
if (playerData.hasOwnProperty("bossDoorStateTier5") === false) {
|
||||||
CurrentDataBlank(section, i);
|
CurrentDataBlank(section, i);
|
||||||
|
dataObject[i].disabled = true;
|
||||||
textPrefix = `<del>${textPrefix}</del>`;
|
textPrefix = `<del>${textPrefix}</del>`;
|
||||||
} else {
|
} else {
|
||||||
(playerData[i].completed === true) ? CurrentDataTrue(section, i): CurrentDataFalse(section, i);
|
(playerData[i].completed === true) ? CurrentDataTrue(section, i): CurrentDataFalse(section, i);
|
||||||
|
|
@ -963,6 +970,7 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
case "killsBindingSeal":
|
case "killsBindingSeal":
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank(section, i);
|
CurrentDataBlank(section, i);
|
||||||
|
dataObject[i].disabled = true;
|
||||||
textPrefix = `<del>${textPrefix}</del>`;
|
textPrefix = `<del>${textPrefix}</del>`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -976,6 +984,7 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
case "killedVoidIdol_1":
|
case "killedVoidIdol_1":
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank(section, i);
|
CurrentDataBlank(section, i);
|
||||||
|
dataObject[i].disabled = true;
|
||||||
textPrefix = `<del>${textPrefix}</del>`;
|
textPrefix = `<del>${textPrefix}</del>`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -986,6 +995,7 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
case "killedVoidIdol_2":
|
case "killedVoidIdol_2":
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank(section, i);
|
CurrentDataBlank(section, i);
|
||||||
|
dataObject[i].disabled = true;
|
||||||
textPrefix = `<del>${textPrefix}</del>`;
|
textPrefix = `<del>${textPrefix}</del>`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -997,9 +1007,11 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
// compatibility with earlier game versions
|
// compatibility with earlier game versions
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank(section, i);
|
CurrentDataBlank(section, i);
|
||||||
|
dataObject[i].disabled = true;
|
||||||
textPrefix = `<del>${textPrefix}</del>`;
|
textPrefix = `<del>${textPrefix}</del>`;
|
||||||
break;
|
break;
|
||||||
} else if (playerData.zoteDead === true || (playerData.zoteRescuedBuzzer === false && playerData.hasWalljump === true)) {
|
} else if (playerData.zoteDead === true || (playerData.zoteRescuedBuzzer === false && playerData.hasWalljump === true)) {
|
||||||
|
dataObject[i].disabled = true;
|
||||||
textPrefix = `<del>${textPrefix}</del>`;
|
textPrefix = `<del>${textPrefix}</del>`;
|
||||||
}
|
}
|
||||||
(playerData[i] === true) ? CurrentDataTrue(section, i): CurrentDataBlank(section, i);
|
(playerData[i] === true) ? CurrentDataTrue(section, i): CurrentDataBlank(section, i);
|
||||||
|
|
@ -1070,6 +1082,7 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
// backwards compatibility with earlier game versions
|
// backwards compatibility with earlier game versions
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank(section, i);
|
CurrentDataBlank(section, i);
|
||||||
|
dataObject[i].disabled = true;
|
||||||
textPrefix = `<del>${dataObject[i].name}</del>`;
|
textPrefix = `<del>${dataObject[i].name}</del>`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -439,7 +439,13 @@ function SingleEntryFill(section, entry) {
|
||||||
spoiler = ["<span class='spoiler-text'>", "</span>"];
|
spoiler = ["<span class='spoiler-text'>", "</span>"];
|
||||||
|
|
||||||
if (entry.hasOwnProperty("amount")) {
|
if (entry.hasOwnProperty("amount")) {
|
||||||
textPrefix += `: ${entry.amount}`;
|
if (entry.hasOwnProperty("disabled")) {
|
||||||
|
if (entry.disabled !== true) {
|
||||||
|
textPrefix += `: ${entry.amount}`;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
textPrefix += `: ${entry.amount}`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entry.hasOwnProperty("amountTotal")) {
|
if (entry.hasOwnProperty("amountTotal")) {
|
||||||
|
|
@ -460,6 +466,12 @@ function SingleEntryFill(section, entry) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (entry.hasOwnProperty("disabled")) {
|
||||||
|
if (entry.disabled === true) {
|
||||||
|
textPrefix = `<del>${textPrefix}</del>`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (textSuffix.length && textPrefix.length) textSuffix = `— ${textSuffix}`;
|
if (textSuffix.length && textPrefix.length) textSuffix = `— ${textSuffix}`;
|
||||||
if (textPrefix.includes("<del>")) textSuffix = `<del>${textSuffix}</del>`;
|
if (textPrefix.includes("<del>")) textSuffix = `<del>${textSuffix}</del>`;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue