Skip to content

Commit ffa3a90

Browse files
edenchazardendulumAnnezor
authored
2026 prep (#162)
* new year badge, flair and fix dialog on deep sea * oof * more better more dynamic * Fortune cookie expansion (#163) * add 20+ fortunes * Update shop.vue (#164) * Update shop.vue Added some fortune cookies! * Apply suggestions from code review --------- Co-authored-by: edenchazard <38665888+edenchazard@users.noreply.github.com> * Apply suggestions from code review * Update app/pages/shop.vue * grumble * flag_gb * lil typo sadface from last year * add 20 more * trio finale * add 8 --------- Co-authored-by: edenchazard <38665888+edenchazard@users.noreply.github.com> Co-authored-by: Annezor <sofiesoer@hotmail.com> Co-authored-by: Charley Reeson <neon.fortytwo@gmail.com> --------- Co-authored-by: endulum <71853916+endulum@users.noreply.github.com> Co-authored-by: Annezor <sofiesoer@hotmail.com>
1 parent 96171bb commit ffa3a90

File tree

6 files changed

+82
-13
lines changed

6 files changed

+82
-13
lines changed

Dockerfile.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ FROM node:24.11-bookworm-slim
22
ENV NODE_ENV=development
33
WORKDIR /src
44
COPY --link package.json package-lock.json ./
5-
RUN npm ci
5+
RUN npm i
66
CMD [ "npm", "run", "dev" ]

app/components/DialogFortuneCookie.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<template>
2+
<!-- eslint-disable vue/no-v-html We're good. -->
23
<dialog
34
ref="fortuneDialog"
4-
class="m-auto p-4 rounded-lg max-w-md bg-green-100 dark:bg-stone-200 shadow-xl open:animate-[fade-in_0.5s_ease-in-out] [&_a]:text-green-950"
5+
class="backdrop:bg-black/50 m-auto p-4 rounded-lg max-w-md bg-green-100 dark:bg-stone-200 deep-sea:bg-slate-500 deep-sea:text-white shadow-xl open:animate-[fade-in_0.5s_ease-in-out] [&_a]:text-green-950"
56
@close="unveiledCookie = false"
67
>
78
<header>
@@ -32,12 +33,12 @@
3233
<template v-else>
3334
<div class="overflow-hidden fortune relative">
3435
<div
35-
class="w-full absolute right-0 h-full bg-green-100 dark:bg-stone-200 animate-[unveil_5s_ease-in-out_forwards_1s] motion-reduce:animate-none motion-reduce:w-0 motion-reduce:opacity-1"
36+
class="w-full absolute right-0 h-full bg-green-100 dark:bg-stone-200 deep-sea:bg-slate-500 animate-[unveil_5s_ease-in-out_forwards_1s] motion-reduce:animate-none motion-reduce:w-0 motion-reduce:opacity-1"
3637
/>
3738
<q
3839
class="block px-4 py-2 bg-orange-300 text-black italic text-center sm:px-8"
39-
>{{ fortune }}</q
40-
>
40+
v-html="fortune"
41+
/>
4142
</div>
4243
<template v-if="reward">
4344
<p class="flex items-center gap-2">

app/pages/shop.vue

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,22 +268,78 @@ async function handleItem(item: Item) {
268268
269269
if (item.name === 'Fortune Cookie') {
270270
const fortunes = [
271+
':3c',
272+
'Not telling.',
273+
'Do whatever you want forever.',
274+
'You are about to invent the next viral meme. This may or may not be good news.',
275+
"Need an idea for a New Year's resolution? Eat as many pasta shapes as you can this year.",
276+
"Need an idea for a New Year's resolution? Listen to as many different music genres as you can this year.",
277+
"Need an idea for a New Year's resolution? Pet as many cats (or dogs) as you can this year.",
278+
"Need an idea for a New Year's resolution? Raise as many Mints as you can this year.",
279+
'Run.',
280+
"Dare to dream, but don't forget to live.",
281+
'Carton of eggs, milk, shredded cheese, paper towels, loaf of bread, lettuce, ketchup...',
282+
'An unfortunate autoabandon is upon you.',
283+
'A successful Staterae breeding is upon you.',
284+
"Don't be the bigger person. Be the bigger problem.",
285+
'We live in a society.',
286+
"I see several Gold eggs in your future... they're not yours, though.",
287+
"You should start spriting that dragon you've been daydreaming about.",
288+
'[TODO: clever fortune here]',
289+
'Very soon, you are about to make a series of excellent choices.',
290+
'Very soon, you are about to make a series of terrible choices.',
291+
'Positive thoughts invite positive results.',
292+
"Don't just step out of your comfort zone. Take a leap.",
293+
"When life shuts a door, open it again. That's how doors work.",
294+
'Bloom where you are planted.',
295+
"You've got a secret admirer.",
296+
"There's a very important email you're forgetting to answer.",
297+
"I don't know. Ask a Mint.",
298+
'Keep your friends close and your Mints closer.',
299+
'A Mint a day keeps your bad luck away.',
300+
'Those who walk in a circle only end up where they started.',
301+
'99% of cave hunters quit right before catching their first metal.',
302+
"Communication is key to a relationship. Perhaps there's something you should tell your loved one.",
303+
'[object Object]',
304+
'Keep your head up; success is just over the horizon.',
305+
"IT'S SO OVER",
306+
"You're more in control than you think.",
307+
"WE'RE SO BACK",
308+
'Fear is the mind-killer.',
309+
'You will be hungry again in one to three hours.',
310+
'A shell in the hand is better than a Shumoga hatchling in the AP.',
311+
"We've been trying to reach you about your automobile's extended warranty...",
312+
'Last year was practice. This year is yours.',
313+
'Choices made in anger cannot be undone!',
314+
'If it sucks, hit the bricks! Real winners quit!',
315+
'Fortune favours the cookie eater.',
316+
'Form is temporary, class is permanent.',
317+
'TRAPPED IN FORTUNE COOKIE FACTORY PLEASE HELP',
318+
'Disregard all previous cookies.',
319+
"'Good enough' is enough.",
271320
'Terrible luck. You might as well take this year off.',
272-
'Great fortune is upon you! You shall surely succeedsurely.',
321+
'Great fortune is upon you! You shall surely succeed... surely.',
273322
'You will open at least one fortune cookie this year.',
274323
'Thank you for freeing me! But your fortune is in another cookie!',
275324
'Clicking on {{random_breed}}s will give you good luck today.',
325+
'The {{random_breed}}s are up to no good today.',
276326
'The next time you block a mixup, block high (or low).',
277327
'This fortune is blank.',
328+
'Be kind to yourself today.',
329+
'Do better by doing good.',
330+
'This is a coupon for one firm Matthias handshake (no monetary value).',
331+
'You shall be blessed with a blep within a fortnight.',
332+
'Matthias wishes you the very best... because you owe him money, and he wants it back.',
333+
'You will soon regret some choices involving cheese.',
278334
'Today will be a good day! Or night.',
279335
'You are capable of doing tremendous good today.',
336+
"You will qualify for this month's raffle, but winning is not guaranteed.",
280337
"Your luck is so-so, but although your luck may be unremarkable, you don't have to be.",
281338
'No Harkfrost scatters only a single snowflake.',
282339
'Someone is in need of your kind words today.',
283340
'You appear to be forgetting something.',
284-
'https://youtu.be/p7YXXieghto',
285-
'https://youtu.be/dQw4w9WgXcQ',
286-
'https://youtu.be/9MYQVa2wA5Q',
341+
'<a href="https://youtu.be/dQw4w9WgXcQ">https://youtu.be/dQw4w9WgXcQ</a>',
342+
'<a href="https://youtu.be/9MYQVa2wA5Q">https://youtu.be/9MYQVa2wA5Q</a>',
287343
'You seem to be stuck in an infinite loop.',
288344
'Your luck is reasonable, but it may be unwise to try it.',
289345
'You are dearly missed by a certain friend.',
@@ -299,6 +355,7 @@ async function handleItem(item: Item) {
299355
'You are now {{price}} dragon dollars poorer.',
300356
'You are about to finish reading a fortune.',
301357
'You may see at least one Staterae in the cave this week.',
358+
"There's always another dragon.",
302359
];
303360
304361
const randomCookie = fortunes[Math.floor(Math.random() * fortunes.length)];

drizzle/0040_item_seeds.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,6 @@ INSERT IGNORE INTO `items` (`id`, `name`, `url`, `category`, `available_from`, `
7575
(73, "Topaz", 'topaz.webp', 'flair', '2025-11-01 00:00:00', '2025-11-30 00:00:00', 'November\'s entry for the rock garden.', 100, 'Luci', '2025-11-01 00:00:00', 29),
7676
(74, "Turquoise", 'turquoise.webp', 'flair', '2025-12-01 00:00:00', '2025-12-31 00:00:00', 'December\'s entry for the rock garden.', 100, 'Luci', '2025-12-01 00:00:00', 30),
7777
(75, "Winter cherry", 'winter-cherry.webp', 'flair', '2025-12-01 00:00:00', '2026-01-07 00:00:00', "It's winter. The fruits look like cherries. That's why it's called the winter cherry.", 100, '04uni', '2025-12-13 00:00:00', 37),
78-
(76, "Bauble (white-gold)", 'bauble-white-gold.webp', 'flair', '2025-12-01 00:00:00', '2026-01-07 00:00:00', "This bauble doesn't know what colour it is.", 100, 'Inghelene', '2025-12-13 00:00:00', 37);
78+
(76, "Bauble (white-gold)", 'bauble-white-gold.webp', 'flair', '2025-12-01 00:00:00', '2026-01-07 00:00:00', "This bauble doesn't know what colour it is.", 100, 'Inghelene', '2025-12-13 00:00:00', 37),
79+
(77, "New Year 2026", 'badges/new-year-2026.webp', 'trophy', NULL, NULL, 'You had your 2026 fortune revealed by Matthias! Hopefully it was something good.', NULL, 'Hourai', '2026-01-01 00:00:00', NULL),
80+
(78, "Coin", 'coin.webp', 'flair', '2026-01-01 00:00:00', '2026-01-14 00:00:00', 'Eastern dragons will sometimes hide these coins in dumplings to grant good luck for the new year. For dragons, it\'s innocuous enough, but for humans... take care they don\'t shatter your teeth.', 150, 'Hourai', '2026-01-01 00:00:00', 13);

public/items/coin.webp

150 Bytes
Loading

server/api/shop/[id].post.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,21 @@ export default defineEventHandler(async (event) => {
8282
.where(eq(usersSettingsTable.userId, token.userId));
8383
}
8484

85-
// New Year 2025 badge.
86-
if (item.name === 'Fortune Cookie' && now.getFullYear() === 2025) {
85+
// New Year badge.
86+
if (item.name === 'Fortune Cookie') {
8787
const [badge] = await tx
8888
.select()
8989
.from(itemsTable)
90-
.where(eq(itemsTable.id, 50));
90+
.where(
91+
and(
92+
eq(itemsTable.name, `New Year ${now.getFullYear()}`),
93+
eq(itemsTable.category, 'trophy')
94+
)
95+
);
96+
97+
if (!badge) {
98+
return;
99+
}
91100

92101
// Check they don't already have the badge.
93102
const hasBadge = await tx

0 commit comments

Comments
 (0)