From 4c4af7c8c7c0cc52d4392cc6fc79f8b4d94bea93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=A8=E8=90=BD=E5=9F=BA=E5=9B=B4=E8=99=BE?= <3161880837@qq.com> Date: Tue, 30 Sep 2025 17:38:00 +0800 Subject: [PATCH] =?UTF-8?q?fix(Feed):=20=E4=BF=AE=E5=A4=8DcostShow.count?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E9=94=99=E8=AF=AF=EF=BC=8C=E4=BD=BF=E7=94=A8?= =?UTF-8?q?countOf=E6=96=B9=E6=B3=95=E6=9B=BF=E4=BB=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原计算方式使用了multipiler方法可能导致显示数量错误,现统一使用countOf方法确保显示数量准确 --- scripts/Structs/Feed.gd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/Structs/Feed.gd b/scripts/Structs/Feed.gd index e5195d2..eccd24f 100644 --- a/scripts/Structs/Feed.gd +++ b/scripts/Structs/Feed.gd @@ -104,9 +104,9 @@ func rebuildInfo(): i.queue_free() for i in range(min(costs.size(), costCounts.size())): var cost = costs[i] - var count = costCounts[i] + var count = countOf(i) var costShow: ItemShow = ComponentManager.getUIComponent("ItemShow").instantiate() - costShow.enough = is_instance_valid(UIState.player) and UIState.player.inventory[cost] >= countOf(i) + costShow.enough = is_instance_valid(UIState.player) and UIState.player.inventory[cost] >= count costShow.type = cost - costShow.count = int(count * multipiler()) + costShow.count = count costsBox.add_child(costShow)