summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/toy.groovy6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/toy.groovy b/scripts/toy.groovy
index b0155e7..a769153 100644
--- a/scripts/toy.groovy
+++ b/scripts/toy.groovy
@@ -1502,7 +1502,7 @@ def playEvent = { rt = true, first = true ->
showLounge();
}
def sleepSchedule = {
- def t = (int)(getDay() + localTimeOffset() + (25.1 * HOUR) + getRandom((int)HOUR));
+ def t = (int)(getDay() - localTimeOffset() + (25.1 * HOUR) + getRandom((int)HOUR));
addEventIfMissing(SLEEPING, t, BEDTIME);
};
def bedtime = { rt, schedTime ->
@@ -1711,7 +1711,7 @@ def confess = {
// Setup
// Plans - cannot overlap
def setupPlan = { plan, float startmin, float startmax, float endmin, float endmax ->
- def timeWindow = { float min, float max -> (int)((min * HOUR) + localTimeOffset() + getRandom((int)((max - min) * HOUR))) };
+ def timeWindow = { float min, float max -> (int)((min * HOUR) - localTimeOffset() + getRandom((int)((max - min) * HOUR))) };
final friendName = FRIENDS[getRandom(FRIENDS.size())];
def day = getDay() + ((getRandom(3) + 1) * DAY);
addEventIfMissing(plan, day + timeWindow(startmin, startmax), BEGINPLAN,
@@ -1885,7 +1885,7 @@ def setupShowCalendar = {
setDefault("toy.owner", "ancilla");
OWNER = loadString("toy.owner");
DOMME = loadDomme(OWNER);
-def getDayNum = { Math.floorDiv(getTime() + localTimeOffset() - 14400, 86400) };
+def getDayNum = { Math.floorDiv(getTime() - localTimeOffset() - 14400, 86400) };
def getAvail = { dayNum -> loadInteger("toy.availability.$dayNum") ?: 0 };
def addAvail = { amount ->
def dayNum = getDayNum();