mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-01 19:50:37 +00:00
Merge branch 'master' of github.com:HabitRPG/habitrpg-shared
This commit is contained in:
commit
a5eb64f771
3 changed files with 8351 additions and 65 deletions
File diff suppressed because one or more lines are too long
8286
browser/browser.js
8286
browser/browser.js
File diff suppressed because it is too large
Load diff
|
|
@ -168,11 +168,9 @@ obj.score = (user, task, direction, options={}) ->
|
|||
[paths, times, cron] = [options.paths || {}, options.times || 1, options.cron || false]
|
||||
priority = task.priority or '!'
|
||||
|
||||
# If they're trying to purhcase a too-expensive reward, confirm they want to take a hit for it
|
||||
# If they're trying to purhcase a too-expensive reward, don't allow them to do that.
|
||||
if task.value > user.stats.gp and task.type is 'reward'
|
||||
# check if we can show user the confirmation window. If yes, show it. If no, just shut up and do what is requested (for API).
|
||||
if confirm?
|
||||
return unless confirm "Not enough GP to purchase this reward, buy anyway and lose HP? (Punishment for taking a reward you didn't earn)."
|
||||
return
|
||||
|
||||
delta = 0
|
||||
calculateDelta = (adjustvalue = true) ->
|
||||
|
|
|
|||
Loading…
Reference in a new issue