From cbd6292b0a0c28f2ec3be418b5df346a3c00dca5 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 23 Jun 2019 21:03:06 +0100 Subject: Extract debug functions into a module --- scripts/toy.groovy | 33 --------------------------------- 1 file changed, 33 deletions(-) (limited to 'scripts/toy.groovy') diff --git a/scripts/toy.groovy b/scripts/toy.groovy index 16df507..8ad391b 100644 --- a/scripts/toy.groovy +++ b/scripts/toy.groovy @@ -294,11 +294,6 @@ return new Object() { final addActivity = { String name, func -> activityList[name] = func; } - def playActivity = { - final keys = new ArrayList(activityList.keySet()); - final act = getSelectedValue("Choose activity", keys); - activityList[keys[act]](); - }; // Setup def setDefault = { prop, val -> if (loadString(prop) == null) { @@ -308,29 +303,6 @@ return new Object() { def namedEvents = [ permit: { name, arg, schedTime, rt -> givePermission(arg) } ]; - def setupShowState = { - def localTimeStr = localTimeOf(getTime()).format(soonFormatter); - show("localTime: $localTimeStr\noffsetSet: ${localTimeOffset()}\ntime_t: ${getTime()}"); - showButton("OK"); - show( - [CHASTE, COLLARED, CUFFED, CLAMPED, GAGGED, NAKED].collect { - def v = stateIs(it); - return "$it: $v\n".capitalize() - }.join()); - showButton("OK"); - show( - [BALLGAG, COLLAR, CLAMPS, CHASTITY, HANDCUFFS, DILDO].collect { - def v = has(it); - return "$it: $v\n".capitalize() - }.join()); - showButton("OK"); - show( - [BONDAGE, CBT, CHORES, PAIN].collect { - def v = likes(it); - return "$it: $v\n".capitalize() - }.join()); - showButton("OK"); - }; def showFaq = { useUrl("http://toy.randomdan.homeip.net/"); }; @@ -420,11 +392,6 @@ return new Object() { def opts = requestables.values().toList().findAll { it -> !it.cond || it.cond() }; - if (stateIs("DEBUG")) { - opts.push([ lbl: "Status", act: setupShowState ]); - opts.push([ lbl: "Play", act: { playEvent() }, arg: true ]); - opts.push([ lbl: "Activity", act: playActivity ]); - } TOYTOYS.findAll { stateIs(it) }.each { opts.push([ lbl: "May I be un-$it".toString(), act: { requestRelease() }, arg: it ]); }; -- cgit v1.2.3