summaryrefslogtreecommitdiff
path: root/scripts/toy/play.groovy
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/toy/play.groovy')
-rw-r--r--scripts/toy/play.groovy5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/toy/play.groovy b/scripts/toy/play.groovy
index a383bef..bc0c954 100644
--- a/scripts/toy/play.groovy
+++ b/scripts/toy/play.groovy
@@ -318,5 +318,10 @@
toy.addNamedEvent(PLAY, { name, arg, schedTime, rt -> toy.playEvent(rt, arg) });
toy.addNamedEvent(RELEASEFROM, { name, arg, schedTime, rt -> toy.releaseFrom(rt, arg, name) });
toy.addNamedEvent(REDRESS, { name, arg, schedTime, rt -> toy.redress(rt) });
+ toy.TOYTOYS.each { toyState ->
+ toy.addRequestable("un$toyState".toString(), "May I be un-$toyState".toString(),
+ { toy.requestRelease(toyState) },
+ { toy.stateIs(toyState) })
+ };
toy.playSchedule();
}