diff options
-rw-r--r-- | scripts/toy.groovy | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/scripts/toy.groovy b/scripts/toy.groovy index c819901..7e529ae 100644 --- a/scripts/toy.groovy +++ b/scripts/toy.groovy @@ -1167,6 +1167,7 @@ def sessionRelease = { goodToy -> revokePermission(CUM); } wait(10); + save("toy.lastPlay", getTime()); showLounge(); sessionAborted = null; sessionToys = [:]; @@ -1187,8 +1188,9 @@ def playWait = { show(null); wait(20 + getRandom(20)); }; -def playSchedule = { lastPlay -> +def playSchedule = { if (getAway()) return; + final lastPlay = loadInteger("toy.lastPlay") ?: 0; if (lastPlay < getTime() - (4 * HOUR)) { addEventIfMissing(PLAY, getTime() + 120 + getRandom(480), PLAY, true); // 2-10mins } @@ -1205,12 +1207,11 @@ def playEvent = { rt = true, first = true -> } sessionPlay(); sessionRelease(sessionAborted == null); - save("toy.lastPlay", getTime()); } else { adjustPunish(25); } - playSchedule(getTime()); + playSchedule(); showLounge(); } def sleepSchedule = { @@ -1262,7 +1263,7 @@ def bedtimeCheck = { rt -> }; def wakeup = { rt -> setAway(null); - playSchedule(loadInteger("toy.lastPlay") ?: 0); + playSchedule(); sleepSchedule(); }; def redress = { rt -> @@ -1407,7 +1408,7 @@ def confess = { removeEvent(PLAY); sessionPlay(); sessionRelease(sessionAborted == null); - playSchedule(getTime()); + playSchedule(); } else { present([DRESSED, nTEASE], [ @@ -1433,7 +1434,7 @@ def setupPlans = { setupPlan(PARTY, 19, 20, 22.0, 25.0) }; def setupEvents = { - playSchedule(loadInteger("toy.lastPlay") ?: 0); + playSchedule(); sleepSchedule(); setupPlans(); }; @@ -1484,7 +1485,7 @@ def endPlan = { rt, plan -> showLounge(); } readNote(); - playSchedule(getTime()); + playSchedule(); setupPlans(); }; // Initial - basic checks and defaults |