stable
This commit is contained in:
parent
fbdac9ebf1
commit
86226ccc94
97 changed files with 5790 additions and 2307 deletions
22
js/tarinai_need_planner_system.js
Normal file
22
js/tarinai_need_planner_system.js
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
"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)
|
||||
?? global.TarinaiNeedPlannerLegacySystem?.updateOne?.(tarinai, dt));
|
||||
}
|
||||
|
||||
function updateWithThis(dt = 0) {
|
||||
return updateOne(this, dt);
|
||||
}
|
||||
|
||||
global.TarinaiNeedPlannerSystem = Object.freeze({
|
||||
updateOne,
|
||||
updateWithThis,
|
||||
});
|
||||
})(typeof window !== "undefined" ? window : globalThis);
|
||||
Loading…
Add table
Add a link
Reference in a new issue