minor tweaks
Conflicts: lib/app/index.js
This commit is contained in:
+2
-6
@@ -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();
|
||||
};
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
var userSchema;
|
||||
|
||||
module.exports.userSchema = userSchema = {
|
||||
balance: 2,
|
||||
stats: {
|
||||
money: 0,
|
||||
exp: 0,
|
||||
|
||||
@@ -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 ==========
|
||||
|
||||
|
||||
@@ -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) ->
|
||||
|
||||
Reference in New Issue
Block a user