2026-06-26 12:46:32 +09:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
// Public Tarinai need-planning entrypoint. This owns the resolveNeeds boundary
|
|
|
|
|
// used by Tarinai.prototype.resolveNeeds and by future planner decomposition.
|
|
|
|
|
|
|
|
|
|
(function (global) {
|
|
|
|
|
function updateOne(tarinai, dt = 0) {
|
|
|
|
|
if (!tarinai || tarinai.dead) return false;
|
|
|
|
|
global.TarinaiForcedActionPlannerSystem?.prepare?.(tarinai, dt);
|
|
|
|
|
return Boolean(global.TarinaiActionPlannerSystem?.updateOne?.(tarinai, dt)
|
2026-06-26 19:04:32 +09:00
|
|
|
?? global.TarinaiNeedPlannerCoreSystem?.updateOne?.(tarinai, dt));
|
2026-06-26 12:46:32 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function updateWithThis(dt = 0) {
|
|
|
|
|
return updateOne(this, dt);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
global.TarinaiNeedPlannerSystem = Object.freeze({
|
|
|
|
|
updateOne,
|
|
|
|
|
updateWithThis,
|
|
|
|
|
});
|
|
|
|
|
})(typeof window !== "undefined" ? window : globalThis);
|