summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/toy.groovy11
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/toy.groovy b/scripts/toy.groovy
index f8806d9..fd12703 100644
--- a/scripts/toy.groovy
+++ b/scripts/toy.groovy
@@ -20,6 +20,7 @@ final BALLGAG = "ballgag", COLLAR = "dog_collar", CLAMPS = "nipple_clamps", CHAS
final BONDAGE = "bondage", CBT = "cbt", CHORES = "chores", PAIN = "pain";
// toy.permission.<name>
final CUM = "cum", EDGE = "edge"
+final PERMIT = "permit";
// toy.state.<name>
final CHASTE = "chaste", COLLARED = "collared", CUFFED = "cuffed", CLAMPED = "clamped", GAGGED = "gagged", NAKED = "naked";
// toy.plan.<name>.{start|end|friend} UTC times
@@ -163,17 +164,17 @@ def nextEvent = { events ->
return first;
};
def setEvent = { events, name, time, func, arg = null ->
- if (namedEvents.containsKey(name)) {
+ if (namedEvents.containsKey(func)) {
events[name] = [
time: time,
func: func,
arg: arg
];
- return true;
saveEvents(events);
+ return true;
}
else {
- showPopup("No such event $name");
+ showPopup("No such event $func");
return false;
}
};
@@ -938,7 +939,7 @@ def sessionPlay = {
playRepeat(1 + getRandom(3), [playStrokes, playEdges]);
playTake(getRandom(3), [postCum, postChastity]);
if (!sessionAborted) {
- addEventIfMissing(CUM, getTime() + (DAY * 2) + getRandom(DAY * 2), "givePermission", CUM); // 2 - 4 days from now
+ addEventIfMissing(CUM, getTime() + (DAY * 2) + getRandom(DAY * 2), PERMIT, CUM); // 2 - 4 days from now
}
}
};
@@ -1155,7 +1156,7 @@ def beginPlan = { plan ->
// Initial - basic checks and defaults
namedEvents = [
// name: func(arg, schedTime rt)
- "givePermission": { arg, schedTime, rt -> givePermission(arg) }
+ permit: { arg, schedTime, rt -> givePermission(arg) }
];
def setupInitial = {
if (loadInteger("toy.version") == null) {