summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-06-23 20:06:47 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2019-06-23 21:18:22 +0100
commit9133fd7649c163c75899ba9f2b8e1c72f16a229d (patch)
tree172f713fca2224bf36a6ac8b984ced78a5f78bb4 /scripts
parentDebug when loading modules (diff)
downloadtoy-9133fd7649c163c75899ba9f2b8e1c72f16a229d.zip
Extract misc activities into a module
Diffstat (limited to 'scripts')
-rw-r--r--scripts/toy.groovy11
-rw-r--r--scripts/toy/misc.groovy10
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() });
+}