mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 12:02:13 +00:00
yellow warning for undoing a mistake checkbox
This commit is contained in:
parent
91e4a50179
commit
c434072504
2 changed files with 10 additions and 2 deletions
|
|
@ -133,7 +133,11 @@ module.exports.score = score = function(spec) {
|
|||
modified = expModifier(user, delta);
|
||||
exp += modified;
|
||||
money += modified;
|
||||
if (modified > 0) {
|
||||
statsNotification("<i class='icon-star'></i>Exp,GP +" + (modified.toFixed(2)), 'success');
|
||||
} else {
|
||||
statsNotification("<i class='icon-star'></i>Exp,GP " + (modified.toFixed(2)), 'warning');
|
||||
}
|
||||
} else if (type !== 'reward' && type !== 'todo') {
|
||||
modified = hpModifier(user, delta);
|
||||
hp += modified;
|
||||
|
|
|
|||
|
|
@ -121,7 +121,11 @@ module.exports.score = score = (spec = {user:null, task:null, direction:null, cr
|
|||
modified = expModifier(user, delta)
|
||||
exp += modified
|
||||
money += modified
|
||||
if modified > 0
|
||||
statsNotification "<i class='icon-star'></i>Exp,GP +#{modified.toFixed(2)}", 'success'
|
||||
else
|
||||
# unchecking an accidently completed daily/todo
|
||||
statsNotification "<i class='icon-star'></i>Exp,GP #{modified.toFixed(2)}", 'warning'
|
||||
# Deduct from health (rewards case handled above)
|
||||
else unless type in ['reward', 'todo']
|
||||
modified = hpModifier(user, delta)
|
||||
|
|
|
|||
Loading…
Reference in a new issue