unbreakable charms fix + versioning

This commit is contained in:
ReznoRMichael 2022-01-12 15:10:07 +01:00
parent 62d324d9e5
commit f3b6d21a7a
6 changed files with 57 additions and 8 deletions

View file

@ -1478,6 +1478,29 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
break; break;
/* Unobtainable Unbreakable Charms after Grimm Troupe Banishment */
case "fragileGreed_unbreakable":
case "fragileHealth_unbreakable":
case "fragileStrength_unbreakable":
/* backwards compatibility with earlier game versions */
if (playerData.hasOwnProperty(i) === false) {
(0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.SetIconNone)(section, i);
dataObject[i].disabled = true;
} else if (playerData[i] === true) {
(0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.SetIconGreen)(section, i);
} else {
/* If player doesn't have an Unbreakable Charm, and they Banished the Grimm Troupe, the entry needs to be disabled */
if (playerData.hasOwnProperty("destroyedNightmareLantern") && playerData.destroyedNightmareLantern === true) {
(0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.SetIconNone)(section, i);
dataObject[i].disabled = true;
} else {
(0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.SetIconRed)(section, i);
}
}
break;
default: default:
// backwards compatibility with earlier game versions // backwards compatibility with earlier game versions
if (playerData.hasOwnProperty(i) === false) { if (playerData.hasOwnProperty(i) === false) {

File diff suppressed because one or more lines are too long

View file

@ -301,15 +301,15 @@
<div style="margin-bottom: 20px;"></div> <div style="margin-bottom: 20px;"></div>
<p class="smalltext"> <p class="smalltext">
v1.5.0. Work-In-Progress. Feedback: <a v1.6.0. Work-In-Progress. Ideas &amp; Bug Reports: <a
href="https://steamcommunity.com/app/367520/discussions/0/2915472677711090083/" target="_blank"><i href="https://steamcommunity.com/app/367520/discussions/0/2915472677711090083/" target="_blank"><i
class="simpleicon-steam"></i>Steam Discussions</a> <a class="simpleicon-steam"></i>Steam Discussions</a> <a
href="https://steamcommunity.com/sharedfiles/filedetails/?id=2209910193" target="_blank"><i href="https://steamcommunity.com/sharedfiles/filedetails/?id=2209910193" target="_blank"><i
class="simpleicon-steam"></i>Steam Guide</a>.<br> class="simpleicon-steam"></i>Steam Guide</a>.<br>
Programmed, written and created by 🉑 <a href="https://github.com/ReznoRMichael/hollow-knight-completion-check" Programmed, written and created by 🉑 <a href="https://github.com/ReznoRMichael/hollow-knight-completion-check"
target="_blank">rezno[R]</a> &copy; 20202021<br> target="_blank">rezno[R]</a> &copy; 20202022<br>
<a href="https://store.steampowered.com/app/367520/Hollow_Knight/" target="_blank">Hollow Knight</a> by <a <a href="https://store.steampowered.com/app/367520/Hollow_Knight/" target="_blank">Hollow Knight</a> by <a
href="https://teamcherry.com.au/" target="_blank">Team Cherry</a> &copy; 20172021<br> href="https://teamcherry.com.au/" target="_blank">Team Cherry</a> &copy; 20172022<br>
</p> </p>
</div> <!-- end content --> </div> <!-- end content -->

View file

@ -1,6 +1,6 @@
{ {
"name": "hollow-knight-completion-check", "name": "hollow-knight-completion-check",
"version": "1.5.0", "version": "1.6.0",
"description": "Hollow Knight Save Game Completion Analyzer Web Tool", "description": "Hollow Knight Save Game Completion Analyzer Web Tool",
"main": "index.html", "main": "index.html",
"scripts": { "scripts": {

View file

@ -186,15 +186,15 @@
<div style="margin-bottom: 20px;"></div> <div style="margin-bottom: 20px;"></div>
<p class="smalltext"> <p class="smalltext">
v1.5.0. Work-In-Progress. Feedback: <a v1.6.0. Work-In-Progress. Ideas &amp; Bug Reports: <a
href="https://steamcommunity.com/app/367520/discussions/0/2915472677711090083/" target="_blank"><i href="https://steamcommunity.com/app/367520/discussions/0/2915472677711090083/" target="_blank"><i
class="simpleicon-steam"></i>Steam Discussions</a> <a class="simpleicon-steam"></i>Steam Discussions</a> <a
href="https://steamcommunity.com/sharedfiles/filedetails/?id=2209910193" target="_blank"><i href="https://steamcommunity.com/sharedfiles/filedetails/?id=2209910193" target="_blank"><i
class="simpleicon-steam"></i>Steam Guide</a>.<br> class="simpleicon-steam"></i>Steam Guide</a>.<br>
Programmed, written and created by 🉑 <a href="https://github.com/ReznoRMichael/hollow-knight-completion-check" Programmed, written and created by 🉑 <a href="https://github.com/ReznoRMichael/hollow-knight-completion-check"
target="_blank">rezno[R]</a> &copy; 20202021<br> target="_blank">rezno[R]</a> &copy; 20202022<br>
<a href="https://store.steampowered.com/app/367520/Hollow_Knight/" target="_blank">Hollow Knight</a> by <a <a href="https://store.steampowered.com/app/367520/Hollow_Knight/" target="_blank">Hollow Knight</a> by <a
href="https://teamcherry.com.au/" target="_blank">Team Cherry</a> &copy; 20172021<br> href="https://teamcherry.com.au/" target="_blank">Team Cherry</a> &copy; 20172022<br>
</p> </p>
</div> <!-- end content --> </div> <!-- end content -->

View file

@ -1643,6 +1643,32 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
break; break;
/* Unobtainable Unbreakable Charms after Grimm Troupe Banishment */
case "fragileGreed_unbreakable":
case "fragileHealth_unbreakable":
case "fragileStrength_unbreakable":
/* backwards compatibility with earlier game versions */
if (playerData.hasOwnProperty(i) === false) {
SetIconNone(section, i);
dataObject[i].disabled = true;
} else if (playerData[i] === true) {
SetIconGreen(section, i);
} else {
/* If player doesn't have an Unbreakable Charm, and they Banished the Grimm Troupe, the entry needs to be disabled */
if (playerData.hasOwnProperty("destroyedNightmareLantern") && playerData.destroyedNightmareLantern === true) {
SetIconNone(section, i);
dataObject[i].disabled = true;
} else {
SetIconRed(section, i);
}
}
break;
default: default:
// backwards compatibility with earlier game versions // backwards compatibility with earlier game versions