From 9133fd7649c163c75899ba9f2b8e1c72f16a229d Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 23 Jun 2019 20:06:47 +0100 Subject: Extract misc activities into a module --- scripts/toy.groovy | 11 ++--------- scripts/toy/misc.groovy | 10 ++++++++++ 2 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 scripts/toy/misc.groovy diff --git a/scripts/toy.groovy b/scripts/toy.groovy index 89344ef..4e030ae 100644 --- a/scripts/toy.groovy +++ b/scripts/toy.groovy @@ -260,12 +260,6 @@ return new Object() { }; // Play - def playNothing = { - (getRandom(3) + 2).times { - show(imageTagsComment(showImage([TITS]))); - wait(getRandom(10) + 10); - }; - }; def stateToyName = { state -> switch (state) { case CUFFED: @@ -325,9 +319,7 @@ return new Object() { adjustPunish(5); return false; }; - final activityList = [ - 'playNothing': playNothing, - ]; + final activityList = [:]; final addActivity = { String name, func -> activityList[name] = func; } @@ -774,6 +766,7 @@ return new Object() { * scripts/toy/humiliation.groovy * scripts/toy/imagery.groovy * scripts/toy/intro.groovy + * scripts/toy/misc.groovy * scripts/toy/orgasmControl.groovy * scripts/toy/pain.groovy * scripts/toy/sleep.groovy diff --git a/scripts/toy/misc.groovy b/scripts/toy/misc.groovy new file mode 100644 index 0000000..92af633 --- /dev/null +++ b/scripts/toy/misc.groovy @@ -0,0 +1,10 @@ +{ toy -> + toy.metaClass.playNothing { + (getRandom(3) + 2).times { + show(imageTagsComment(showImage([TITS]))); + pause(getRandom(10) + 10); + }; + }; + + toy.addActivity("playNothing", { toy.playNothing() }); +} -- cgit v1.2.3