From 7ac9617142d15efd6ba196adad8c71d7ee055a7b Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 19 Jun 2019 21:26:34 +0100 Subject: Extract intro into a module --- scripts/toy.groovy | 59 ++++-------------------------------------------- scripts/toy/intro.groovy | 52 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 54 deletions(-) create mode 100644 scripts/toy/intro.groovy (limited to 'scripts') 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(); +} -- cgit v1.2.3