This commit is contained in:
33333-33333 2026-07-18 13:06:02 +09:00
commit f657b6a4a4
94 changed files with 3970 additions and 1241 deletions

View file

@ -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";