mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
Incentives, Batch 2 (#8435)
* feat(content): Incentives batch 2 gear * feat(incentives): incentives 55-100 * chore(migration): hand out missed incentive * refactor(constant): export MAX_INCENTIVES * fix(incentives): correct const import and say "Royal Purple Potion" not "Royal Purple"
This commit is contained in:
@@ -8,6 +8,7 @@ import nconf from 'nconf';
|
||||
|
||||
const CRON_SAFE_MODE = nconf.get('CRON_SAFE_MODE') === 'true';
|
||||
const CRON_SEMI_SAFE_MODE = nconf.get('CRON_SEMI_SAFE_MODE') === 'true';
|
||||
const MAX_INCENTIVES = common.constants.MAX_INCENTIVES;
|
||||
const shouldDo = common.shouldDo;
|
||||
const scoreTask = common.ops.scoreTask;
|
||||
const i18n = common.i18n;
|
||||
@@ -129,7 +130,7 @@ function trackCronAnalytics (analytics, user, _progress, options) {
|
||||
}
|
||||
|
||||
function awardLoginIncentives (user) {
|
||||
if (user.loginIncentives > 50) return;
|
||||
if (user.loginIncentives > MAX_INCENTIVES) return;
|
||||
// A/B test 2016-12-21: Should we deliver notifications for upcoming incentives on days when users don't receive rewards?
|
||||
if (!loginIncentives[user.loginIncentives].rewardKey && user._ABtests && user._ABtests.checkInModals === '20161221_noCheckInPreviews') return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user