diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-03-23 13:07:47 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-03-23 13:07:47 +0000 |
commit | ce39480209c12531c244da8aa2bc92510ae1dc73 (patch) | |
tree | 2bea9f996d655ca68b906556fe622a1b5f4c2749 /scripts/toy.groovy | |
parent | Move activity list global (diff) | |
download | toy-ce39480209c12531c244da8aa2bc92510ae1dc73.zip |
Add debug option to trigger any activity
Diffstat (limited to 'scripts/toy.groovy')
-rw-r--r-- | scripts/toy.groovy | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/toy.groovy b/scripts/toy.groovy index 13dfc20..e165733 100644 --- a/scripts/toy.groovy +++ b/scripts/toy.groovy @@ -1345,6 +1345,11 @@ def sessionRelease = { goodToy -> } show(null); }; +def playActivity = { + final keys = new ArrayList<?>(activityList.keySet()); + final act = getSelectedValue("Choose activity", keys); + activityList[keys[act]](); +}; def playWait = { present([DRESSED,nTEASE], [ ["Hello,", "Hi,", "Hey there,"], @@ -1831,6 +1836,7 @@ while (true) { if (is("DEBUG")) { opts.push([ lbl: "Status", act: setupShowState ]); opts.push([ lbl: "Play", act: playEvent, arg: true ]); + opts.push([ lbl: "Activity", act: playActivity ]); } if (is(NAKED)) { opts.push([ lbl: "May I wear clothes", act: requestClothes ]); |