From 014f2df5c76df733533f08917c011165f23bb960 Mon Sep 17 00:00:00 2001 From: yangit Date: Wed, 26 Jun 2013 09:52:40 +0700 Subject: [PATCH] remove buying rewards for health (you can buy for money only) --- script/algos.coffee | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/script/algos.coffee b/script/algos.coffee index 3c170ed25f..5d50445f56 100644 --- a/script/algos.coffee +++ b/script/algos.coffee @@ -170,11 +170,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) ->