From 1fd98631ea2dfa2d842d513c1b5c427f92f6c38e Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 14 Jul 2019 13:27:56 +0100 Subject: Split get and load domme functions --- scripts/toy.groovy | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/toy.groovy b/scripts/toy.groovy index 507501c..bba3932 100644 --- a/scripts/toy.groovy +++ b/scripts/toy.groovy @@ -46,21 +46,25 @@ return new Object() { // Imagery final DRESSED = "dressed", TITS = "tits", PUSSY = "pussy", LINGERIE = "lingerie", TEASE = "tease", SIT = "sit", BOOTS = "boots", KNEEL = "kneel", STOOD = "stood", MEAN = "mean", CROP = "crop", ASS = "ass", SQUAT = "squat", SSSH = "sssh"; final nDRESSED = "!$DRESSED", nTITS = "!$TITS", nTEASE = "!$TEASE", nKNEEL = "!$KNEEL", nSQUAT = "!$SQUAT"; - final loadDomme = { domme, set = null -> + final getDomme = { domme, set = null -> final readDomme = { path -> if (!path) return [:]; final f = new File(path); if (!f.exists()) return [:]; return Eval.me(f.text); }; - DOMME = [ + def d = [ "$DATAFOLDER/images/toy/domme.groovy", "$DATAFOLDER/images/toy/$domme/person.groovy", "$DATAFOLDER/images/toy/$domme/$set/set.groovy" ] .collect { readDomme(it) } .sum(); - DOMME.id = domme; + d.id = domme; + return d; }; + final loadDomme = { domme, set = null -> + DOMME = getDomme(domme, set); + } final loadModules = { toy -> new File("$DATAFOLDER/scripts/toy") .listFiles() -- cgit v1.2.3