From 1ba06527054f649874845830d6bcc56b43bb5b86 Mon Sep 17 00:00:00 2001 From: ZHU MINCHAO <48154958+MinchaoZhu@users.noreply.github.com> Date: Tue, 3 Nov 2026 15:46:47 +0800 Subject: [PATCH] Phase 1 cleanup: stale unlock text, unused code, README layout Co-Authored-By: Claude Sonnet 5.5 --- README.md | 6 +++--- src/Decentralized.Domain/CardLook.cs | 3 --- src/Decentralized/GpuInspectView.cs | 2 +- src/Decentralized/ModFiles/Localization/en.csv | 2 +- src/Decentralized/ModFiles/Localization/zh.csv | 2 +- src/Decentralized/Unlock.cs | 2 +- tests/Decentralized.Domain.Tests/Program.cs | 3 +-- 7 files changed, 8 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index ea8f052..5369d25 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,10 @@ All coins, exchanges and events are fictional and have no real-world value. | Path | Content | |---|---| -| `src/Decentralized.Domain` | Pure logic (assets and ledger, AMM pairs, market, mining). No game or Unity references. | -| `src/Decentralized` | The mod: items (trading terminal, mining rig, graphics cards), nightly settlement, terminal window, news. Builds into `/Mods/ProbablyDecentralized` (`dotnet build src/Decentralized -p:GameDir=...`). | +| `src/Decentralized.Domain` | Pure logic (assets and ledger, AMM pairs, market, mining, graphics card tiers, appearance, labels and serials). No game or Unity references. | +| `src/Decentralized` | The mod: items (trading terminal, mining rig, graphics cards, appraisal guide), used-card dealer, magnifier inspection view with the label bar, nightly settlement, terminal (bank, Poinbase, Web3), news. Builds into `/Mods/ProbablyDecentralized` (`dotnet build src/Decentralized -p:GameDir=...`). | | `tests/Decentralized.Domain.Tests` | Console test runner: `dotnet run --project tests/Decentralized.Domain.Tests` | -| `art/sprites.py` | Generates the item sprites into `src/Decentralized/ModFiles/Textures/Items`. | +| `art/sprites.py`, `art/big.py`, `art/big_cases.py` | Generate the item sprites, the large inspection art and its overlays, and the terminal icons into `src/Decentralized/ModFiles/Textures/Items`. | ## License diff --git a/src/Decentralized.Domain/CardLook.cs b/src/Decentralized.Domain/CardLook.cs index 4bddfc4..2780b8e 100644 --- a/src/Decentralized.Domain/CardLook.cs +++ b/src/Decentralized.Domain/CardLook.cs @@ -111,8 +111,5 @@ namespace Decentralized.Domain /// 真实价值:全部标签都按真实情况算。 public static long True(Unit u) => CardLabels.Value(u, null, 0); - - /// 标称价:贩子报的价,按标称型号算;二手卡也折旧,但只按贩子"自称"的健康度。 - public static long Quoted(Unit u, double claimedHealth) => Of(u.Model, claimedHealth); } } diff --git a/src/Decentralized/GpuInspectView.cs b/src/Decentralized/GpuInspectView.cs index dc0a7bf..f9280be 100644 --- a/src/Decentralized/GpuInspectView.cs +++ b/src/Decentralized/GpuInspectView.cs @@ -148,7 +148,7 @@ namespace Decentralized foreach (var mb in go.GetComponentsInChildren(true)) { string n = mb.GetType().Name; - if (mb is Button || mb is Image || mb is TextMeshProUGUI || mb is CanvasRenderer) continue; + if (mb is Button || mb is Image || mb is TextMeshProUGUI) continue; if (n.Contains("Local") || n.Contains("Appraisal") || n.Contains("Send")) Destroy(mb); } return b; diff --git a/src/Decentralized/ModFiles/Localization/en.csv b/src/Decentralized/ModFiles/Localization/en.csv index bf29fb7..7fb968a 100644 --- a/src/Decentralized/ModFiles/Localization/en.csv +++ b/src/Decentralized/ModFiles/Localization/en.csv @@ -1,7 +1,7 @@ # Probably Decentralized localization table: English (en) # Source language and fallback. Format: key,text (text may be quoted; \n is a line break). upgrade.title,Web3 Governance Community -upgrade.desc,"Members receive a trading terminal, a mining rig and an RZX 50 graphics card. The terminal holds the wallet and trades on the Poinbase exchange. More cards and rigs are sold by Dr. Jackson." +upgrade.desc,"Members receive a trading terminal, a mining rig, an RZX 60 graphics card and a graphics card appraisal guide. The terminal holds the bank, the Poinbase exchange and the Web3 wallet. More cards and rigs are sold by Dr. Jackson." item.terminal.name,Trading Terminal item.terminal.desc,Wallet, the Poinbase exchange and the nightly mining report. item.rig.name,Mining Rig diff --git a/src/Decentralized/ModFiles/Localization/zh.csv b/src/Decentralized/ModFiles/Localization/zh.csv index 031330a..3e4ae2d 100644 --- a/src/Decentralized/ModFiles/Localization/zh.csv +++ b/src/Decentralized/ModFiles/Localization/zh.csv @@ -1,6 +1,6 @@ # Probably Decentralized 本地化表:简体中文(zh) upgrade.title,Web3 治理社区 -upgrade.desc,"成员可获得一台交易终端、一个矿架和一张 RZX 50 显卡。终端用于查看钱包,并在 Poinbase 交易所交易。更多显卡和矿架由杰克逊博士出售。" +upgrade.desc,"成员可获得一台交易终端、一个矿架、一张 RZX 60 显卡和一本显卡鉴定手册。终端里有银行、Poinbase 交易所和 Web3 钱包。更多显卡和矿架由杰克逊博士出售。" item.terminal.name,交易终端 item.terminal.desc,钱包、Poinbase 交易所与夜间挖矿报告。 item.rig.name,矿架 diff --git a/src/Decentralized/Unlock.cs b/src/Decentralized/Unlock.cs index 0e13766..7b71317 100644 --- a/src/Decentralized/Unlock.cs +++ b/src/Decentralized/Unlock.cs @@ -2,7 +2,7 @@ using System; namespace Decentralized { - /// 人脉网络里的"Web3 治理社区":整个 mod 的入口。买下后交付交易终端、一个矿架和一张 RZX 50,并开始每天的行情与挖矿结算;更多显卡、矿架向杰克逊博士购买。 + /// 人脉网络里的"Web3 治理社区":整个 mod 的入口。买下后交付交易终端、一个矿架、一张 RZX 60 和一本显卡鉴定手册,并开始每天的行情与挖矿结算;更多显卡、矿架向杰克逊博士购买。 public static class Unlock { public const string Id = "PD_WEB3_COMMUNITY"; diff --git a/tests/Decentralized.Domain.Tests/Program.cs b/tests/Decentralized.Domain.Tests/Program.cs index 20938d6..54ec9ce 100644 --- a/tests/Decentralized.Domain.Tests/Program.cs +++ b/tests/Decentralized.Domain.Tests/Program.cs @@ -154,8 +154,7 @@ internal static class Program Check(seen.Count >= 60, $"抽样见到 {seen.Count} 种不同组合(上限 243)"); Check(Hardware.Specs["RZX60"].Price == 220 && Hardware.Specs["RZX90"].Price == 5000 && Hardware.Specs["RZ900"].Price == 4000, "价格已抬高到约 1.8 倍"); var u = new Unit { Model = "RZX90", FakeOf = "RZX60", Health = 80 }; - Check(CardValue.True(u) == CardValue.Of("RZX60", 80) && CardValue.Quoted(u, 80) == CardValue.Of("RZX90", 80), "真实价值按芯片型号,标称价按标称型号"); - Check(CardValue.Quoted(u, 80) > CardValue.True(u) * 8, $"假 RZX 90 的标称价 {CardValue.Quoted(u, 80)} 远高于真值 {CardValue.True(u)}"); + Check(CardValue.True(u) == CardValue.Of("RZX60", 80) && CardValue.Of("RZX90", 80) > CardValue.True(u) * 8, "真实价值按芯片型号,标称型号的价远高于真值"); var worn = new Unit { Model = "RZX70", Health = 100, Look = new CardLook { Fan = 2, Fingers = 2, Bracket = 1, Sticker = 2 } }; Check(CardValue.True(worn) == (long)Math.Round(800 * (1 - 0.12 - 0.12 - 0.02 - 0.06)), "各标签折扣相加进真实价值:风扇缺角 + 金手指氧化 + 划痕 + 封条缺失"); var clean = new Unit { Model = "RZX70", Health = 80 };