duu
This commit is contained in:
parent
88f618cadf
commit
8f9f5b5100
108 changed files with 2139 additions and 1500 deletions
|
|
@ -9,8 +9,11 @@
|
|||
item.lifecycleTimer += dt;
|
||||
const interval = item.lifecycleInterval || (0.95 + stableUnit(item.id, "zunchi-life") * 0.45);
|
||||
if (item.lifecycleTimer < interval) return false;
|
||||
const lifecycleDt = Math.min(item.lifecycleTimer, 2.4);
|
||||
item.lifecycleTimer = 0;
|
||||
const groundId = worldRef?.groundType || "soil";
|
||||
const groundDecayMul = Number(global.TarinaiGround?.zunchiDecayMultiplier?.(groundId) || 1) || 1;
|
||||
const maxLifecycleDt = groundDecayMul >= 100 ? 0.35 : 2.4;
|
||||
const lifecycleDt = Math.min(item.lifecycleTimer, maxLifecycleDt);
|
||||
item.lifecycleTimer = Math.max(0, item.lifecycleTimer - lifecycleDt);
|
||||
global.TarinaiItemDynamicZunchiSystem.updateLifecycle(item, lifecycleDt, worldRef);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue