fix special tiles / wip add halloween themes

This commit is contained in:
CutieCat2804 2024-10-19 17:24:38 +02:00
parent 42ad2204f7
commit 6c52725272
70 changed files with 70 additions and 8 deletions

View File

@ -109,6 +109,10 @@ export const series1: Lootbox = {
id: "romance", id: "romance",
rarity: "uncommon", rarity: "uncommon",
}, },
{
id: "rainbow",
rarity: "uncommon",
},
{ {
id: "flowers", id: "flowers",
rarity: "rare", rarity: "rare",

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 443 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 739 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 460 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 695 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 B

After

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 B

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 288 B

After

Width:  |  Height:  |  Size: 422 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 B

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 B

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 B

After

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 B

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 B

After

Width:  |  Height:  |  Size: 395 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 B

After

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 795 B

After

Width:  |  Height:  |  Size: 1023 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 755 B

After

Width:  |  Height:  |  Size: 894 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 B

After

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 832 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 832 B

After

Width:  |  Height:  |  Size: 826 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 954 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 954 B

After

Width:  |  Height:  |  Size: 955 B

View File

@ -13,9 +13,9 @@ export interface Theme {
size: number; size: number;
mine: LazySprite | WeightedLazySprites[]; mine: LazySprite | WeightedLazySprites[];
tile: LazySprite | WeightedLazySprites[]; tile: LazySprite | WeightedLazySprites[];
revealed: LazySprite; revealed: LazySprite | WeightedLazySprites[];
flag: LazySprite | WeightedLazySprites[]; flag: LazySprite | WeightedLazySprites[];
questionMark: LazySprite; questionMark: LazySprite | WeightedLazySprites[];
lastPos: LazySprite; lastPos: LazySprite;
1: LazySprite; 1: LazySprite;
2: LazySprite; 2: LazySprite;
@ -57,7 +57,7 @@ export const mainWithSpecials = (
export const useTheme = (theme: Theme) => { export const useTheme = (theme: Theme) => {
const [loadedTheme, setLoadedTheme] = useState<LoadedTheme | undefined>( const [loadedTheme, setLoadedTheme] = useState<LoadedTheme | undefined>(
undefined, undefined
); );
useEffect(() => { useEffect(() => {
const loadTheme = async () => { const loadTheme = async () => {
@ -74,12 +74,12 @@ export const useTheme = (theme: Theme) => {
weight: sprite.weight, weight: sprite.weight,
sprite: await Assets.load((await sprite.sprite()).default), sprite: await Assets.load((await sprite.sprite()).default),
}; };
}), })
); );
} }
return [key, loaded] as const; return [key, loaded] as const;
}), })
); );
setLoadedTheme(Object.fromEntries(loadedEntries) as LoadedTheme); setLoadedTheme(Object.fromEntries(loadedEntries) as LoadedTheme);
}; };

View File

@ -1,6 +1,6 @@
import type { Theme } from "../Theme"; import type { Theme } from "../Theme";
export const crimson: Theme = { export const crimsonTheme: Theme = {
size: 32, size: 32,
mine: () => import("../../assets/themes/color-palettes/crimson/mine.png"), mine: () => import("../../assets/themes/color-palettes/crimson/mine.png"),
tile: () => import("../../assets/themes/color-palettes/crimson/tile.png"), tile: () => import("../../assets/themes/color-palettes/crimson/tile.png"),

View File

@ -3,7 +3,7 @@ import { blackAndWhiteTheme } from "./black-and-white";
import { catsTheme } from "./cats"; import { catsTheme } from "./cats";
import { circuitTheme } from "./circuit"; import { circuitTheme } from "./circuit";
import { circuitBinaryTheme } from "./circuit-binary"; import { circuitBinaryTheme } from "./circuit-binary";
import { crimson } from "./color-palettes/crimson"; import { crimsonTheme } from "./color-palettes/crimson";
import { nauticalTheme } from "./color-palettes/nautical"; import { nauticalTheme } from "./color-palettes/nautical";
import { shadowWarriorTheme } from "./color-palettes/shadow-warrior"; import { shadowWarriorTheme } from "./color-palettes/shadow-warrior";
import { upInSmokeTheme } from "./color-palettes/up-in-smoke"; import { upInSmokeTheme } from "./color-palettes/up-in-smoke";
@ -31,6 +31,7 @@ import { minecraftNetherTheme } from "./minecraft-nether";
import { minecraftOverworldTheme } from "./minecraft-overworld"; import { minecraftOverworldTheme } from "./minecraft-overworld";
import { MLGTheme } from "./MLG"; import { MLGTheme } from "./MLG";
import { poopTheme } from "./poop"; import { poopTheme } from "./poop";
import { rainbowTheme } from "./rainbow";
import { retroWaveTheme } from "./retro-wave"; import { retroWaveTheme } from "./retro-wave";
import { romanceTheme } from "./romance"; import { romanceTheme } from "./romance";
import { techiesDireTheme } from "./techies-dire"; import { techiesDireTheme } from "./techies-dire";
@ -287,6 +288,12 @@ export const themes = [
name: "Crimson", name: "Crimson",
tags: [], tags: [],
id: "crimson", id: "crimson",
theme: crimson, theme: crimsonTheme,
},
{
name: "Rainbow",
tags: [],
id: "rainbow",
theme: rainbowTheme,
}, },
] as const satisfies ThemeEntry[]; ] as const satisfies ThemeEntry[];

51
src/themes/rainbow.ts Normal file
View File

@ -0,0 +1,51 @@
import { even, type Theme } from "./Theme";
export const rainbowTheme: Theme = {
size: 32,
mine: () => import("../assets/themes/colors/rainbow/mine.png"),
tile: even(
() => import("../assets/themes/colors/blue/tile.png"),
() => import("../assets/themes/colors/green/tile.png"),
() => import("../assets/themes/colors/orange/tile.png"),
() => import("../assets/themes/colors/pink/tile.png"),
() => import("../assets/themes/colors/red/tile.png"),
() => import("../assets/themes/colors/turquoise/tile.png"),
() => import("../assets/themes/colors/yellow/tile.png")
),
revealed: even(
() => import("../assets/themes/colors/blue/revealed.png"),
() => import("../assets/themes/colors/green/revealed.png"),
() => import("../assets/themes/colors/orange/revealed.png"),
() => import("../assets/themes/colors/pink/revealed.png"),
() => import("../assets/themes/colors/red/revealed.png"),
() => import("../assets/themes/colors/turquoise/revealed.png"),
() => import("../assets/themes/colors/yellow/revealed.png")
),
flag: even(
() => import("../assets/themes/colors/blue/flag.png"),
() => import("../assets/themes/colors/green/flag.png"),
() => import("../assets/themes/colors/orange/flag.png"),
() => import("../assets/themes/colors/pink/flag.png"),
() => import("../assets/themes/colors/red/flag.png"),
() => import("../assets/themes/colors/turquoise/flag.png"),
() => import("../assets/themes/colors/yellow/flag.png")
),
questionMark: even(
() => import("../assets/themes/colors/blue/question-mark.png"),
() => import("../assets/themes/colors/green/question-mark.png"),
() => import("../assets/themes/colors/orange/question-mark.png"),
() => import("../assets/themes/colors/pink/question-mark.png"),
() => import("../assets/themes/colors/red/question-mark.png"),
() => import("../assets/themes/colors/turquoise/question-mark.png"),
() => import("../assets/themes/colors/yellow/question-mark.png")
),
lastPos: () => import("../assets/themes/colors/rainbow/last-pos.png"),
1: () => import("../assets/themes/colors/blue/1.png"),
2: () => import("../assets/themes/colors/green/2.png"),
3: () => import("../assets/themes/colors/orange/3.png"),
4: () => import("../assets/themes/colors/pink/4.png"),
5: () => import("../assets/themes/colors/red/5.png"),
6: () => import("../assets/themes/colors/turquoise/6.png"),
7: () => import("../assets/themes/colors/yellow/7.png"),
8: () => import("../assets/themes/default/8.png"),
};