fix: show correct SCUM catalog item names

This commit is contained in:
npc0-hue
2026-09-25 02:08:00 +08:00
parent abc392d22c
commit 2785feb745
2 changed files with 32 additions and 14 deletions
+19
View File
@@ -352,6 +352,25 @@ describe("SCUM plugin feature module", () => {
expect(scumCatalogDisplayName(aloe)).toBe("芦荟");
expect(scumCatalogDisplayName(vehicle)).toBe("莱卡");
expect(scumCatalogDisplayName(militaryBackpack)).toBe("军用背包 黑色");
const correctedNames: Record<string, string> = {
Bundle_Of_Rags_Dirty: "脏布条捆",
Bundle_Of_Safety_Pins: "安全别针捆",
Bundle_Of_Stone_Tips: "石箭头捆",
Bundle_Rag_Stripes: "布条捆",
Bundle_Wooden_Plank: "木板捆",
CementBag: "水泥袋",
Charcoal: "木炭",
Christmas_Tree: "圣诞树",
Coal_01: "煤块",
Copper_Strip: "铜条",
Depleted_Uranium: "贫铀",
Donkey_Head: "驴头"
};
for (const [code, name] of Object.entries(correctedNames)) {
expect(scumCatalogDisplayName(scumCatalogEntries.find((item) => item.code === code)!)).toBe(name);
}
const untranslated = scumCatalogEntries.find((item) => item.code === "Agaricus_Augustus")!;
expect(scumCatalogDisplayName(untranslated)).toBe("Agaricus Augustus");
expect(scumCatalogSearchText(aloe)).toContain("芦荟");
expect(scumCatalogSearchText(bigBackpack)).toContain("大背包");
expect(scumCatalogSearchText(militaryHelmet)).toContain("军用头盔");