summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-06-22 14:24:08 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2019-06-22 14:24:08 +0100
commit1d87fa9db8b0ed0dcea4498ba430ba0cdb0edb23 (patch)
tree5e49083647e525484193b19748f04361490a7343 /scripts
parentFix getDay (diff)
downloadtoy-1d87fa9db8b0ed0dcea4498ba430ba0cdb0edb23.zip
Hack around wait and metaClass
Diffstat (limited to 'scripts')
-rw-r--r--scripts/toy.groovy4
-rw-r--r--scripts/toy/social.groovy6
2 files changed, 7 insertions, 3 deletions
diff --git a/scripts/toy.groovy b/scripts/toy.groovy
index bd18e40..d35ced3 100644
--- a/scripts/toy.groovy
+++ b/scripts/toy.groovy
@@ -1603,6 +1603,10 @@ return new Object() {
final removeRequestable = { String name ->
requestables.remove(name);
};
+ // This exists because calling .wait(t) in a metaClass method
+ // calls it on the metaClass, not on the original object
+ void pause(int t) { wait(t); }
+
String main()
{
diff --git a/scripts/toy/social.groovy b/scripts/toy/social.groovy
index 9617b65..d07b9f0 100644
--- a/scripts/toy/social.groovy
+++ b/scripts/toy/social.groovy
@@ -34,7 +34,7 @@
present([DRESSED,nTEASE], [
[ "I'm going out now, toy.", "$plan time!" ],
[ "Will you be good while I'm gone?", "You will behave as I expect?" ]]);
- wait(10);
+ pause(10);
postChastity();
def toys = TOYTOYS.findAll { t -> stateIs(t) };
Collections.shuffle(toys);
@@ -43,7 +43,7 @@
set(NAKED, false);
present([DRESSED,TEASE], [
[ "Back later!", "See you soon, toy" ]]);
- wait(5);
+ pause(5);
}
else if (has(CHASTITY) && !stateIs(CHASTE)) {
leaveNote("I want you in chastity until I return!", CHASTE);
@@ -59,7 +59,7 @@
setAway(null);
if (rt && sessionSummon([DRESSED])) {
present([DRESSED], [["Hello, toy!"], ["I'm back home now."]]);
- wait(10);
+ pause(10);
showLounge();
}
readNote();