diff --git a/package-lock.json b/package-lock.json index eb212a3f..e8881b24 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "healer-man", - "version": "0.1.24", + "version": "0.1.25", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "healer-man", - "version": "0.1.24", + "version": "0.1.25", "dependencies": { "@capacitor/android": "8.4.1", "@capacitor/core": "8.4.1", diff --git a/package.json b/package.json index 283ed34a..e006c3da 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "healer-man", "private": true, - "version": "0.1.24", + "version": "0.1.25", "type": "module", "scripts": { "dev": "vite --host 0.0.0.0", diff --git a/release-version.json b/release-version.json index 089806d1..d03b82c2 100644 --- a/release-version.json +++ b/release-version.json @@ -1,4 +1,4 @@ { - "versionName": "0.1.24", - "versionCode": 1024 + "versionName": "0.1.25", + "versionCode": 1025 } diff --git a/src/scene/MobNameplatePresentation.test.ts b/src/scene/MobNameplatePresentation.test.ts new file mode 100644 index 00000000..52e9227b --- /dev/null +++ b/src/scene/MobNameplatePresentation.test.ts @@ -0,0 +1,21 @@ +import { readFileSync } from "node:fs"; +import { describe, expect, it } from "vitest"; + +const source = readFileSync(new URL("./MobPopulation.tsx", import.meta.url), "utf8"); + +describe("mob nameplate presentation", () => { + it("occludes boss names against dungeon geometry", () => { + const nameplate = source.match(/\{showLabel && !dead \? \([\s\S]*?<\/Html>\s*\) : null\}/)?.[0] ?? ""; + + expect(nameplate).toContain('occlude="raycast"'); + }); + + it("keeps boss names larger and differently colored", () => { + const mobStyle = source.match(/const mobLabelStyle: CSSProperties = \{([\s\S]*?)\n\};/)?.[1] ?? ""; + const bossStyle = source.match(/const bossLabelStyle: CSSProperties = \{([\s\S]*?)\n\};/)?.[1] ?? ""; + + expect(mobStyle).toContain('fontSize: "11px"'); + expect(bossStyle).toContain('color: "#ffe69a"'); + expect(bossStyle).toContain('fontSize: "13px"'); + }); +}); diff --git a/src/scene/MobPopulation.tsx b/src/scene/MobPopulation.tsx index dc041cb2..4340fa3e 100644 --- a/src/scene/MobPopulation.tsx +++ b/src/scene/MobPopulation.tsx @@ -1039,6 +1039,7 @@ function ProxyMob({ {showLabel && !dead ? (