diff --git a/src/events/RESS/hotPC.js b/src/events/RESS/hotPC.js index bc44836db45a0b754cd648eaad33ad4eacc0fd9d..a77556321061b6d9b4a304955f76614341cd09de 100644 --- a/src/events/RESS/hotPC.js +++ b/src/events/RESS/hotPC.js @@ -166,7 +166,7 @@ App.Events.RESSHotPC = class RESSHotPC extends App.Events.BaseEvent { ? new App.Events.Result(`Fuck ${him} right here`, fuck, fuckNote()) : new App.Events.Result(fuckNote()), new App.Events.Result(`Have ${him} lick you clean`, lick), - ]); + ], "result2"); function fuck() { t = []; @@ -328,6 +328,7 @@ App.Events.RESSHotPC = class RESSHotPC extends App.Events.BaseEvent { seX(eventSlave, "oral", PC, "penetrative"); return t; } + return t; } diff --git a/src/events/eventUtils.js b/src/events/eventUtils.js index 9d3b23f75dc0fc0742faeecd824850d03febb0ef..8d67393b3c7a667a150b3b716395c4932b97b3d8 100644 --- a/src/events/eventUtils.js +++ b/src/events/eventUtils.js @@ -111,10 +111,10 @@ App.Events.Result = class { this.note = note; } - handle() { + handle(resultSpanID) { let frag = document.createDocumentFragment(); $(frag).append(App.Events.spaceSentences(this.handler())); - App.UI.DOM.replace("#result", frag); + App.UI.DOM.replace(`#${resultSpanID}`, frag); } /** build the response DOM (for use by addResponses) @@ -124,7 +124,7 @@ App.Events.Result = class { makeResponse(node) { let wrote = false; if (this.text && this.handler) { - node.appendChild(App.UI.DOM.link(this.text, () => this.handle())); + node.appendChild(App.UI.DOM.link(this.text, () => this.handle(node.id))); wrote = true; } if (this.note) { @@ -138,10 +138,11 @@ App.Events.Result = class { /** add a list of results for an event * @param {HTMLElement} node * @param {Array<App.Events.Result>} results + * @param {string} [elementID="result"] */ -App.Events.addResponses = function(node, results) { +App.Events.addResponses = function(node, results, elementID="result") { let resultSpan = document.createElement("span"); - resultSpan.id = "result"; + resultSpan.id = elementID; for (const result of results) { if (result.makeResponse(resultSpan)) { resultSpan.appendChild(document.createElement("br"));