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

fix: 修复实体属性应用函数未返回默认值的问题

修改FieldStore.gd中entityApplier的函数,确保所有函数都返回true
修复Feed.gd中get方法调用缺少默认参数的问题
This commit is contained in:
2025-08-28 14:05:39 +08:00
parent 858a312626
commit 62c8f44508
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -68,7 +68,7 @@ func apply(entity: EntityBase):
for i in range(min(fields.size(), fieldValues.size())):
var field = fields[i]
var value = fieldValues[i]
var applier = FieldStore.entityApplier.get(field, null)
var applier = FieldStore.entityApplier.get(field)
if !applier or applier.call(entity, value):
entity.fields[field] += value
entity.fields[field] = clamp(entity.fields[field], 0, FieldStore.entityMaxValueMap.get(field, INF))