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

@ -4,10 +4,9 @@
// Centralizes sleep furniture, nest occupancy/reservation, and sleep-target
// selection policy so nest-box entrance logic and bed targeting do not drift.
(function (global) {
const math = global.TarinaiMath || {};
const distFn = math.dist || ((a, b) => Math.hypot((a?.x || 0) - (b?.x || 0), (a?.y || 0) - (b?.y || 0)));
const distXYFn = math.distXY || ((ax, ay, bx, by) => Math.hypot((ax || 0) - (bx || 0), (ay || 0) - (by || 0)));
const clampFn = math.clamp || ((v, a, b) => Math.max(a, Math.min(b, v)));
const distFn = typeof dist === "function" ? dist : ((a, b) => Math.hypot((a?.x || 0) - (b?.x || 0), (a?.y || 0) - (b?.y || 0)));
const distXYFn = typeof distXY === "function" ? distXY : ((ax, ay, bx, by) => Math.hypot((ax || 0) - (bx || 0), (ay || 0) - (by || 0)));
const clampFn = typeof clamp === "function" ? clamp : ((v, a, b) => Math.max(a, Math.min(b, v)));
function isSleepFurniture(item) {
return Boolean(item && (item.roles?.sleepPlace || (typeof global.isSleepFurnitureType === "function" ? global.isSleepFurnitureType(item.type) : (item.type === "bed" || item.type === "nest_box" || item.type === "grass_bed"))));
@ -137,15 +136,11 @@
isSleepFurniture,
isTarinaiHiddenInNestBox,
nestBoxOccupants,
nestBoxReservationCount,
bedOccupancy,
bedComfort,
sleepPlaceAvailableFor,
nearestSleepPlaceOfType,
findOwnedStructure,
findUnownedStructure,
findPrioritySleepPlaceBeforeGrassBedBuild,
findNearestSleepPlace,
distXY: distXYFn,
});
})(typeof window !== "undefined" ? window : globalThis);