summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/LivingVillage.Desktop.Tests/LivingVillage.Desktop.Tests.fsproj1
-rw-r--r--src/LivingVillage.Desktop.Tests/P61GlyphCoverageTests.fs2
-rw-r--r--src/LivingVillage.Desktop.Tests/P69CopyAuditTests.fs35
-rw-r--r--src/LivingVillage.Desktop/ChineseText.fs2
-rw-r--r--src/LivingVillage.Desktop/Game.fs2
-rw-r--r--src/LivingVillage.Desktop/Interaction.fs2
-rw-r--r--src/LivingVillage.Desktop/PlayerTrade.fs2
7 files changed, 41 insertions, 5 deletions
diff --git a/src/LivingVillage.Desktop.Tests/LivingVillage.Desktop.Tests.fsproj b/src/LivingVillage.Desktop.Tests/LivingVillage.Desktop.Tests.fsproj
index 6d1a3e8..a404797 100644
--- a/src/LivingVillage.Desktop.Tests/LivingVillage.Desktop.Tests.fsproj
+++ b/src/LivingVillage.Desktop.Tests/LivingVillage.Desktop.Tests.fsproj
@@ -41,6 +41,7 @@
<Compile Include="P66TaskTargetTests.fs" />
<Compile Include="P67TaskTargetUiTests.fs" />
<Compile Include="P68MapSnapshotTests.fs" />
+ <Compile Include="P69CopyAuditTests.fs" />
<Compile Include="SampleTests.fs" />
</ItemGroup>
diff --git a/src/LivingVillage.Desktop.Tests/P61GlyphCoverageTests.fs b/src/LivingVillage.Desktop.Tests/P61GlyphCoverageTests.fs
index f5f1a10..a2c1038 100644
--- a/src/LivingVillage.Desktop.Tests/P61GlyphCoverageTests.fs
+++ b/src/LivingVillage.Desktop.Tests/P61GlyphCoverageTests.fs
@@ -82,7 +82,7 @@ type P61GlyphCoverageTests () =
let pinned =
[ HudLayout.seasonNames |> String.concat ""
HudLayout.calendarLine1 { Season = "春"; DayNumber = 1L; Period = "清晨"; Clock = "06:00" }
- "第 1/3 页 空格 翻页 Esc 关闭"
+ "第 1/3 页 空格 翻页 ESC 关闭"
"背包物品×1"
"鱼"; "卷轴"; "香料"; "玩家"; "回车:接受任务" ]
let missing =
diff --git a/src/LivingVillage.Desktop.Tests/P69CopyAuditTests.fs b/src/LivingVillage.Desktop.Tests/P69CopyAuditTests.fs
new file mode 100644
index 0000000..cd5e221
--- /dev/null
+++ b/src/LivingVillage.Desktop.Tests/P69CopyAuditTests.fs
@@ -0,0 +1,35 @@
+namespace LivingVillage.Desktop.Tests
+
+open Microsoft.VisualStudio.TestTools.UnitTesting
+open LivingVillage.Kernel
+open LivingVillage.Kernel.Sim
+open LivingVillage.Desktop
+
+/// P69(文案统一审校):把玩家可见中文文案里不一致的措辞/大小写/留白拉齐,并补回归断言。
+/// 本单只改字符串字面量与相关断言;不改逻辑、不改 Kernel/Sim。
+[<TestClass>]
+type P69CopyAuditTests () =
+
+ [<TestMethod>]
+ member _.PanelStatusWordingIsUnified () =
+ // 「需求面板已打开 / 任务面板已打开」同一句式;年鉴原为「年鉴已打开」,统一为「年鉴面板已打开」。
+ Assert.AreEqual<string>(
+ "年鉴面板已打开",
+ M5Interaction.statusText { M5Interaction.initial with Status = "chronicle" })
+ Assert.AreEqual<string>(
+ "需求面板已打开",
+ M5Interaction.statusText { M5Interaction.initial with Status = "needs panel open" })
+ Assert.AreEqual<string>(
+ "任务面板已打开",
+ M5Interaction.statusText { M5Interaction.initial with Status = "task panel open" })
+ Assert.IsTrue(ChineseText.requiredUiLabels |> List.contains "年鉴面板已打开")
+ Assert.IsFalse(ChineseText.requiredUiLabels |> List.contains "年鉴已打开")
+
+ [<TestMethod>]
+ member _.TradeShortageUsesStockWording () =
+ // 交易缺货口径统一为「库存不足」(与对话交易失败名一致),不再用「背包不足」。
+ let state = { Occupation.stateOf Occupation.Farmer with Backpack = [ (Food, 1) ] }
+ let world = WorldBootstrap.initialWorldWithOccupation false 42UL 4 (Some state)
+ let outcome = PlayerTrade.sell (Some state) (NpcId 0) Food 3 world
+ Assert.IsFalse(outcome.Succeeded, "shortage sale must not succeed")
+ Assert.AreEqual<string>("库存不足", outcome.Message)
diff --git a/src/LivingVillage.Desktop/ChineseText.fs b/src/LivingVillage.Desktop/ChineseText.fs
index 349bbec..7bd8bc5 100644
--- a/src/LivingVillage.Desktop/ChineseText.fs
+++ b/src/LivingVillage.Desktop/ChineseText.fs
@@ -119,7 +119,7 @@ module ChineseText =
"请选择对话方式"
"对话完成"
"对话失败"
- "年鉴已打开"
+ "年鉴面板已打开"
"E 出屋"
"E 进屋"
"E 交谈"
diff --git a/src/LivingVillage.Desktop/Game.fs b/src/LivingVillage.Desktop/Game.fs
index ba925f3..63f69cd 100644
--- a/src/LivingVillage.Desktop/Game.fs
+++ b/src/LivingVillage.Desktop/Game.fs
@@ -3271,7 +3271,7 @@ type LivingVillageGame() as this =
PixelText.draw spriteBatch pixel cjkAtlas textX y DialogOverlay.textScale palette.Value line)
// 分页标记:页码 + 翻页/关闭提示;有下一页时显示箭头。
let marker =
- sprintf "第 %d/%d 页 空格 翻页 Esc 关闭" current.PageNumber current.PageCount
+ sprintf "第 %d/%d 页 空格 翻页 ESC 关闭" current.PageNumber current.PageCount
let markerWidth = FloatingPrompt.measureWidth marker DialogOverlay.textScale
let markerX = lx + layout.Width - DialogOverlay.paddingX - markerWidth
let markerY = ly + layout.Height - DialogOverlay.pageMarkerHeight
diff --git a/src/LivingVillage.Desktop/Interaction.fs b/src/LivingVillage.Desktop/Interaction.fs
index 6c62661..3a65e8e 100644
--- a/src/LivingVillage.Desktop/Interaction.fs
+++ b/src/LivingVillage.Desktop/Interaction.fs
@@ -591,7 +591,7 @@ module M5Interaction =
let reason = value.Substring("dialogue rejected:".Length).Trim()
if String.IsNullOrWhiteSpace reason then "对话失败" else sprintf "对话失败:%s" reason
| value when value.StartsWith("observation") -> "观察完成"
- | value when value.StartsWith("chronicle") -> "年鉴已打开"
+ | value when value.StartsWith("chronicle") -> "年鉴面板已打开"
| "task panel open" -> "任务面板已打开"
| value when value.StartsWith("task|") -> value.Substring("task|".Length)
| value when value.StartsWith("inquiry|") -> value.Substring("inquiry|".Length)
diff --git a/src/LivingVillage.Desktop/PlayerTrade.fs b/src/LivingVillage.Desktop/PlayerTrade.fs
index 407536c..8436d9f 100644
--- a/src/LivingVillage.Desktop/PlayerTrade.fs
+++ b/src/LivingVillage.Desktop/PlayerTrade.fs
@@ -187,7 +187,7 @@ module PlayerTrade =
| Some buyer when quantity <= 0 -> failure state world "数量必须大于零"
| Some buyer ->
if Occupation.backpackQuantity item occupation < quantity then
- failure state world "背包不足"
+ failure state world "库存不足"
else
match quote (Some occupation) false counterparty item quantity world with
| None -> failure state world "无法报价"