mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 12:02:13 +00:00
Try a vanilla CoffeeScript (haha) solution
This commit is contained in:
parent
50ffe4dcda
commit
baa2e2a8fd
2 changed files with 7 additions and 7 deletions
10
dist/habitrpg-shared.js
vendored
10
dist/habitrpg-shared.js
vendored
|
|
@ -11192,11 +11192,13 @@ var process=require("__browserify_process");(function() {
|
|||
_.each(user.tasks, function(task) {
|
||||
return task.value = 0;
|
||||
});
|
||||
_.each(user.tasks, function(task) {
|
||||
if (task.type = 'daily') {
|
||||
return task.streak = 0;
|
||||
_ref = user.tasks;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
task = _ref[_i];
|
||||
if (task.type === 'daily') {
|
||||
task.streak = 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
stats = user.stats;
|
||||
stats.buffs = {};
|
||||
stats.hp = 50;
|
||||
|
|
|
|||
|
|
@ -408,9 +408,7 @@ api.wrap = (user) ->
|
|||
# Turn tasks yellow, zero out streaks
|
||||
_.each user.tasks, (task) ->
|
||||
task.value = 0
|
||||
_.each user.tasks, (task) ->
|
||||
if task.type = 'daily'
|
||||
task.streak = 0
|
||||
task.streak = 0 for task in user.tasks when task.type is 'daily'
|
||||
# Reset all dynamic stats
|
||||
stats = user.stats
|
||||
stats.buffs = {}
|
||||
|
|
|
|||
Loading…
Reference in a new issue