y
This commit is contained in:
parent
61718e2981
commit
f657b6a4a4
94 changed files with 3970 additions and 1241 deletions
|
|
@ -32,7 +32,6 @@
|
|||
worldRef?.markSpatialDirty?.("food-passive-resize");
|
||||
if (worldRef) worldRef.drawListDirty = true;
|
||||
}
|
||||
worldRef?.markTerrainDirty?.("food-passive-decay");
|
||||
if (item.foodServingsRemaining <= 0.015) item.amount = 0;
|
||||
}
|
||||
} else if (MEDICINE_LIKE_FOOD_TYPES.includes(item.type)) {
|
||||
|
|
@ -41,7 +40,6 @@
|
|||
item.amount -= lost;
|
||||
if (lost > 0) {
|
||||
changed = true;
|
||||
worldRef?.markTerrainDirty?.("food-passive-decay");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -53,7 +51,13 @@
|
|||
if (item.type === "water") item.amount -= dt * 0.9;
|
||||
decayServingFood(item, dt, worldRef);
|
||||
if (item.type === "trace") item.amount -= dt * 1.35;
|
||||
if (item.type === "splat") item.amount -= dt * 1.05;
|
||||
if (item.type === "splat") {
|
||||
const before = Number(item.amount || 0) || 0;
|
||||
item.amount -= dt * 1.05;
|
||||
if (Math.floor(before / 18) !== Math.floor(Math.max(0, item.amount) / 18)) {
|
||||
worldRef?.markTerrainDirtyAt?.(item.x, item.y, Math.max(item.r || item.radius || 24, 36), "splat-fade");
|
||||
}
|
||||
}
|
||||
if (item.type === "ant_corpse") item.amount -= dt * 0.018;
|
||||
return { done: false };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue