summaryrefslogtreecommitdiff
path: root/scripts/toy.groovy
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/toy.groovy')
-rw-r--r--scripts/toy.groovy2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/toy.groovy b/scripts/toy.groovy
index 6918f38..ce64ba6 100644
--- a/scripts/toy.groovy
+++ b/scripts/toy.groovy
@@ -1504,7 +1504,7 @@ def getDayNum = { Math.floorDiv(getTime() + localTimeOffset() - 14400, 86400) };
def getAvail = { dayNum -> loadInteger("toy.availability.$dayNum") ?: 0 };
def addAvail = { amount ->
def dayNum = getDayNum();
- save("toy.availability.$dayNum", getAvail(dayNum) + amount);
+ save("toy.availability.$dayNum", (int)(getAvail(dayNum) + amount));
};
def tidyAvail = {
def p = load("toy.availability");