summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan.goodliffe@octal.co.uk>2026-06-18 13:37:21 +0100
committerDan Goodliffe <dan.goodliffe@octal.co.uk>2026-06-19 17:41:01 +0100
commit5f649909de9abb5b21d24650d92b229ea50cac4a (patch)
tree5890ceeb620068dfafc195946eb38ada47806531
parentInitial dirty commit replacing most the back end with an LLM (diff)
downloadtoy-5f649909de9abb5b21d24650d92b229ea50cac4a.zip
Keep modules in global scope
-rw-r--r--scripts/toy.groovy9
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.");