duu
This commit is contained in:
parent
88f618cadf
commit
8f9f5b5100
108 changed files with 2139 additions and 1500 deletions
|
|
@ -93,9 +93,15 @@
|
|||
color: "rgba(236,46,24,0.72)",
|
||||
}));
|
||||
}
|
||||
if (item.burnTimer <= 0.01) item.burning = false;
|
||||
if ((item.amount || 0) <= 0.5) item.amount = 0;
|
||||
if (item.burnTimer <= 0.01 || (item.amount || 0) <= 0.5) {
|
||||
item.burning = false;
|
||||
item.burnTimer = 0;
|
||||
item.amount = 0;
|
||||
worldRef?.effects?.push(new Effect("zunchi_miasma", item.x, item.y - 4, { size: Math.max(13, (item.r || 15) * 1.25), life: 0.42, color: "rgba(64,44,34,0.44)" }));
|
||||
}
|
||||
worldRef?.markTerrainDirtyAt?.(item.x, item.y, Math.max(item.r || 15, 28), "zunchi-burning");
|
||||
worldRef?.markItemBucketsDirty?.("zunchi-burning");
|
||||
worldRef?.markSpatialDirty?.("zunchi-burning");
|
||||
worldRef.drawListDirty = true;
|
||||
return true;
|
||||
}
|
||||
|
|
@ -133,8 +139,16 @@
|
|||
item.fertility = clamp(1 - item.stageTimer / 360, 0, 1);
|
||||
item.amount -= decayDt * 0.090 * decayBoost;
|
||||
}
|
||||
if ((item.amount || 0) <= 0.5) {
|
||||
item.amount = 0;
|
||||
worldRef?.effects?.push(new Effect("zunchi_miasma", item.x, item.y - 4, { size: Math.max(12, (item.r || 15) * 1.15), life: 0.34, color: "rgba(64,44,34,0.34)" }));
|
||||
worldRef?.markTerrainDirtyAt?.(item.x, item.y, Math.max(item.r || 15, 28), "zunchi-decay-out");
|
||||
worldRef?.markItemBucketsDirty?.("zunchi-decay-out");
|
||||
worldRef?.markSpatialDirty?.("zunchi-decay-out");
|
||||
if (worldRef) worldRef.drawListDirty = true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
global.TarinaiItemDynamicZunchiSystem = Object.freeze({ updateMotion, updateLifecycle, updateBurningLifecycle });
|
||||
global.TarinaiItemDynamicZunchiSystem = Object.freeze({ updateMotion, updateLifecycle });
|
||||
})(typeof window !== "undefined" ? window : globalThis);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue