removed unused processesseessess

This commit is contained in:
33333-33333 2026-06-29 16:21:58 +09:00
commit 4fdc567e08
158 changed files with 1317 additions and 3351 deletions

View file

@ -1,8 +1,8 @@
"use strict";
// Layer: entity-runtime/items/decay-system
// Owns passive amount decay and spoilage side effects for water, food,
// transient traces, splats, and ant corpses. The lifecycle step is now only a
// Owns passive amount decay for water, food, transient traces, splats,
// and ant corpses. The lifecycle step is now only a
// thin pipeline adapter.
(function (global) {
const MEDICINE_LIKE_FOOD_TYPES = Object.freeze([
@ -11,7 +11,7 @@
]);
function decayServingFood(item, dt, worldRef) {
if (typeof isServingFoodType !== "function" || !isServingFoodType(item.type)) return false;
if (!isServingFoodType(item.type)) return false;
const interval = passiveFoodDecayInterval(worldRef);
item.passiveFoodDecayTimer = (item.passiveFoodDecayTimer || 0) + dt;
let changed = false;
@ -26,8 +26,6 @@
changed = true;
item.foodServingsRemaining = Math.max(0, before - lost);
item.amount = item.foodServingsRemaining;
const penalty = global.TarinaiItemRegistry?.food?.hygienePenalty?.(item.type) ?? PASSIVE_FOOD_HYGIENE_PENALTY_PER_SERVING;
worldRef?.registerFoodSpoilage?.(lost * penalty, item);
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;
@ -38,8 +36,6 @@
item.amount -= lost;
if (lost > 0) {
changed = true;
const penalty = global.TarinaiItemRegistry?.food?.hygienePenalty?.(item.type) ?? 0.002;
worldRef?.registerFoodSpoilage?.(lost * penalty, item);
worldRef?.markTerrainDirty?.("food-passive-decay");
worldRef?.emit?.("item:decayed", { item, type: item.type, amount: lost, passive: true });
}
@ -58,9 +54,5 @@
return { done: false };
}
global.TarinaiItemDecaySystem = Object.freeze({
MEDICINE_LIKE_FOOD_TYPES,
decayServingFood,
update,
});
global.TarinaiItemDecaySystem = Object.freeze({ update });
})(typeof window !== "undefined" ? window : globalThis);