mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 12:02:13 +00:00
set lower default tokens
This commit is contained in:
parent
96b983b564
commit
7133295dbe
2 changed files with 3 additions and 3 deletions
|
|
@ -50,7 +50,7 @@ module.exports.app = (appExports, model) ->
|
|||
taskTypes = ['habit', 'daily', 'todo', 'reward']
|
||||
batch.set 'tasks', {}
|
||||
_.each taskTypes, (type) -> batch.set "#{type}Ids", []
|
||||
batch.set 'balance', 2 if user.get('balance') < 2 #only if they haven't manually bought tokens
|
||||
batch.set 'balance', 1 if user.get('balance') < 1 #only if they haven't manually bought tokens
|
||||
revive(batch)
|
||||
batch.commit()
|
||||
browser.resetDom(model)
|
||||
|
|
@ -97,7 +97,7 @@ userSchema =
|
|||
rewardIds: []
|
||||
apiToken: null # set in newUserObject below
|
||||
lastCron: 'new' #this will be replaced with `+new Date` on first run
|
||||
balance: 2
|
||||
balance: 1
|
||||
tasks: {}
|
||||
flags:
|
||||
partyEnabled: false
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ module.exports.app = (appExports, model) ->
|
|||
user.set 'items.pet', pet
|
||||
else
|
||||
tokens = user.get('balance')*4
|
||||
if tokens > 3
|
||||
if tokens > pet.value
|
||||
r = confirm("Buy this pet with #{pet.value} of your #{tokens} tokens?");
|
||||
if r
|
||||
user.set "items.pets.#{name}", true
|
||||
|
|
|
|||
Loading…
Reference in a new issue