diff options
| author | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-06-18 13:37:21 +0100 |
|---|---|---|
| committer | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-06-19 17:41:01 +0100 |
| commit | 5f649909de9abb5b21d24650d92b229ea50cac4a (patch) | |
| tree | 5890ceeb620068dfafc195946eb38ada47806531 /scripts/toy.groovy | |
| parent | Initial dirty commit replacing most the back end with an LLM (diff) | |
| download | toy-5f649909de9abb5b21d24650d92b229ea50cac4a.zip | |
Keep modules in global scope
Diffstat (limited to 'scripts/toy.groovy')
| -rw-r--r-- | scripts/toy.groovy | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/toy.groovy b/scripts/toy.groovy index 651f5e6..c23e31c 100644 --- a/scripts/toy.groovy +++ b/scripts/toy.groovy @@ -45,6 +45,9 @@ 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"; + + def modules = []; + final getDomme = { domme, set = null -> def d = parseJsonFile("images/toy/$domme/person.json"); d.id = domme; @@ -60,7 +63,7 @@ return new Object() { Eval.me(s.text)(toy); }; }; - final eachModule = { modules, method, ... args -> + final eachModule = { method, ... args -> modules.collect { it[method]?.call(args) }; }; @@ -451,9 +454,9 @@ Complete the following JSON object, scoring each keyword between -10 and 10 agai OWNER = loadString("toy.owner"); loadDomme(OWNER); - def modules = loadModules(this); + modules = loadModules(this); execEvents(false); - eachModule(modules, "setup"); + eachModule("setup"); if (!loadEvents()) { show("Nothing to do."); |
