summaryrefslogtreecommitdiff
path: root/scripts/toy.groovy
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2018-12-13 20:06:34 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2018-12-13 20:06:34 +0000
commit29be8afb70716353c24efe1071074c57c78649dd (patch)
treeb0556ade2d8567f75f694a6172ffed1d405dfe89 /scripts/toy.groovy
parentAdd lounge support (diff)
downloadtoy-29be8afb70716353c24efe1071074c57c78649dd.zip
Configure owner in properties
Diffstat (limited to 'scripts/toy.groovy')
-rw-r--r--scripts/toy.groovy4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/toy.groovy b/scripts/toy.groovy
index b47586a..d8651ff 100644
--- a/scripts/toy.groovy
+++ b/scripts/toy.groovy
@@ -31,7 +31,7 @@ final START = "start", END = "end", FRIEND = "friend";
final FRIENDS = [ "Tori", "Sophie", "Krystal" ];
// toy.position
final KNEELING = "kneeling", ALLFOURS = "allfours", STANDING = "standing";
-final OWNER = "ancilla";
+def OWNER = null;
final SITTER = "sarah-james";
final SOFT = "soft";
@@ -1384,6 +1384,8 @@ def setupShowCalendar = {
};
// GO!
+setDefault("toy.owner", "ancilla");
+OWNER = loadString("toy.owner");
def getDayNum = { Math.floorDiv(getTime() + localTimeOffset() - 14400, 86400) };
def getAvail = { dayNum -> loadInteger("toy.availability.$dayNum") ?: 0 };
def addAvail = { amount ->