diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js index 8384df1ea27fff174778d02e04b8eb0ee3b92a40..f578b2cd9f480aac6d41eeedbc759128ad7e5677 100644 --- a/js/003-data/gameVariableData.js +++ b/js/003-data/gameVariableData.js @@ -3,6 +3,7 @@ App.Data.defaultGameStateVariables = { returnTo: "init", nextButton: "Continue", nextLink: "Alpha disclaimer", + storedLink: "", ver: 0, pmodVer: 0, releaseID: 0, diff --git a/src/data/backwardsCompatibility/backwardsCompatibility.js b/src/data/backwardsCompatibility/backwardsCompatibility.js index c44dbec42c59117d907e6d6a5548a24803793e92..2c06f990a9da8a46d026a9569063f625b5f5a719 100644 --- a/src/data/backwardsCompatibility/backwardsCompatibility.js +++ b/src/data/backwardsCompatibility/backwardsCompatibility.js @@ -20,9 +20,13 @@ App.Update.autoshred = function() { }; App.Update.setNonexistantProperties = function(obj, props) { + console.log(obj, props); let count = 0; for (const p of Object.getOwnPropertyNames(props)) { if (typeof obj[p] === "undefined") { + if (obj[p] !== props[p]) { + console.log("setting V." + p + " to ", props[p]); + } obj[p] = clone(props[p]); count++; } diff --git a/src/js/main.js b/src/js/main.js index daa41e8c67af728bc6d41b3c48a7dc80d26ddb80..89902d6ba07f7b0fa090ab430fcceaa41214e2af 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -127,27 +127,27 @@ App.MainView.useFucktoy = function(slave) { const optionDiv = document.createElement("div"); optionDiv.classList.add("indent"); - optionDiv.append(App.UI.DOM.passageLink(`Use ${his} mouth`, "FLips", setEnvironment(slave)), - " | ", App.UI.DOM.passageLink("Play with " + his + " tits", "FBoobs", setEnvironment(slave))); + optionDiv.append(App.UI.DOM.passageLink(`Use ${his} mouth`, "FLips", setEnvironment), + " | ", App.UI.DOM.passageLink("Play with " + his + " tits", "FBoobs", setEnvironment)); if (canDoVaginal(slave)) { - optionDiv.append(" | ", App.UI.DOM.passageLink(`Fuck ${him}`, "FVagina", setEnvironment(slave))); + optionDiv.append(" | ", App.UI.DOM.passageLink(`Fuck ${him}`, "FVagina", setEnvironment)); if (canDoAnal(slave)) { - optionDiv.append(" | ", App.UI.DOM.passageLink(`Use ${his} holes`, "FButt", setEnvironment(slave))); + optionDiv.append(" | ", App.UI.DOM.passageLink(`Use ${his} holes`, "FButt", setEnvironment)); } } if (canDoAnal(slave)) { - optionDiv.append(" | ", App.UI.DOM.passageLink(`Fuck ${his} ass`, "FAnus", setEnvironment(slave))); + optionDiv.append(" | ", App.UI.DOM.passageLink(`Fuck ${his} ass`, "FAnus", setEnvironment)); } if (canDoVaginal(slave) || canDoAnal(slave)) { if (slave.belly >= 300000) { - optionDiv.append(" | ", App.UI.DOM.passageLink(`Fuck ${him} over ${his} belly`, "FBellyFuck", setEnvironment(slave))); + optionDiv.append(" | ", App.UI.DOM.passageLink(`Fuck ${him} over ${his} belly`, "FBellyFuck", setEnvironment)); } } if (canPenetrate(slave)) { - optionDiv.append(" | ", App.UI.DOM.passageLink(`Ride ${him}`, "FDick", setEnvironment(slave))); + optionDiv.append(" | ", App.UI.DOM.passageLink(`Ride ${him}`, "FDick", setEnvironment)); } - optionDiv.append(" | ", App.UI.DOM.passageLink(`Abuse ${him}`, "FAbuse", setEnvironment(slave))); + optionDiv.append(" | ", App.UI.DOM.passageLink(`Abuse ${him}`, "FAbuse", setEnvironment)); div.append(optionDiv); } else { diff --git a/src/js/utilsFC.js b/src/js/utilsFC.js index 4c24b30c45cb81a6f48a4b67dd749ef35faa641c..8e368ddc3bf3d08551656bf06d62bba81e4704d3 100644 --- a/src/js/utilsFC.js +++ b/src/js/utilsFC.js @@ -2861,3 +2861,23 @@ window.generateSlaveID = function() { } return V.IDNumber++; }; + +window.ASDump = function() { + if ((typeof V.activeSlave === undefined) || (V.activeSlave === 0)) { + return `<span class="red">ERROR:</span> AS Dump, activeSlave invalid, returnTo is 'V.returnTo', previous passage was '${previous()}'. Please report this. `; + } else { + let SL = V.slaves.length; + let ID = V.activeSlave.ID; + if (V.i >= 0 && V.i < SL && V.slaves[V.i].ID === ID) { /* shortcut if V.i is already pointing to this slave */ + V.slaves[V.i] = V.activeSlave; + } else { + V.i = V.slaveIndices[ID]; // find V.i if exists + if (typeof V.i === undefined) { /* not found, so new slave */ + newSlave(V.activeSlave); + } else { + V.slaves[V.i] = V.activeSlave; + } + } + clearSummaryCache(V.activeSlave); + } +};