diff --git a/src/interaction/siWork.js b/src/interaction/siWork.js index 96fffbffa01e3a559d138d3f1ed43e3999731399..60390d9cd850879c9aacaae72b891dc8eb603c18 100644 --- a/src/interaction/siWork.js +++ b/src/interaction/siWork.js @@ -302,7 +302,7 @@ App.UI.SlaveInteract.work = function(slave, refresh) { /** * @typedef {Object} sexOption * @property {string} text "Link text" - * @property {string|Node} [scene] + * @property {string|function():Node} [scene] * @property {string} [goto] if another passage is needed * @property {Object} [updateSlave] update slave itself if needed, like {trust: 2}, * @property {Object} [update] updates V., @@ -319,7 +319,7 @@ App.UI.SlaveInteract.work = function(slave, refresh) { if (slave.fuckdoll === 0) { if (slave.vagina > -1) { if (canDoVaginal(slave)) { - sexOptions.push({text: `Fuck ${him}`, get scene() { return App.Interact.fVagina(slave); }}); + sexOptions.push({text: `Fuck ${him}`, scene: () => App.Interact.fVagina(slave)}); if (canDoAnal(slave)) { sexOptions.push({text: `Use ${his} holes`, scene: `fButt`}); } @@ -355,7 +355,7 @@ App.UI.SlaveInteract.work = function(slave, refresh) { sexOptions.push({text: `Use ${his} mouth`, scene: `fLips`}); sexOptions.push({text: `Kiss ${him}`, scene: `FKiss`}); if (hasAnyLegs(slave)) { - sexOptions.push({text: `Have ${him} dance for you`, get scene() { return App.Interact.fDance(slave); }}); + sexOptions.push({text: `Have ${him} dance for you`, scene: () => App.Interact.fDance(slave)}); } sexOptions.push({text: `Play with ${his} tits`, scene: `fBoobs`}); @@ -413,7 +413,7 @@ App.UI.SlaveInteract.work = function(slave, refresh) { if (canImpreg(slave, V.PC)) { sexOptions.push({ text: `Impregnate ${him} yourself`, - get scene() { return App.Interact.fPCImpreg(slave); }, + scene: () => App.Interact.fPCImpreg(slave), }); } if (canImpreg(slave, slave)) { @@ -556,19 +556,19 @@ App.UI.SlaveInteract.work = function(slave, refresh) { if (V.farmyardKennels > 0 && V.active.canine) { sexOptions.push({ text: `Have a ${V.active.canine.species} mount ${him}`, - get scene() { return App.Interact.fAnimal(slave, "canine"); }, + scene: () => App.Interact.fAnimal(slave, "canine"), }); } if (V.farmyardStables > 0 && V.active.hooved) { sexOptions.push({ text: `Let a ${V.active.hooved.species} mount ${him}`, - get scene() { return App.Interact.fAnimal(slave, "hooved"); }, + scene: () => App.Interact.fAnimal(slave, "hooved"), }); } if (V.farmyardCages > 0 && V.active.feline) { sexOptions.push({ text: `Have a ${V.active.feline.species} mount ${him}`, - get scene() { return App.Interact.fAnimal(slave, "feline"); }, + scene: () => App.Interact.fAnimal(slave, "feline"), }); } } @@ -689,7 +689,7 @@ App.UI.SlaveInteract.work = function(slave, refresh) { } } if (slave.fetish !== "mindbroken" && slave.accent < 4 && ((canTalk(slave)) || hasAnyArms(slave))) { - sexOptions.push({text: `Ask ${him} about ${his} feelings`, get scene() { return App.Interact.feelings(slave); }}); + sexOptions.push({text: `Ask ${him} about ${his} feelings`, scene: () => App.Interact.feelings(slave)}); if (V.PC.dick > 0) { sexOptions.push({text: `Make ${him} beg`, scene: `FBeg`}); } @@ -810,8 +810,8 @@ App.UI.SlaveInteract.work = function(slave, refresh) { if (typeof sexOption.scene === "string") { // Run scene and store render results temporarily frag = App.UI.DOM.renderPassage(sexOption.scene); - } else { - frag = sexOption.scene; + } else if (typeof sexOption.scene === "function") { + frag = sexOption.scene(); } // Refresh (clears scene display) refresh();