Fix SCUM gift catalog visibility

This commit is contained in:
npc0-hue
2026-09-23 16:12:33 +08:00
parent e8ebf562c7
commit 7e0780ea51
4 changed files with 23 additions and 4 deletions
+9
View File
@@ -10,6 +10,15 @@ const pluginRoot = resolve(dirname(fileURLToPath(import.meta.url)), "../examples
const catalogSource = readFileSync(join(pluginRoot, "features/scum-catalog.ts"), "utf8");
describe("scum catalog icons", () => {
it("includes the backpack and military helmet entries users expect", () => {
const byCode = new Map(scumCatalogEntries.map((entry) => [entry.code, entry]));
expect(byCode.get("Improvised_Backpack_Big")).toMatchObject({ kind: "item" });
expect(byCode.get("Military_Backpack_01_01")).toMatchObject({ kind: "item" });
expect(byCode.get("Military_Helmet_01_01")).toMatchObject({ kind: "item" });
expect(byCode.get("Improvised_Backpack_Big")?.icon).toContain("backpacks/");
expect(byCode.get("Military_Helmet_01_01")?.icon).toContain("head armor/");
});
it("resolves icons on demand instead of importing each icon as its own module", () => {
expect(catalogSource).not.toContain("import.meta.glob");
expect(scumCatalogIconUrl("npcs/zombie11.webp")).toContain("zombie11.webp");