hm
This commit is contained in:
parent
4d3fc2cd47
commit
c9dd7182aa
35 changed files with 478 additions and 288 deletions
|
|
@ -26,6 +26,12 @@
|
|||
changed = true;
|
||||
item.foodServingsRemaining = Math.max(0, before - lost);
|
||||
item.amount = item.foodServingsRemaining;
|
||||
const resized = (typeof updateServingFoodVisualSize === "function" ? updateServingFoodVisualSize(item) : false);
|
||||
if (resized) {
|
||||
worldRef?.markItemBucketsDirty?.("food-passive-resize");
|
||||
worldRef?.markSpatialDirty?.("food-passive-resize");
|
||||
if (worldRef) worldRef.drawListDirty = true;
|
||||
}
|
||||
worldRef?.markTerrainDirty?.("food-passive-decay");
|
||||
worldRef?.emit?.("item:decayed", { item, type: item.type, amount: lost, passive: true });
|
||||
if (item.foodServingsRemaining <= 0.015) item.amount = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue