stable
This commit is contained in:
parent
86226ccc94
commit
077d4ab9ac
71 changed files with 2905 additions and 1063 deletions
|
|
@ -3,7 +3,7 @@
|
|||
// Layer: entity-runtime/tarinai/update-system
|
||||
// Owns local family/friend/grass/nest comfort environment effects.
|
||||
(function (global) {
|
||||
function legacyMethod(dt) {
|
||||
function updateBody(dt) {
|
||||
const parent = this.parentToFollow ? this.parentToFollow() : null;
|
||||
if (parent && dist(this, parent) < 96) {
|
||||
applyNeedRelief(this, { social: -dt * 4, safety: -dt * 2 });
|
||||
|
|
@ -41,12 +41,12 @@
|
|||
|
||||
function updateOne(tarinai, dt) {
|
||||
if (!tarinai || tarinai.dead) return false;
|
||||
legacyMethod.call(tarinai, dt);
|
||||
updateBody.call(tarinai, dt);
|
||||
return true;
|
||||
}
|
||||
|
||||
global.TarinaiLocalEnvironmentSystem = Object.freeze({
|
||||
legacyMethod,
|
||||
updateBody,
|
||||
updateOne,
|
||||
});
|
||||
})(typeof window !== "undefined" ? window : globalThis);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue