1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-27 22:41:56 +08:00

feat: 增加FieldShow组件的maxed属性,优化最大值显示逻辑

This commit is contained in:
2025-09-06 19:29:46 +08:00
parent 6eefcac5e1
commit f387e206d5
5 changed files with 16 additions and 3 deletions
+2
View File
@@ -72,6 +72,8 @@ func rebuildInfo():
var fieldShow: FieldShow = preload("res://components/UI/FieldShow.tscn").instantiate()
fieldShow.field = field
fieldShow.value = value
if is_instance_valid(UIState.player):
fieldShow.maxed = value + UIState.player.fields[field] > FieldStore.entityMaxValueMap.get(field, INF)
fieldsBox.add_child(fieldShow)
if noField:
fieldsBox.add_child(QuickUI.smallText("无词条"))