Merge branch 'sabe/attributes' into develop

Conflicts:
	dist/habitrpg-shared.js
	locales/en/main.json
This commit is contained in:
Cole Gleason 2014-01-30 10:44:49 -06:00
commit 8fdae0b35c
2 changed files with 14 additions and 0 deletions

View file

@ -11656,6 +11656,14 @@ var process=require("__browserify_process");(function() {
}
return typeof cb === "function" ? cb(null, user) : void 0;
},
allocateNow: function(req, cb) {
_.times(user.stats.points, user.fns.autoAllocate);
user.stats.points = 0;
if (typeof user.markModified === "function") {
user.markModified('stats');
}
return typeof cb === "function" ? cb(null, user.stats) : void 0;
},
clearCompleted: function(req, cb) {
_.remove(user.todos, function(t) {
var _ref;

View file

@ -467,6 +467,12 @@ api.wrap = (user, main=true) ->
user.achievements.rebirthLevel = lvl
cb? null, user
allocateNow: (req, cb) ->
_.times user.stats.points, user.fns.autoAllocate
user.stats.points = 0
user.markModified? 'stats'
cb? null, user.stats
# ------
# Tasks
# ------