diff options
Diffstat (limited to 'scripts/toy/play.groovy')
-rw-r--r-- | scripts/toy/play.groovy | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/scripts/toy/play.groovy b/scripts/toy/play.groovy index da0bff2..cd71b1d 100644 --- a/scripts/toy/play.groovy +++ b/scripts/toy/play.groovy @@ -92,8 +92,23 @@ } final sessions = DOMME.sessions.findAll { s -> eval(s.require ?: true) }; final probabilities = sessions.withIndex().collect { s, idx -> [idx] * s.probability }.sum(); - final sessionIdx = probabilities[getRandom(probabilities.size)]; - sessions[sessionIdx].phases.forEach { phase -> + final session = sessions[probabilities[getRandom(probabilities.size)]]; + // Change if required + dress(session.phases + .collect { phase -> phase.activities + phase.intervals } + .flatten() + .unique() + .findAll { a -> a } + .collectMany { a -> activityList[a].images } + .unique(), { + present(null, [ + [ "Wait there while I change..."]]); + pause(5); + showButtonG("Yes, ${dommeTitle()}", "ok"); + showImage(null); + pause(randRange(40, 60)); + }); + session.phases.forEach { phase -> if (eval(phase.require ?: true)) { funcMap.select[phase.select ?: 'take'](eval(phase.number ?: 1), (phase.activities ?: []).collect { f -> funcMap.activities[f] }, |