"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; global.TarinaiLocalEnvironmentSystem.updateOne(t, envDt); } return { done: false }; } global.TarinaiEnvironmentUpdateStep = Object.freeze({ update }); })(typeof window !== "undefined" ? window : globalThis);