minor tweaks

Conflicts:

	lib/app/index.js
This commit is contained in:
Tyler Renelle
2012-09-20 16:33:08 -04:00
parent 6c32f42bb1
commit cffc3aef75
4 changed files with 8 additions and 14 deletions
+2 -6
View File
@@ -324,12 +324,8 @@ ready(function(model) {
});
}
};
setTimeout(function() {
return poormanscron();
}, 2000);
setInterval(function() {
return poormanscron();
}, 3600000);
setTimeout(poormanscron, 2000);
setInterval(poormanscron, 3600000);
return exports.endOfDayTally = function(e, el) {
return scoring.tally();
};
+1
View File
@@ -2,6 +2,7 @@
var userSchema;
module.exports.userSchema = userSchema = {
balance: 2,
stats: {
money: 0,
exp: 0,
+2 -6
View File
@@ -262,12 +262,8 @@ ready (model) ->
scoring.tally(tallyFor)
# FIXME seems can't call poormanscron() instantly, have to call after some time (2s here)
# Doesn't do anything otherwise. Don't know why... model not initialized enough yet?
setTimeout () -> # Run once on refresh
poormanscron()
, 2000
setInterval () -> # Then run once every hour
poormanscron()
, 3600000
setTimeout poormanscron, 2000 # Run once on refresh
setInterval poormanscron, 3600000 # Then run once every hour
# ========== DEBUGGING ==========
+3 -2
View File
@@ -1,5 +1,6 @@
module.exports.userSchema = userSchema = {
module.exports.userSchema = userSchema = {
balance: 2
stats: { money: 0, exp: 0, lvl: 1, hp: 50 }
items: { itemsEnabled: false, armor: 0, weapon: 0, rerollsRemaining: 5 }
tasks: {}
@@ -11,7 +12,7 @@ module.exports.userSchema = userSchema = {
}
module.exports.updateSchema = (model) ->
return
return # not using, will revisit this later
# Reset history, remove inactive users
model.fetch 'users', (err, users) ->
_.each users.get(), (userObj) ->