From 6f219821d070adf8da54019d7d0c5ad2a5b7d3f7 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 23 Jun 2019 19:52:59 +0100 Subject: Move getSpoon --- scripts/toy.groovy | 20 -------------------- scripts/toy/cbt.groovy | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 20 deletions(-) (limited to 'scripts') diff --git a/scripts/toy.groovy b/scripts/toy.groovy index 3bf51a3..597433e 100644 --- a/scripts/toy.groovy +++ b/scripts/toy.groovy @@ -263,26 +263,6 @@ return new Object() { wait(getRandom(10) + 10); }; }; - def getSpoon = { - if (sessionToys.containsKey(SPOON)) { - present([DRESSED], [ - ["Pick up", "Grab"], - ["your", "that"], - ["wooden spoon"], - ["again."]]); - wait(10); - } - else { - present([DRESSED], [ - ["Go to the kitchen...", "From the kitchen..."], - ["bring me", "get yourself"], - ["a wooden spoon or similar."]]); - showButtonG("Yes, ${dommeTitle()}", "ok"); - wait(5); - showButtonGT("Back, ${dommeTitle()}", "back", 20, 1); - sessionToys[SPOON] = getTime(); - } - }; def stateToyName = { state -> switch (state) { case CUFFED: diff --git a/scripts/toy/cbt.groovy b/scripts/toy/cbt.groovy index 1492180..459f602 100644 --- a/scripts/toy/cbt.groovy +++ b/scripts/toy/cbt.groovy @@ -1,4 +1,25 @@ { toy -> + toy.metaClass.getSpoon { + if (sessionToys.containsKey(SPOON)) { + present([DRESSED], [ + ["Pick up", "Grab"], + ["your", "that"], + ["wooden spoon"], + ["again."]]); + pause(10); + } + else { + present([DRESSED], [ + ["Go to the kitchen...", "From the kitchen..."], + ["bring me", "get yourself"], + ["a wooden spoon or similar."]]); + showButtonG("Yes, ${dommeTitle()}", "ok"); + pause(5); + showButtonGT("Back, ${dommeTitle()}", "back", 20, 1); + sessionToys[SPOON] = getTime(); + } + }; + toy.metaClass.playBeatBalls = { final BEATS = [ // bpm:30, len:60 ], -- cgit v1.2.3