set lower default tokens

This commit is contained in:
Tyler Renelle 2013-02-13 02:02:31 -05:00
parent 96b983b564
commit 7133295dbe
2 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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