diff --git a/website/client/src/components/creatorIntro.vue b/website/client/src/components/creatorIntro.vue index c4e8382891..cd1c2b717e 100644 --- a/website/client/src/components/creatorIntro.vue +++ b/website/client/src/components/creatorIntro.vue @@ -166,7 +166,7 @@ v-if="!filterBackgrounds" class="row text-center title-row" > - {{ backgroundShopSets[1].text }} + {{ backgroundShopSets[0].text }}
{{ $t('incentiveBackgroundsUnlockedWithCheckins') }}
- {{ backgroundShopSets[0].text }} + {{ backgroundShopSets[1].text }}
", diff --git a/website/common/script/content/appearance/backgrounds.js b/website/common/script/content/appearance/backgrounds.js index f6a59f8717..8b20db7a0a 100644 --- a/website/common/script/content/appearance/backgrounds.js +++ b/website/common/script/content/appearance/backgrounds.js @@ -955,6 +955,26 @@ const backgrounds = { notes: t('backgroundSnowglobeNotes'), }, }, + timeTravelBackgrounds: { + airship: { + text: t('backgroundAirshipText'), + notes: t('backgroundAirshipNotes'), + price: 1, + currency: 'hourglasses', + }, + clocktower: { + text: t('backgroundClocktowerText'), + notes: t('backgroundClocktowerNotes'), + price: 1, + currency: 'hourglasses', + }, + steamworks: { + text: t('backgroundSteamworksText'), + notes: t('backgroundSteamworksNotes'), + price: 1, + currency: 'hourglasses', + }, + }, incentiveBackgrounds: { violet: { text: t('backgroundVioletText'), @@ -987,26 +1007,6 @@ const backgrounds = { currency: 'loginIncentive', }, }, - timeTravelBackgrounds: { - airship: { - text: t('backgroundAirshipText'), - notes: t('backgroundAirshipNotes'), - price: 1, - currency: 'hourglasses', - }, - clocktower: { - text: t('backgroundClocktowerText'), - notes: t('backgroundClocktowerNotes'), - price: 1, - currency: 'hourglasses', - }, - steamworks: { - text: t('backgroundSteamworksText'), - notes: t('backgroundSteamworksNotes'), - price: 1, - currency: 'hourglasses', - }, - }, }; /* eslint-enable quote-props */ diff --git a/website/common/script/ops/buy/hourglassPurchase.js b/website/common/script/ops/buy/hourglassPurchase.js index e3997957c2..f8bc8dac97 100644 --- a/website/common/script/ops/buy/hourglassPurchase.js +++ b/website/common/script/ops/buy/hourglassPurchase.js @@ -8,6 +8,8 @@ import { NotAuthorized, } from '../../libs/errors'; import errorMessage from '../../libs/errorMessage'; +import getItemInfo from '../../libs/getItemInfo'; +import { removeItemByPath } from '../pinnedGearUtils'; export default function purchaseHourglass (user, req = {}, analytics, quantity = 1) { const key = get(req, 'params.key'); @@ -29,6 +31,9 @@ export default function purchaseHourglass (user, req = {}, analytics, quantity = user.purchased.background[key] = true; user.purchased.plan.consecutive.trinkets -= 1; + const itemInfo = getItemInfo(user, 'background', content.backgroundsFlat[key]); + removeItemByPath(user, itemInfo.path); + if (user.markModified) user.markModified('purchased.background'); } else if (type === 'quests') { if (!content.quests[key] || content.quests[key].category !== 'timeTravelers') throw new NotAuthorized(i18n.t('notAllowedHourglass', req.language));