diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-06-23 20:06:47 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-06-23 21:18:22 +0100 |
commit | 9133fd7649c163c75899ba9f2b8e1c72f16a229d (patch) | |
tree | 172f713fca2224bf36a6ac8b984ced78a5f78bb4 /scripts | |
parent | Debug when loading modules (diff) | |
download | toy-9133fd7649c163c75899ba9f2b8e1c72f16a229d.zip |
Extract misc activities into a module
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/toy.groovy | 11 | ||||
-rw-r--r-- | scripts/toy/misc.groovy | 10 |
2 files changed, 12 insertions, 9 deletions
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() }); +} |