removed unused processesseessess
This commit is contained in:
parent
348f355eb2
commit
4fdc567e08
158 changed files with 1317 additions and 3351 deletions
|
|
@ -32,7 +32,7 @@ function stopFailedBuildPlan(t, world, type = "", reason = "") {
|
|||
}
|
||||
t.behaviorSwitchCooldownUntil = Math.max(t.behaviorSwitchCooldownUntil || 0, (world?.time || 0) + 1.2);
|
||||
const text = reason || "\u4f5c\u308b\u5834\u6240\u304c\u898b\u3064\u304b\u3089\u306a\u3044";
|
||||
if (typeof clearBehavior === "function") clearBehavior(t, text);
|
||||
clearBehavior(t, text);
|
||||
t.goIdle?.(text);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -54,7 +54,6 @@ function forceBuiltStructureVisualRefresh(world, structure, reason = "structure-
|
|||
world.ensureSpatial?.(reason);
|
||||
if (structure) {
|
||||
structure.world = world;
|
||||
structure._builtVisibleAt = Number(world.time || 0) || 0;
|
||||
}
|
||||
if (typeof globalThis.render === "function") {
|
||||
globalThis.render();
|
||||
|
|
@ -146,7 +145,7 @@ function findNearbyBuildMaterial(world, tarinai, type, maxDist = 520) {
|
|||
if (d > maxDist) continue;
|
||||
// Prefer nearby grass, but lightly spread simultaneous builders across
|
||||
// separate tufts so a crowd does not all reserve one valid material.
|
||||
const jitter = typeof stableUnit === "function" ? stableUnit(tarinai.id || tarinai.familyKey || "", `build-material:${item.id || ""}`) : Math.random();
|
||||
const jitter = stableUnit(tarinai.id || tarinai.familyKey || "", `build-material:${item.id || ""}`);
|
||||
const score = d + Math.max(0, reserved) * 42 + jitter * 12;
|
||||
if (score < bestScore) { best = item; bestScore = score; }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue