diff --git a/game/03-JavaScript/eyesRelated.js b/game/03-JavaScript/eyesRelated.js index 8a302db6f16e7d9d37e2a7200cd5f64b42fe10bc..b310f1b802afde7e4367647a8e078b80674e3641 100644 --- a/game/03-JavaScript/eyesRelated.js +++ b/game/03-JavaScript/eyesRelated.js @@ -91,6 +91,16 @@ function restructureEyeColourVariable() { } V.objectVersion.eyeRepair = 2; break; + case 2: + /* If $makeup.eyelenses is not an object/is null. Of if it is, but left/right properties are undefined, rebuild it properly. */ + if (V.makeup.eyelenses == null || typeof V.makeup.eyelenses !== 'object' || V.makeup.eyelenses.left == undefined || V.makeup.eyelenses.left == undefined) { + V.makeup.eyelenses = { + 'left' : 0, + 'right' : 0 + }; + } + V.objectVersion.eyeRepair = 3; + break; } } window.restructureEyeColourVariable = restructureEyeColourVariable; diff --git a/game/03-JavaScript/save.js b/game/03-JavaScript/save.js index f394d7eff722d8fc25e74e8439b49c352837d511..5f6529765658e372f7efa85280ad095e6e4596b3 100644 --- a/game/03-JavaScript/save.js +++ b/game/03-JavaScript/save.js @@ -5,6 +5,10 @@ const DoLSave = ((Story, Save) => { const KEY_DETAILS = "dolSaveDetails"; function loadSave(saveSlot, confirm) { + if (V.ironmanmode === true && V.passage != "Start"){ + new Wikifier(null, "<<loadIronmanSafetyCancel " + saveSlot + ">>"); + return; + } if (V.confirmLoad === true && confirm === undefined) { new Wikifier(null, '<<loadConfirm ' + saveSlot + '>>'); } else { diff --git a/game/base-clothing/canvasmodel-img.twee b/game/base-clothing/canvasmodel-img.twee index 2192197d3d75eb0f905e4f2e456ecb4ca9e4b63f..13b1dee70d57d2c1b7ccd9ecc7f249a9472d8115 100644 --- a/game/base-clothing/canvasmodel-img.twee +++ b/game/base-clothing/canvasmodel-img.twee @@ -75,8 +75,8 @@ if ($skinColor.tanningEnabled is true){ <<set _modeloptions.left_eye = ($wraith and $wraith.state is "haunt" and !$schism ? "red possessed" : "blue possessed")>> <<set _modeloptions.right_eye = ($wraith and $wraith.state is "haunt" and !$schism ? "red possessed" : "blue possessed")>> <<else>> - <<set _modeloptions.left_eye = ($makeup.eyelenses.left != 0) ? $makeup.eyelenses.left : $leftEyeColour>> - <<set _modeloptions.right_eye = ($makeup.eyelenses.right != 0) ? $makeup.eyelenses.right : $rightEyeColour>> + <<set _modeloptions.left_eye = $makeup.eyelenses.left != 0 ? $makeup.eyelenses.left : $leftEyeColour>> + <<set _modeloptions.right_eye = $makeup.eyelenses.right != 0 ? $makeup.eyelenses.right : $rightEyeColour>> <</if>> <<set _modeloptions.hair_colour = $haircolour>> <<set _modeloptions.brows_colour = ($makeup.browscolour != 0 ? $makeup.browscolour : $naturalhaircolour)>> diff --git a/game/base-system/options.twee b/game/base-system/options.twee index c65cf986113c7a8f57f97752597eb3209bdcfe1d..3b9964bc445f1737e3a48b53a162a16f67e41a7f 100644 --- a/game/base-system/options.twee +++ b/game/base-system/options.twee @@ -518,6 +518,18 @@ Combat Controls: </div> <</widget>> +<<widget "loadBoxIronmanSafetyCancel">> +<div class="saveBorder"> + <h4 class="orange">Loading canceled.</h4> + <ul> + <li>Loading a save while being in-game with ironman mode activated will have you lose the current game.</li> + <li style="text-decoration: underline;">Save your game, then you can load the save you want.</li> + </ul> + <input type="button" class="saveMenuButton saveMenuConfirm" value="Cancel" onclick="resetSaveMenu();"/> + <br> +</div> +<</widget>> + <<widget "resetSaveMenu">> <<if document.getElementById("saveList") != null>> <<replace #saveList>> @@ -544,6 +556,12 @@ Combat Controls: <</replace>> <</widget>> +<<widget "loadIronmanSafetyCancel">> + <<replace #saveList>> + <<loadBoxIronmanSafetyCancel _args[0]>> + <</replace>> +<</widget>> + <<widget "loadIronmanCheater">> <<replace #saveList>> <<loadBoxIronmanCheater $args[0]>>