Hourglass Quest (#11325)

* feat(content): Hourglass Quest

* fix(hourglasses): NaN from undefined

* fix(quests): sanity check for negative scrolls

* fix(hourglasses): don't show quantity selection for binary items

* fix(route): validate number, use body not params

* test(timetrav): add quest tests
This commit is contained in:
Sabe Jones
2019-08-29 15:22:12 -04:00
committed by GitHub
parent 9077290ea3
commit fc841d0ad4
61 changed files with 209 additions and 42 deletions

View File

@@ -132,7 +132,6 @@ module.exports = function getItemInfo (user, type, item, officialPinnedItems, la
notes: item.notes(language),
group: item.group,
value: item.goldValue ? item.goldValue : item.value,
currency: item.goldValue ? 'gold' : 'gems',
locked,
previous: content.quests[item.previous] ? content.quests[item.previous].text(language) : null,
unlockCondition: item.unlockCondition,
@@ -150,6 +149,13 @@ module.exports = function getItemInfo (user, type, item, officialPinnedItems, la
path: `quests.${item.key}`,
pinType: 'quests',
};
if (item.goldValue) {
itemInfo.currency = 'gold';
} else if (item.category === 'timeTravelers') {
itemInfo.currency = 'hourglasses';
} else {
itemInfo.currency = 'gems';
}
break;
case 'timeTravelers':