From 9f62cfcd5fd2486330d8fa4212c8ded4b24c3f66 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 24 Mar 2019 19:54:26 +0000 Subject: Split domme config into default, person and set files --- images/toy/ancilla/domme.groovy | 90 ---------------------------------------- images/toy/ancilla/person.groovy | 4 ++ images/toy/domme.groovy | 88 +++++++++++++++++++++++++++++++++++++++ scripts/toy.groovy | 30 +++++++++++--- 4 files changed, 117 insertions(+), 95 deletions(-) delete mode 100644 images/toy/ancilla/domme.groovy create mode 100644 images/toy/ancilla/person.groovy create mode 100644 images/toy/domme.groovy diff --git a/images/toy/ancilla/domme.groovy b/images/toy/ancilla/domme.groovy deleted file mode 100644 index e175c08..0000000 --- a/images/toy/ancilla/domme.groovy +++ /dev/null @@ -1,90 +0,0 @@ -[ - name: 'Ancilla', - fullName: 'Ancilla Tilia', - title: 'Mistress', - sessions: [ - [ - theme: 'stroking and edging', - require: 'toy.prop.punishment < 50', - probability: 50, - phases: [ - [ - select: 'repeat', - number: 'toy.randRange(1, 3)', - activities: [ 'preRelease', 'preEdge', 'preGag', 'preClamps', 'preCollar', 'preStrip' ] - ], [ - select: 'repeat', - number: 'toy.randRange(1, 3)', - activities: [ 'playStrokes', 'playEdges' ], - intervals: [ null, 'intClamps', 'intSqueeze' ] - ], [ - select: 'take', - number: 'toy.randRange(0, 2)', - activities: [ 'postCum', 'postChastity' ] - ], [ - require: 'toy.can("perm_chaste")', - activities: [ 'postChastity' ] - ], [ - require: '!toy.sessionAborted() && !toy.can("cum")', - select: 'take', - number: 1, - activities: [ 'postPermitCum' ] - ] - ] - ], [ - theme: 'blowjob training', - require: 'toy.has("dildo")', - probability: 5, - phases: [ - [ - number: 'toy.randRange(1, 3)', - activities: [ 'preClamps', 'preCollar', 'preStrip' ] - ], [ - activities: [ 'playSuck' ] - ] - ] - ], [ - theme: 'reminder who\'s boss', - probability: 5, - phases: [ - [ - select: 'take', - number: 'toy.randRange(1, 4)', - activities: [ 'preGag', 'preClamps', 'preCollar', 'preStrip' ], - use: 'punishMultiply' - ], [ - select: 'repeat', - number: 'toy.randRange(2, 3)', - activities: [ 'playBeatCock', 'playBeatBalls', 'playClamps' ], - use: 'punishApply' - ] - ] - ], [ - theme: 'punishment', - require: 'toy.prop.punishment > 40', - probability: 50, - phases: [ - [ - activities: [ 'preChastity' ] - ], [ - select: 'take', - number: 'toy.randRange(1, 2 + ((toy.prop.punishment ?: 0) / 100))', - activities: [ 'preGag', 'preClamps', 'preCollar', 'preStrip' ], - use: 'punishMultiply' - ], [ - select: 'repeat', - number: 'toy.randRange(1, 2 + ((toy.prop.punishment ?: 0) / 100))', - activities: [ 'playKneel', 'playBeatCock', 'playBeatBalls', 'playClamps', 'playNothing' ], - use: 'punishApply' - ], [ - select: 'take', - number: 'toy.randRange(1, 2 + ((toy.prop.punishment ?: 0) / 100))', - activities: [ 'playBondage', 'playBeatCock', 'playBeatBalls', 'playClamps' ], - use: 'punishApply' - ], [ - activities: [ 'postChastity' ] - ] - ] - ] - ] -] diff --git a/images/toy/ancilla/person.groovy b/images/toy/ancilla/person.groovy new file mode 100644 index 0000000..5631510 --- /dev/null +++ b/images/toy/ancilla/person.groovy @@ -0,0 +1,4 @@ +[ + name: 'Ancilla', + fullName: 'Ancilla Tilia' +] diff --git a/images/toy/domme.groovy b/images/toy/domme.groovy new file mode 100644 index 0000000..14748b9 --- /dev/null +++ b/images/toy/domme.groovy @@ -0,0 +1,88 @@ +[ + title: 'Mistress', + sessions: [ + [ + theme: 'stroking and edging', + require: 'toy.prop.punishment < 50', + probability: 50, + phases: [ + [ + select: 'repeat', + number: 'toy.randRange(1, 3)', + activities: [ 'preRelease', 'preEdge', 'preGag', 'preClamps', 'preCollar', 'preStrip' ] + ], [ + select: 'repeat', + number: 'toy.randRange(1, 3)', + activities: [ 'playStrokes', 'playEdges' ], + intervals: [ null, 'intClamps', 'intSqueeze' ] + ], [ + select: 'take', + number: 'toy.randRange(0, 2)', + activities: [ 'postCum', 'postChastity' ] + ], [ + require: 'toy.can("perm_chaste")', + activities: [ 'postChastity' ] + ], [ + require: '!toy.sessionAborted() && !toy.can("cum")', + select: 'take', + number: 1, + activities: [ 'postPermitCum' ] + ] + ] + ], [ + theme: 'blowjob training', + require: 'toy.has("dildo")', + probability: 5, + phases: [ + [ + number: 'toy.randRange(1, 3)', + activities: [ 'preClamps', 'preCollar', 'preStrip' ] + ], [ + activities: [ 'playSuck' ] + ] + ] + ], [ + theme: 'reminder who\'s boss', + probability: 5, + phases: [ + [ + select: 'take', + number: 'toy.randRange(1, 4)', + activities: [ 'preGag', 'preClamps', 'preCollar', 'preStrip' ], + use: 'punishMultiply' + ], [ + select: 'repeat', + number: 'toy.randRange(2, 3)', + activities: [ 'playBeatCock', 'playBeatBalls', 'playClamps' ], + use: 'punishApply' + ] + ] + ], [ + theme: 'punishment', + require: 'toy.prop.punishment > 40', + probability: 50, + phases: [ + [ + activities: [ 'preChastity' ] + ], [ + select: 'take', + number: 'toy.randRange(1, 2 + ((toy.prop.punishment ?: 0) / 100))', + activities: [ 'preGag', 'preClamps', 'preCollar', 'preStrip' ], + use: 'punishMultiply' + ], [ + select: 'repeat', + number: 'toy.randRange(1, 2 + ((toy.prop.punishment ?: 0) / 100))', + activities: [ 'playKneel', 'playBeatCock', 'playBeatBalls', 'playClamps', 'playNothing' ], + use: 'punishApply' + ], [ + select: 'take', + number: 'toy.randRange(1, 2 + ((toy.prop.punishment ?: 0) / 100))', + activities: [ 'playBondage', 'playBeatCock', 'playBeatBalls', 'playClamps' ], + use: 'punishApply' + ], [ + activities: [ 'postChastity' ] + ] + ] + ] + ] +] diff --git a/scripts/toy.groovy b/scripts/toy.groovy index 0464e23..994af35 100644 --- a/scripts/toy.groovy +++ b/scripts/toy.groovy @@ -75,6 +75,20 @@ final IMAGEDATA = { ] }; }(); +def loadDomme = { domme, set = null -> + final readDomme = { path -> + if (!path) return [:]; + final f = new File(path); + if (!f.exists()) return [:]; + return Eval.me(f.text); + }; + return [ + "$DATAFOLDER/images/toy/domme.groovy", + "$DATAFOLDER/images/toy/$domme/person.groovy", + "$DATAFOLDER/images/toy/$domme/$set/set.groovy" ] + .collect { readDomme(it) } + .sum() +}; def selectImage = { domme, set, spec -> def meets = { i -> return spec.every({ s -> @@ -119,6 +133,7 @@ def dress = { specs -> if (prev) { prev = prev.sets[outfit]; if (prev && specs.every({ spec -> selectImage(OWNER, prev.set, spec)})) { + DOMME = loadDomme(OWNER, outfit); return outfit; } } @@ -128,6 +143,7 @@ def dress = { specs -> showPopup("No outfit for $OWNER : $specs"); save("toy.owner.outfit", null); save("toy.owner.outfitTime", null); + DOMME = loadDomme(OWNER, outfit); return; } save("toy.owner.outfit", outfit.set); @@ -159,11 +175,13 @@ def getProp = {i, f, d = null -> return v; }; def getDommeProp = { i, d = null -> + if (DOMME == null) return d; final v = DOMME[i]; if (v == null) return d; return v; }; def dommeTitle = { getDommeProp("title", "Mistress") }; +def dommeName = { getDommeProp("name", "") }; def loadB = { p -> loadBoolean(p)}; def loadI = { p -> loadInteger(p)}; def loadS = { p -> loadString(p)}; @@ -1729,6 +1747,7 @@ def beginPlan = { rt, plan, args -> else if (has(CHASTITY) && !is(CHASTE)) { leaveNote("I want you in chastity until I return!", CHASTE); } + DOMME = loadDomme(OWNER); setAway(plan); removeEvent(PLAY); showLounge(); @@ -1850,7 +1869,7 @@ def setupShowCalendar = { // GO! setDefault("toy.owner", "ancilla"); OWNER = loadString("toy.owner"); -DOMME = Eval.me(new File("$DATAFOLDER/images/toy/$OWNER/domme.groovy").text); +DOMME = loadDomme(OWNER); def getDayNum = { Math.floorDiv(getTime() + localTimeOffset() - 14400, 86400) }; def getAvail = { dayNum -> loadInteger("toy.availability.$dayNum") ?: 0 }; def addAvail = { amount -> @@ -1883,7 +1902,7 @@ while (true) { def note = loadString("toy.note"); def noteInstr = loadString("toy.noteInstr"); if (note) { - show("${dommeTitle()} is away ($away)... but you find a note:\n$note"); + show("${dommeTitle()} ${dommeName()} is away ($away)... but you find a note:\n$note"); showButton("OK"); if (noteInstr) { set(noteInstr, true); @@ -1891,7 +1910,7 @@ while (true) { readNote(); } else { - show("${dommeTitle()} is away ($away)..."); + show("${dommeTitle()} ${dommeName()} is away ($away)..."); } if (e && e.event && e.event.time > getTime()) { wait(e.event.time - getTime()); @@ -1903,7 +1922,7 @@ while (true) { show("$e.name: $timeStr -> ${e.event.func}(${e.event.arg})"); } else { - show("${dommeTitle()} will summon you when required."); + show("${dommeTitle()} ${dommeName()} will summon you when required."); } final waitTime = Math.min(cycleTime, e.event.time - getTime()); final clickTime = showButton("Please, ${dommeTitle()}?", waitTime); @@ -2010,7 +2029,8 @@ while (true) { * images/toy/ancilla/pink/9.jpg * images/toy/ancilla/pink/tags * images/toy/ancilla/lounge.jpg - * images/toy/ancilla/domme.groovy + * images/toy/ancilla/person.groovy + * images/toy/domme.groovy * sounds/toy/165bpm.mp3 * sounds/toy/180bpm.mp3 * sounds/toy/240bpm.mp3 -- cgit v1.2.3