From 7f0c40dc89672d218f10ba3f81a0ee235da30969 Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Mon, 21 Sep 2026 11:15:49 +0800 Subject: feat(desktop): 村民五套服饰帽饰区分 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 人物图集扩至五套变体(1280x48):靛蓝袍配布巾、褐衫配发髻马甲、翠衫配发簪红巾、灰袍配瓜皮帽,主角专属斗笠独立第五套;村民按 id 取模四种服饰轮转,永不与主角同装,四向两帧动画保持。 --- src/LivingVillage.Desktop.Tests/PrototypeTests.fs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/LivingVillage.Desktop.Tests') diff --git a/src/LivingVillage.Desktop.Tests/PrototypeTests.fs b/src/LivingVillage.Desktop.Tests/PrototypeTests.fs index 4d698ad..3e15272 100644 --- a/src/LivingVillage.Desktop.Tests/PrototypeTests.fs +++ b/src/LivingVillage.Desktop.Tests/PrototypeTests.fs @@ -222,6 +222,24 @@ type PrototypeTests () = Assert.AreEqual(FrameTwo, (VillageArt.animationFrame 4L)) Assert.AreEqual(FrameOne, (VillageArt.animationFrame 8L)) + [] + member _.VillagersUseFourDistinctVariantsDistinctFromTheAvatar () = + let npcVariants = [ 0 .. 63 ] |> List.map (fun id -> npcVisualVariant (NpcId id)) |> Set.ofList + + Assert.AreEqual(4, npcVariants.Count) + Assert.IsFalse(npcVariants.Contains StrawHat) + Assert.AreEqual(StrawHat, (avatarSpriteSpec SouthFacing 0L).Variant) + + let variantXes = + npcVariants + |> Set.toList + |> List.map (fun variant -> + let rect = characterSourceRectangle { Variant = variant; Direction = SouthFacing; Frame = FrameOne } + rect.X) + |> Set.ofList + Assert.AreEqual(4, variantXes.Count) + Assert.AreEqual(1280, VillageArt.characterAtlasWidth) + [] member _.ChineseCopyProvidesFormalSceneTimeMenuAndStatusLabels () = let labels = -- cgit v1.2.3