From 821eb1b960ec79829e3264f212aea49523bf9406 Mon Sep 17 00:00:00 2001 From: ZHU MINCHAO <48154958+MinchaoZhu@users.noreply.github.com> Date: Tue, 3 Nov 2026 13:20:11 +0800 Subject: [PATCH] Appraisal test helpers: put a client with appraisal cards in front of the counter --- src/Decentralized/DealerStock.cs | 3 +++ src/Decentralized/UsedDealerClient.cs | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Decentralized/DealerStock.cs b/src/Decentralized/DealerStock.cs index c850545..dbd62cc 100644 --- a/src/Decentralized/DealerStock.cs +++ b/src/Decentralized/DealerStock.cs @@ -35,6 +35,9 @@ namespace Decentralized if (depth < 5) foreach (Transform c in t) Walk(c, depth + 1); } var m = InspectionUIManager.Instance; + var ci = PlayerStore.Instance.currentClientInstance; + sb.AppendLine("当前顾客:" + (ci == null ? "无" : ci.GetClientBlueprint().identifier + " 意图 " + ci.GetClientBlueprint().clientIntent)); + sb.AppendLine("检视物品:" + (m.currentInspectingItem?.identifier ?? "无") + " APPRAISAL=" + (m.currentInspectingItem?.IsTag("APPRAISAL_ITEM") ?? false)); Walk(m.panel.transform, 0); Log.Info(sb.ToString()); })); diff --git a/src/Decentralized/UsedDealerClient.cs b/src/Decentralized/UsedDealerClient.cs index 4630e29..b5b9feb 100644 --- a/src/Decentralized/UsedDealerClient.cs +++ b/src/Decentralized/UsedDealerClient.cs @@ -25,7 +25,9 @@ namespace Decentralized while (AppraisalRankHelper.GetRank() < 2) AppraisalRankHelper.Promote(); var pool = AppraisalItemRegistry.GetPool(AppraisalRankHelper.GetRank()); Log.Info($"鉴定等级 {AppraisalRankHelper.GetRank()},可抽的物品:{string.Join(", ", pool.ConvertAll(t => t.id))}"); - PlayerStore.Instance.storeClientManager.AddNextClient(StoreClientListAppraisal.CreateAppraisalRandom()); + var client = StoreClientListAppraisal.CreateAppraisalRandom(); + PlayerStore.Instance.currentClientInstance = StoreClientInstance.CreateClientInstance(client); // 测试:直接换成鉴定客户 + for (int i = 0; i < 3; i++) PlayerStore.Instance.AddDirectSellingItemToTable(CreateForAppraisal()); })); ModHelper.AddDebugFunction(ModInfo.Id, ModInfo.Name, "Appraisal cards to counter (test)", () => Log.Guard("鉴定显卡(测试)", () => {