From d9ea676a92f58394a7a5dbad59216b11125320b9 Mon Sep 17 00:00:00 2001 From: Felix Staud Date: Wed, 10 Jul 2024 20:34:28 -0700 Subject: [PATCH] add `KnownFileRoot` template literal --- src/field/mystery-encounter-intro.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/field/mystery-encounter-intro.ts b/src/field/mystery-encounter-intro.ts index adb700b4854..ef3baa17cdf 100644 --- a/src/field/mystery-encounter-intro.ts +++ b/src/field/mystery-encounter-intro.ts @@ -2,9 +2,11 @@ import { GameObjects } from "phaser"; import BattleScene from "../battle-scene"; import MysteryEncounter from "../data/mystery-encounters/mystery-encounter"; +type KnownFileRoot = "trainer" | "pokemon" | "arenas" | "battle_anims" | "cg" | "character" | "effect" | "egg" | "events" | "inputs" | "items" | "mystery-encounters" | "pokeball" | "pokemon" | "statuses" | "trainer" | "ui"; + export class MysteryEncounterSpriteConfig { spriteKey: string; // e.g. "ace_trainer_f" - fileRoot: string; // "trainer" for trainer sprites, "pokemon" for pokemon, etc. Refer to /public/images directory for the folder name + fileRoot: KnownFileRoot & string; // Refer to /public/images directory for the folder name hasShadow?: boolean = false; // Spawns shadow underneath sprite disableAnimation?: boolean = false; // Animates frames or not repeat?: boolean = false; // Cycles animation