This commit is contained in:
33333-33333 2026-06-26 12:46:32 +09:00
commit 86226ccc94
97 changed files with 5790 additions and 2307 deletions

View file

@ -0,0 +1,21 @@
"use strict";
// Layer: entity-runtime/tarinai/update-step
// Owns low-frequency local environment effects around a Tarinai.
(function (global) {
function update(t, dt, context = {}) {
if (!t || t.dead) return { done: true };
t.envTimer += dt;
const urgentAi = Boolean(context.urgentAi);
const envInterval = 3.0 + stableUnit(t.familyKey || t.id, "env-phase") * 1.4;
if (t.envTimer >= envInterval && t.world.spendScheduledWork?.("env", urgentAi || t.world.selected === t) !== false) {
const envDt = Math.min(t.envTimer, 1.2);
t.envTimer = 0;
if (global.TarinaiLocalEnvironmentSystem?.updateOne) global.TarinaiLocalEnvironmentSystem.updateOne(t, envDt);
else t.applyEnvironment?.(envDt);
}
return { done: false };
}
global.TarinaiEnvironmentUpdateStep = Object.freeze({ update });
})(typeof window !== "undefined" ? window : globalThis);