y
This commit is contained in:
parent
61718e2981
commit
f657b6a4a4
94 changed files with 3970 additions and 1241 deletions
|
|
@ -110,6 +110,7 @@
|
|||
if (typeof global.consumeBehaviorTarget !== "function") return null;
|
||||
const type = itemType(item);
|
||||
const label = typeof global.toolLabel === "function" ? global.toolLabel(type) : type;
|
||||
const healthNeedBefore = Number(tarinai.needs?.health);
|
||||
const consumed = global.consumeBehaviorTarget(tarinai, worldRef, item, roleFor(item), 0.18);
|
||||
if (!consumed) return null;
|
||||
const nutrition = global.TarinaiItemRegistry?.food?.nutrition?.(type, 0) ?? 0;
|
||||
|
|
@ -132,7 +133,9 @@
|
|||
global.TarinaiAchievements?.recordDirectFeed?.({ world: worldRef, tarinai, item, type, source: options.source || "direct" });
|
||||
} else {
|
||||
tarinai.focusPulseTimer = Math.max(Number(tarinai.focusPulseTimer || 0) || 0, 0.72);
|
||||
global.TarinaiAchievements?.recordDirectCare?.({ world: worldRef, tarinai, item, type, treatment: MEDICINE_TOOL_TYPES.has(type), source: options.source || "direct" });
|
||||
const healthNeedAfter = Number(tarinai.needs?.health);
|
||||
const beneficialRecovery = Number.isFinite(healthNeedBefore) && Number.isFinite(healthNeedAfter) && healthNeedAfter < healthNeedBefore - 0.0001;
|
||||
global.TarinaiAchievements?.recordDirectCare?.({ world: worldRef, tarinai, item, type, beneficialRecovery, source: options.source || "direct" });
|
||||
}
|
||||
|
||||
const sourceLabel = options.source === "pinch" ? "\u624b\u6e21\u3057\u3067" : "\u76f4\u63a5";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue