mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 03:52:14 +00:00
onlies now reset their value every day
This commit is contained in:
parent
4b77daff0a
commit
120e058346
1 changed files with 3 additions and 0 deletions
|
|
@ -216,6 +216,9 @@ cron = (model) ->
|
||||||
value = obj.tasks[taskObj.id].value #get updated value
|
value = obj.tasks[taskObj.id].value #get updated value
|
||||||
absVal = if (completed) then Math.abs(value) else value
|
absVal = if (completed) then Math.abs(value) else value
|
||||||
todoTally += absVal
|
todoTally += absVal
|
||||||
|
else if type is 'habit' #reset 'onlies' value to 0
|
||||||
|
if taskObj.up==false or taskObj.down==false
|
||||||
|
batch.set "tasks.#{taskObj.id}.value", 0
|
||||||
|
|
||||||
# Finished tallying
|
# Finished tallying
|
||||||
obj.history ?= {}; obj.history.todos ?= []; obj.history.exp ?= []
|
obj.history ?= {}; obj.history.todos ?= []; obj.history.exp ?= []
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue