diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-07-01 21:50:40 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-07-01 21:50:40 +0100 |
commit | abf821dffc053ec953d1c45529cb63a75914c451 (patch) | |
tree | a4d349d10fe45291dbdaf0f3a442ad7d6ff82eef | |
parent | pause time can be non-whole seconds (diff) | |
download | toy-abf821dffc053ec953d1c45529cb63a75914c451.zip |
No writes to parent vars from metaClass methods
-rw-r--r-- | scripts/toy.groovy | 1 | ||||
-rw-r--r-- | scripts/toy/orgasmControl.groovy | 2 | ||||
-rw-r--r-- | scripts/toy/play.groovy | 4 | ||||
-rw-r--r-- | scripts/toy/tease.groovy | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/scripts/toy.groovy b/scripts/toy.groovy index 4c487e6..295e500 100644 --- a/scripts/toy.groovy +++ b/scripts/toy.groovy @@ -300,6 +300,7 @@ return new Object() { adjustPunish(5); return false; }; + def setSessionAbort = { String r = null -> sessionAborted = r }; final activityList = [:]; final addActivity = { String name, func -> diff --git a/scripts/toy/orgasmControl.groovy b/scripts/toy/orgasmControl.groovy index fa440c5..6108012 100644 --- a/scripts/toy/orgasmControl.groovy +++ b/scripts/toy/orgasmControl.groovy @@ -14,7 +14,7 @@ present(null, [ ["Bah!", "Pfft. I'm very disappointed in you."], ["Ruin it.", "Don't touch it."]]); - toy.sessionAborted = CUM; + setSessionAbort(CUM); adjustPunish(80); } adjustPunish(taken * 10); diff --git a/scripts/toy/play.groovy b/scripts/toy/play.groovy index 53bf0f8..c7f00b3 100644 --- a/scripts/toy/play.groovy +++ b/scripts/toy/play.groovy @@ -151,8 +151,8 @@ pause(10); save("toy.lastPlay", getTime()); showLounge(); - sessionAborted = null; - sessionToys = [:]; + setSessionAbort(); + sessionToys.clear(); if (goodToy) { adjustPunish(-20); } diff --git a/scripts/toy/tease.groovy b/scripts/toy/tease.groovy index 5402084..b9472a2 100644 --- a/scripts/toy/tease.groovy +++ b/scripts/toy/tease.groovy @@ -33,7 +33,7 @@ if (showButtonG("Hard, ${dommeTitle()}", "hard", 30) == 30) { playBackgroundSound("toy/180bpm.mp3"); if (showButtonG("Hard, ${dommeTitle()}", "hard", 30) == 30) { - toy.sessionAborted = SOFT; + setSessionAbort(SOFT); present(imageSpec, [ ["Bah!", "Pathetic!"], ["That's no good to me!", "How do I have fun with that!?"]]); |