summaryrefslogtreecommitdiff
path: root/scripts/toy/play.groovy
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/toy/play.groovy')
-rw-r--r--scripts/toy/play.groovy10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/toy/play.groovy b/scripts/toy/play.groovy
index c7f00b3..da0bff2 100644
--- a/scripts/toy/play.groovy
+++ b/scripts/toy/play.groovy
@@ -14,7 +14,7 @@
];
def apply = { activitity, use = null ->
if (!activitity) return;
- def val = activitity();
+ def val = activitity.func();
playBackgroundSound(null);
if (use && val instanceof Number) {
use(val);
@@ -62,10 +62,10 @@
final eval = { expr -> Eval.me('toy', playScope, expr.toString()) };
if (stateIs("DEBUG")) {
// Check everything in DOMME evaluates and resolves
- final checkIsFunc = { group, name ->
+ final checkIsFunc = { group, name, s = { f -> f } ->
if (!name) return;
show("checking $group:$name is a function");
- if (!(funcMap[group][name] instanceof Closure)) {
+ if (!(s(funcMap[group][name]) instanceof Closure)) {
showPopup("$group:$name is not a function");
}
}
@@ -81,10 +81,10 @@
checkIsFunc("select", phase.select);
checkEval(phase.number ?: 1);
phase.activities.forEach { a ->
- checkIsFunc("activities", a);
+ checkIsFunc("activities", a, { f -> f.func });
}
(phase.intervals ?: []).forEach { i ->
- checkIsFunc("activities", i);
+ checkIsFunc("activities", i, { f -> f.func });
}
checkIsFunc("use", phase.use);
};