鉴定指南与检视面板:各语言排版核对与修正、示例数字、去掉卖家说法文字、波兰语挡板误译

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ZHU MINCHAOandClaude Sonnet 5.5 committed 2026-11-04 21:50:35 +08:00
1 parent 564bf2d588
commit 39ab7822ba
5 files changed
+66 -44

No files matched your search

+49 -28
View File
@@ -122,12 +122,13 @@ namespace Decentralized
return y + h + gap;
}
/// <summary>小节标题(原版的蓝灰色粗体小标题)。</summary>
/// <summary>小节标题(原版的蓝灰色粗体小标题);标题太长折行时按折行后的高度往下推。</summary>
private static float Section(PaperUI b, float y, string text)
{
b.AddText(X, y, W, 13, text, "label", fontSize: 8f);
float h = Mathf.Max(13f, Measure(text, "label", 8f, W));
b.AddText(X, y, W, h, text, "label", fontSize: 8f);
b.Last.color = "#2E5A78";
return y + 15f;
return y + h + 2f;
}
/// <summary>一张图(底图加叠加层,同一个位置),居中,宽高是显示尺寸;返回图的底边。</summary>
@@ -160,6 +161,13 @@ namespace Decentralized
b.Last.color = "#1B1B1B";
}
/// <summary>剩余高度能放下的图缩放(图高 128 设计单位):长语言文字多,图自动缩小,不超出纸面。</summary>
private static float FitScale(float usedHeight, int count, float max, float min = 0.3f)
{
float avail = Bottom - Top - usedHeight;
return Mathf.Clamp(avail / (128f * count), min, max);
}
private static string SampleSerial(string model, string chip = null, int kind = 0)
{
var u = new Unit { Model = model, FakeOf = chip, Health = 100, Look = new CardLook { Seed = 31337, Serial = kind } };
@@ -170,13 +178,16 @@ namespace Decentralized
private static void Page1(PaperUI b)
{
float y = NewPage(b);
y = Text(b, y, L.T("gg.p1.body"), gap: 6f);
float x = X + (W - 192f * 0.9f) / 2;
float bottom = Art(b, x, y, 0.9f, Front("probidia", 1));
string body = L.T("gg.p1.body"), makers = L.T("gg.p1.makers"), note = T("gg.p1.note");
float used = Measure(body, "body", 0, W) + Measure(makers, "body", 0, W) + Measure(note, "body", 7f, W) + 6f + 14f + 8f + 14f;
float scale = FitScale(used, 1, 0.9f);
y = Text(b, y, body, gap: 6f);
float x = X + (W - 192f * scale) / 2;
float bottom = Art(b, x, y, scale, Front("probidia", 1));
Caption(b, X, bottom + 1, W, L.T("gg.p1.cap"));
y = bottom + 16f;
y = Text(b, y, L.T("gg.p1.makers"), gap: 8f);
Text(b, y, T("gg.p1.note"), "body", Good);
y = bottom + 14f;
y = Text(b, y, makers, gap: 8f);
Text(b, y, note, "body", Good);
b.Last.fontSize = 7f;
}
@@ -207,10 +218,12 @@ namespace Decentralized
{
float y = NewPage(b);
y = Section(b, y, L.T("gg.count.h"));
y = Text(b, y, L.T("gg.count.body"), gap: 6f);
string cb = L.T("gg.count.body");
float cs = FitScale(15f + Measure(cb, "body", 0, W) + 6f + 3 * 15f, 3, 0.5f, 0.3f);
y = Text(b, y, cb, gap: 6f);
for (int n = 1; n <= 3; n++)
{
float bottom = Art(b, X + (W - 96f) / 2, y, 0.5f, Front("probidia", 1, n));
float bottom = Art(b, X + (W - 192f * cs) / 2, y, cs, Front("probidia", 1, n));
Caption(b, X, bottom, W, L.T("lbl.count." + n));
y = bottom + 15f;
}
@@ -221,10 +234,12 @@ namespace Decentralized
{
float y = NewPage(b);
y = Section(b, y, L.T("gg.pin.h"));
y = Text(b, y, L.T("gg.pin.body"), gap: 6f);
string pbd = L.T("gg.pin.body");
float ps = FitScale(15f + Measure(pbd, "body", 0, W) + 6f + 3 * 15f, 3, 0.5f, 0.3f);
y = Text(b, y, pbd, gap: 6f);
for (int p = 0; p < 3; p++)
{
float bottom = Art(b, X + (W - 96f) / 2, y, 0.5f, Front("probidia", p, 2));
float bottom = Art(b, X + (W - 192f * ps) / 2, y, ps, Front("probidia", p, 2));
Caption(b, X, bottom, W, L.T("lbl.pin." + p));
y = bottom + 15f;
}
@@ -235,15 +250,18 @@ namespace Decentralized
{
float y = NewPage(b);
y = Section(b, y, L.T("gg.serial.h"));
y = Text(b, y, L.T("gg.serial.body"), gap: 6f);
float ax = X + (W - 150f) / 2;
float bottom = Art(b, ax, y, 0.78f, "gpu_big_probidia_b", "gpu_big_ov_print_normal_rtx80");
SerialOnSticker(b, ax, y, 0.78f, SampleSerial("RTX80"));
string body = L.T("gg.serial.body"), pb = L.T("gg.serial.pb"), md = L.T("gg.serial.md"), rule = L.T("gg.serial.rule");
float used = 15f + Measure(body, "body", 0, W) + Measure(pb, "body", 0, W) + Measure(md, "body", 0, W) + Measure(rule, "body", 0, W) + 6f + 14f + 4f + 8f;
float scale = FitScale(used, 1, 0.78f);
y = Text(b, y, body, gap: 6f);
float ax = X + (W - 192f * scale) / 2;
float bottom = Art(b, ax, y, scale, "gpu_big_probidia_b", "gpu_big_ov_print_normal_rtx80");
SerialOnSticker(b, ax, y, scale, SampleSerial("RTX80"));
Caption(b, X, bottom + 1, W, L.T("gg.serial.cap"));
y = bottom + 16f;
y = Text(b, y, L.T("gg.serial.pb"), gap: 4f);
y = Text(b, y, L.T("gg.serial.md"), gap: 8f);
Text(b, y, L.T("gg.serial.rule"), "body");
y = bottom + 14f;
y = Text(b, y, pb, gap: 4f);
y = Text(b, y, md, gap: 8f);
Text(b, y, rule, "body");
}
// ---- 6 背面丝印 ----
@@ -251,17 +269,19 @@ namespace Decentralized
{
float y = NewPage(b);
y = Section(b, y, L.T("gg.print.h"));
string note = L.T("gg.print.note");
string[] kinds = { "normal", "stamp", "skew" };
float scale = FitScale(15f + Measure(note, "body", 0, W) + 3 * 14f, 3, 0.5f, 0.3f);
for (int s = 0; s < 3; s++)
{
string model = s == 1 ? "rtx60" : "rtx80";
float ax = X + (W - 96f) / 2;
float bottom = Art(b, ax, y, 0.5f, "gpu_big_probidia_b", $"gpu_big_ov_print_{kinds[s]}_{model}");
SerialOnSticker(b, ax, y, 0.5f, SampleSerial("RTX80"));
float ax = X + (W - 192f * scale) / 2;
float bottom = Art(b, ax, y, scale, "gpu_big_probidia_b", $"gpu_big_ov_print_{kinds[s]}_{model}");
SerialOnSticker(b, ax, y, scale, SampleSerial("RTX80"));
Caption(b, X, bottom, W, L.T("gg.print." + s), s == 0 ? null : Bad);
y = bottom + 14f;
}
Text(b, y, L.T("gg.print.note"), "body");
Text(b, y, note, "body");
}
// ---- 7 叶片与金手指 ----
@@ -375,8 +395,8 @@ namespace Decentralized
y = Text(b, y, L.T("gg.ex.claimed", CardValue.Of(e.Label, e.Health)), "caption", Ink, "right", 3f, lx, lw);
}
y = Text(b, y, L.T("gg.ex.base", baseV), "caption", Ink, "right", 3f, lx, lw);
int n = 0;
long Disc(double p) { n++; return (long)Math.Round(baseV * p); }
int n = 0; long discSum = 0;
long Disc(double p) { n++; long d = (long)Math.Round(baseV * p); discSum += d; return d; }
if (e.Fan == 1) y = Text(b, y, L.T("gg.ex.fan1", Disc(Tuning.CardFanDust)), "caption", Bad, "right", 3f, lx, lw);
if (e.Fan == 2) y = Text(b, y, L.T("gg.ex.fan", Disc(Tuning.CardFanChipped)), "caption", Bad, "right", 3f, lx, lw);
if (e.Fingers == 1) y = Text(b, y, L.T("gg.ex.fin", Disc(Tuning.CardFingersDark)), "caption", Bad, "right", 3f, lx, lw);
@@ -387,7 +407,8 @@ namespace Decentralized
y += 3f;
b.AddLine(lx, y, lx + lw, y, 1f, "#6A6458");
y += 6f;
long total = CardLabels.Value(u, null, 0);
// 外观写死(种子 0)才不会被健康度重算覆盖,价值按它算;序列号要种子,用上面带种子的那个
long total = baseV - discSum; // 页面上各项相加,和游戏的价值函数差不过 1(四舍五入)
y = Text(b, y, L.T("gg.ex.total", total), "label", Ink, "right", 8f, lx, lw);
if (e.Chip != null) y = Text(b, y, L.T("gg.ex.gap", CardValue.Of(e.Label, e.Health) - total), "caption", Bad, "right", 8f, lx, lw);
Text(b, y, L.T("gg.ex.note"), "caption", Ink, "center");
+3 -3
View File
@@ -189,8 +189,8 @@ namespace Decentralized
{
int row = CardLabels.Rows[i];
float y = GroupTop(i) - RowH / 2;
rowName[i] = MakeText(root, "RowName" + i, new Vector2(-245, y), new Vector2(130, RowH), TextAlignmentOptions.Left, 20);
rowText[i] = MakeText(root, "RowText" + i, new Vector2(-20, y), new Vector2(330, RowH), TextAlignmentOptions.Left, 20);
rowName[i] = MakeText(root, "RowName" + i, new Vector2(-232, y), new Vector2(156, RowH), TextAlignmentOptions.Left, 20);
rowText[i] = MakeText(root, "RowText" + i, new Vector2(24, y), new Vector2(300, RowH), TextAlignmentOptions.Left, 20);
rowButton[i] = MakeButton(root, "RowButton" + i, new Vector2(245, y), new Vector2(110, RowH - 3), out rowButtonText[i]);
rowButton[i].onClick.AddListener(() => Log.Guard("标签栏", () => OnRowButton(row)));
}
@@ -238,7 +238,7 @@ namespace Decentralized
{
text = Show(real);
bool lied = row == CardLabels.RowSpec ? claim.Value.Model != real.Model : claim.Value.Get(row) != real.Get(row);
if (lied) { color = new Color(1f, 0.45f, 0.4f); if (!CardLabels.IsAuth(row)) text += L.T("lbl.said", Show(claim.Value)); }
if (lied) color = new Color(1f, 0.45f, 0.4f); // 卖家的说法只在机制里起作用,面板上不写
else color = new Color(0.5f, 1f, 0.55f);
}
else text = Show(claim.Value);
@@ -95,12 +95,12 @@ cust.worn.1,Nie to pisałeś. Pominąłeś wady.
cust.worn.2,Stan na etykiecie to kłamstwo. Nie za tę cenę.
lbl.row.fan,Łopatki
lbl.row.fingers,Styki
lbl.row.bracket,Śledź
lbl.row.bracket,Zaślepka
lbl.row.print,Nadruk z tyłu
lbl.row.serial,Nr seryjny
lbl.row.seal,Plomba
lbl.bracket.0,Nienaruszony
lbl.bracket.1,Porysowany
lbl.bracket.0,Nienaruszona
lbl.bracket.1,Porysowana
lbl.serial.0,Prawidłowy
lbl.serial.1,Zły kod fabryki lub zła długość
lbl.serial.2,Kod modelu nie pasuje
@@ -814,9 +814,9 @@ gg.fin.h,Styki
gg.fin.0,Błyszczące (cena bez zmian)
gg.fin.1,Zmatowiałe (-{CardFingersDark:%})
gg.fin.2,Utlenione (-{CardFingersOxidized:%})
gg.brk.h,Śledź
gg.brk.0,Nienaruszony (cena bez zmian)
gg.brk.1,Porysowany (-{CardBracketScratch:%})
gg.brk.h,Zaślepka
gg.brk.0,Nienaruszona (cena bez zmian)
gg.brk.1,Porysowana (-{CardBracketScratch:%})
gg.seal.h,Plomba
gg.seal.0,Nienaruszona (cena bez zmian)
gg.seal.2,Brak (-{CardSealMissing:%})
1 # Probably Decentralized localization table: Polish (pl)
95 cust.worn.2
96 lbl.row.fan
97 lbl.row.fingers
98 lbl.row.bracket
99 lbl.row.print
100 lbl.row.serial
101 lbl.row.seal
102 lbl.bracket.0
103 lbl.bracket.1
104 lbl.serial.0
105 lbl.serial.1
106 lbl.serial.2
814 gg.fin.0
815 gg.fin.1
816 gg.fin.2
817 gg.brk.h
818 gg.brk.0
819 gg.brk.1
820 gg.seal.h
821 gg.seal.0
822 gg.seal.2
+7 -7
View File
@@ -16,7 +16,7 @@ namespace Decentralized
public string Name;
public string Label, Chip; // 标称型号;真实芯片(null 表示真卡)
public double Health;
public int Fan, Fingers, Bracket, Print, Sticker, Serial;
public int Fan, Fingers, Bracket, Print, Sticker, Serial, CountBad, PinBad;
public bool Honest; // 卖家如实说
}
@@ -29,11 +29,11 @@ namespace Decentralized
new Case { Name = "旗舰九成新", Label = "RTX90", Health = 92, Honest = true },
new Case { Name = "PMD 高端磨损", Label = "RX800", Health = 55, Fan = 2, Fingers = 1, Bracket = 1 },
new Case { Name = "旗舰氧化", Label = "RX900", Health = 28, Fan = 2, Fingers = 2, Bracket = 1, Sticker = 2 },
new Case { Name = "低档冒充旗舰:接口数对不上", Label = "RTX90", Chip = "RTX60", Health = 90 },
new Case { Name = "重印丝印", Label = "RX900", Chip = "RX80", Health = 80, Print = 2 },
new Case { Name = "丝印印着真实型号", Label = "RTX80", Chip = "RTX60", Health = 75, Print = 1, Serial = 2 },
new Case { Name = "手贴序列号", Label = "RX800", Chip = "RX70", Health = 65, Serial = 1, Sticker = 2 },
new Case { Name = "全套破绽加老化", Label = "RTX90", Chip = "RTX70", Health = 45, Fan = 1, Fingers = 2, Print = 2, Serial = 2, Sticker = 2 },
new Case { Name = "低档冒充旗舰:接口数对不上", Label = "RTX90", Chip = "RTX60", Health = 90, CountBad = 1, PinBad = 1 },
new Case { Name = "重印丝印", Label = "RX900", Chip = "RX80", Health = 80, Print = 2, CountBad = 1 },
new Case { Name = "丝印印着真实型号", Label = "RTX80", Chip = "RTX60", Health = 75, Print = 1, Serial = 2, PinBad = 1 },
new Case { Name = "手贴序列号", Label = "RX800", Chip = "RX70", Health = 65, Serial = 1, Sticker = 2, CountBad = 1, PinBad = 1 },
new Case { Name = "全套破绽加老化", Label = "RTX90", Chip = "RTX70", Health = 45, Fan = 1, Fingers = 2, Print = 2, Serial = 2, Sticker = 2, PinBad = 1 },
};
private static int _next;
@@ -51,7 +51,7 @@ namespace Decentralized
public static GameItem Make(Case c, DealerKind kind)
{
var item = ModHelper.SpawnItem(Items.GpuId(c.Label));
var look = new CardLook { Seed = 0, Fan = c.Fan, Fingers = c.Fingers, Bracket = c.Bracket, Print = c.Print, Sticker = c.Sticker, Serial = c.Serial };
var look = new CardLook { Seed = 0, Fan = c.Fan, Fingers = c.Fingers, Bracket = c.Bracket, Print = c.Print, Sticker = c.Sticker, Serial = c.Serial, CountBad = c.CountBad, PinBad = c.PinBad };
Items.Store(item, new Unit { Model = c.Label, FakeOf = c.Chip, Health = c.Health, Look = look });
GeneralHelper.SetItemOwned(item, false);
var u = Items.ToUnit(item);