diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-06-24 20:51:06 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-06-24 20:51:06 +0100 |
commit | 926b6a3344be97260a34e6899febd00d97233d99 (patch) | |
tree | dfdb2f7f85a1cbb96be168b206b0ddbc4038dbc4 /scripts | |
parent | Tidy up some misc functions (diff) | |
download | toy-926b6a3344be97260a34e6899febd00d97233d99.zip |
Fix scope of some constants
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/toy.groovy | 4 | ||||
-rw-r--r-- | scripts/toy/play.groovy | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/scripts/toy.groovy b/scripts/toy.groovy index bfebfc4..10a93de 100644 --- a/scripts/toy.groovy +++ b/scripts/toy.groovy @@ -17,6 +17,10 @@ return new Object() { final soonFormatter = java.time.format.DateTimeFormatter.ofPattern("EEEE 'at' h:mma"); // Notes // toys.<name> ankle_cuffs, ballgag, blindfold, chastity_belt, clothespins, cockring, dog_collar, handcuffs, hood, nipple_clamps, ring_gag + final PLAY = "play"; + final REDRESS = "redress"; + final RELEASEFROM = "releaseFrom"; + final BALLGAG = "ballgag", COLLAR = "dog_collar", CLAMPS = "nipple_clamps", CHASTITY = "chastity_belt", HANDCUFFS = "handcuffs", DILDO = "dildo"; final SPOON = "spoon"; final COCK = "cock"; diff --git a/scripts/toy/play.groovy b/scripts/toy/play.groovy index bc0c954..6889693 100644 --- a/scripts/toy/play.groovy +++ b/scripts/toy/play.groovy @@ -1,8 +1,4 @@ { toy -> - final PLAY = "play"; - final REDRESS = "redress"; - final RELEASEFROM = "releaseFrom"; - toy.metaClass.stateToyName { state -> switch (state) { case CUFFED: @@ -315,9 +311,9 @@ showLounge(); }; - toy.addNamedEvent(PLAY, { name, arg, schedTime, rt -> toy.playEvent(rt, arg) }); - toy.addNamedEvent(RELEASEFROM, { name, arg, schedTime, rt -> toy.releaseFrom(rt, arg, name) }); - toy.addNamedEvent(REDRESS, { name, arg, schedTime, rt -> toy.redress(rt) }); + toy.addNamedEvent(toy.PLAY, { name, arg, schedTime, rt -> toy.playEvent(rt, arg) }); + toy.addNamedEvent(toy.RELEASEFROM, { name, arg, schedTime, rt -> toy.releaseFrom(rt, arg, name) }); + toy.addNamedEvent(toy.REDRESS, { name, arg, schedTime, rt -> toy.redress(rt) }); toy.TOYTOYS.each { toyState -> toy.addRequestable("un$toyState".toString(), "May I be un-$toyState".toString(), { toy.requestRelease(toyState) }, |