summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-06-19 21:26:34 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2019-06-19 21:26:34 +0100
commit7ac9617142d15efd6ba196adad8c71d7ee055a7b (patch)
tree017a7592ac92ecd0dd49e6c91500b6bc713a4600
parenteach, not every (diff)
downloadtoy-7ac9617142d15efd6ba196adad8c71d7ee055a7b.zip
Extract intro into a module
-rw-r--r--scripts/toy.groovy59
-rw-r--r--scripts/toy/intro.groovy52
2 files changed, 57 insertions, 54 deletions
diff --git a/scripts/toy.groovy b/scripts/toy.groovy
index 5dc97d5..77c499c 100644
--- a/scripts/toy.groovy
+++ b/scripts/toy.groovy
@@ -1808,59 +1808,6 @@ return new Object() {
redress: { name, arg, schedTime, rt -> redress(rt) },
permit: { name, arg, schedTime, rt -> givePermission(arg) }
];
- def setupInitial = {
- if (loadInteger("toy.version") == null) {
- // Welcome
- dress([[DRESSED,nTEASE], [DRESSED,TEASE], [TITS]]);
- def name = loadString("intro.name");
- present([DRESSED,nTEASE], [
- ["Welcome, $name, to your new life as my plaything, my toy."]]);
- showButton("Thank you, ${dommeTitle()}");
- present([DRESSED,nTEASE], [
- ["My rules are simple, do what I say, when I say, and you'll be rewarded... eventually."]]);
- showButton("Thank you, ${dommeTitle()}");
- present([DRESSED,nTEASE], [
- ["But if you disappointment me, disobey me or disrespect me, then you'll be punished."]]);
- showButton("Yes, ${dommeTitle()}");
- present([DRESSED,TEASE], [
- ["I will tease you... and I will torment you..."]]);
- showButton("Yes, ${dommeTitle()}");
- present([TITS], [
- ["... and I will break... and then you will suffer!"]]);
- showButton("Thank you, ${dommeTitle()}");
- present([TITS], [
- ["Now, your devotion is important to me."],
- ["I have expectations my toy be available to play with as much as possible."]]);
- showButton("Yes, ${dommeTitle()}");
- present([TITS], [
- ["You can indicate your availability by running this script."],
- ["I will summon you when I wish to play."]]);
- showButton("Understood, ${dommeTitle()}");
- present([DRESSED,TEASE], [
- ["Would you like to set this script as default?"]]);
- if (getBoolean(null)) {
- save("intro.start_script", "toy");
- present([DRESSED,nTEASE], [
- ["Good boy."]]);
- showButton("Thank you, ${dommeTitle()}");
- }
- present([DRESSED,nTEASE], [
- ["Run along now, toy."],
- ["I'll summon you with a bell when I want you."],
- ["Lisen carefully!"]]);
- showButton("Yes, ${dommeTitle()}");
- present(null, [
- ["All images are the property of their respective owners, see watermarks (OnlyTease, ForeverVamp).\n"],
- ["Don't do anything you aren't 100% comfortable doing.\n"],
- ["Be sure to have configured your toys!"]]);
- showButton("OK");
- }
- save("toy.version", VERSION);
- setDefault("toy.strokeTeaseOffset", 0);
- setDefault("toy.punishment", 0);
- execEvents(false);
- setupEvents();
- };
def setupShowState = {
show(
[CHASTE, COLLARED, CUFFED, CLAMPED, GAGGED, NAKED].collect {
@@ -1924,7 +1871,10 @@ return new Object() {
}
save("toy.availability", p2);
};
- setupInitial();
+ setDefault("toy.strokeTeaseOffset", 0);
+ setDefault("toy.punishment", 0);
+ execEvents(false);
+ setupEvents();
tidyAvail();
final cycleTime = 60;
@@ -1996,6 +1946,7 @@ return new Object() {
/*
* Resources
* scripts/toy.groovy
+ * scripts/toy/intro.groovy
* scripts/toy/social.groovy
* images/toy/ancilla/corset/1.jpg
* images/toy/ancilla/corset/10.jpg
diff --git a/scripts/toy/intro.groovy b/scripts/toy/intro.groovy
new file mode 100644
index 0000000..bf6be9e
--- /dev/null
+++ b/scripts/toy/intro.groovy
@@ -0,0 +1,52 @@
+{ toy ->
+ toy.metaClass.setupInitial {
+ if (loadInteger("toy.version") == null) {
+ // Welcome
+ dress([[DRESSED,nTEASE], [DRESSED,TEASE], [TITS]]);
+ final name = loadString("intro.name");
+ present([DRESSED,nTEASE], [
+ ["Welcome, $name, to your new life as my plaything, my toy."]]);
+ showButton("Thank you, ${dommeTitle()}");
+ present([DRESSED,nTEASE], [
+ ["My rules are simple, do what I say, when I say, and you'll be rewarded... eventually."]]);
+ showButton("Thank you, ${dommeTitle()}");
+ present([DRESSED,nTEASE], [
+ ["But if you disappointment me, disobey me or disrespect me, then you'll be punished."]]);
+ showButton("Yes, ${dommeTitle()}");
+ present([DRESSED,TEASE], [
+ ["I will tease you... and I will torment you..."]]);
+ showButton("Yes, ${dommeTitle()}");
+ present([TITS], [
+ ["... and I will break... and then you will suffer!"]]);
+ showButton("Thank you, ${dommeTitle()}");
+ present([TITS], [
+ ["Now, your devotion is important to me."],
+ ["I have expectations my toy be available to play with as much as possible."]]);
+ showButton("Yes, ${dommeTitle()}");
+ present([TITS], [
+ ["You can indicate your availability by running this script."],
+ ["I will summon you when I wish to play."]]);
+ showButton("Understood, ${dommeTitle()}");
+ present([DRESSED,TEASE], [
+ ["Would you like to set this script as default?"]]);
+ if (getBoolean(null)) {
+ save("intro.start_script", "toy");
+ present([DRESSED,nTEASE], [
+ ["Good boy."]]);
+ showButton("Thank you, ${dommeTitle()}");
+ }
+ present([DRESSED,nTEASE], [
+ ["Run along now, toy."],
+ ["I'll summon you with a bell when I want you."],
+ ["Lisen carefully!"]]);
+ showButton("Yes, ${dommeTitle()}");
+ present(null, [
+ ["All images are the property of their respective owners, see watermarks (OnlyTease, ForeverVamp).\n"],
+ ["Don't do anything you aren't 100% comfortable doing.\n"],
+ ["Be sure to have configured your toys!"]]);
+ showButton("OK");
+ }
+ save("toy.version", VERSION);
+ };
+ toy.setupInitial();
+}