From ce39480209c12531c244da8aa2bc92510ae1dc73 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 23 Mar 2019 13:07:47 +0000 Subject: Add debug option to trigger any activity --- scripts/toy.groovy | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scripts/toy.groovy') 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 ]); -- cgit v1.2.3