From 7efd85325351dc14a60206eef3cd48f0cd6ca622 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 30 Jan 2019 21:18:41 +0000 Subject: Load the DOMME object --- scripts/toy.groovy | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts/toy.groovy') diff --git a/scripts/toy.groovy b/scripts/toy.groovy index 70848fc..42b78f1 100644 --- a/scripts/toy.groovy +++ b/scripts/toy.groovy @@ -36,6 +36,7 @@ final FRIENDS = [ "Tori", "Sophie", "Krystal" ]; // toy.position final KNEELING = "kneeling", ALLFOURS = "allfours", STANDING = "standing"; def OWNER = null; +def DOMME = null; final SITTER = "sarah-james"; final SOFT = "soft"; @@ -1617,6 +1618,7 @@ def setupShowCalendar = { // GO! setDefault("toy.owner", "ancilla"); OWNER = loadString("toy.owner"); +DOMME = Eval.me(new File("$DATAFOLDER/images/toy/$OWNER/domme.groovy").text); def getDayNum = { Math.floorDiv(getTime() + localTimeOffset() - 14400, 86400) }; def getAvail = { dayNum -> loadInteger("toy.availability.$dayNum") ?: 0 }; def addAvail = { amount -> @@ -1690,7 +1692,7 @@ while (true) { opts.push([ lbl: "May I be un-$it".toString(), act: requestRelease, arg: it ]); }; opts.push([ lbl: "Back", act: null ]); - def opt = getSelectedValue("Yes, toy?", opts.collect { it.lbl }); + def opt = getSelectedValue(is("DEBUG") ? DOMME : "Yes, toy?", opts.collect { it.lbl }); def act = opts[opt].act; if (act) act(opts[opt].arg); @@ -1775,6 +1777,7 @@ while (true) { * images/toy/ancilla/pink/9.jpg * images/toy/ancilla/pink/tags * images/toy/ancilla/lounge.jpg + * images/toy/ancilla/domme.groovy * sounds/toy/165bpm.mp3 * sounds/toy/180bpm.mp3 * sounds/toy/240bpm.mp3 -- cgit v1.2.3