removed unused processesseessess
This commit is contained in:
parent
348f355eb2
commit
4fdc567e08
158 changed files with 1317 additions and 3351 deletions
|
|
@ -66,10 +66,10 @@
|
|||
for (const t of this.tarinai || []) {
|
||||
if (!t || t.dead) continue;
|
||||
liveTarinai += 1;
|
||||
const behavior = typeof currentTarinaiBehavior === "function" ? currentTarinaiBehavior(t) : t.behavior;
|
||||
const behavior = currentTarinaiBehavior(t);
|
||||
const id = behavior?.actionId || t.state || "none";
|
||||
behaviorCounts[id] = (behaviorCounts[id] || 0) + 1;
|
||||
if (typeof isTarinaiBehaviorValueForced === "function" ? isTarinaiBehaviorValueForced(behavior) : Boolean(behavior?.source === "forced" || behavior?.forcedId || behavior?.forcedRequest)) forcedBehaviors += 1;
|
||||
if (isTarinaiBehaviorValueForced(behavior)) forcedBehaviors += 1;
|
||||
if ((t.behaviorLockTimer || 0) > 0.01) lockedBehaviors += 1;
|
||||
}
|
||||
return {
|
||||
|
|
@ -119,11 +119,11 @@
|
|||
terrain: this.terrainDirtyStatsThisFrame || null,
|
||||
nearby: this.nearbyQueryStatsThisFrame || null,
|
||||
constraintDirty: this.constraintDirtyStatsThisFrame || null,
|
||||
perf: window.TarinaiPerf?.snapshot?.() || null,
|
||||
perf: window.TarinaiPerf.snapshot() || null,
|
||||
};
|
||||
},
|
||||
grassLimit() {
|
||||
return window.TarinaiGround?.grassLimit?.(this.groundType || "soil", this.fieldType || "garden") ?? (CONFIG.grassLimit ?? 99);
|
||||
return window.TarinaiGround.grassLimit(this.groundType || "soil", this.fieldType || "garden") ?? (CONFIG.grassLimit ?? 99);
|
||||
},
|
||||
canAddGrass(extra = 1) {
|
||||
const limit = this.grassLimit ? this.grassLimit() : (CONFIG.grassLimit ?? 99);
|
||||
|
|
@ -238,7 +238,7 @@
|
|||
// so repeated rebuild requests in the same phase are collapsed to one rebuild.
|
||||
if (!force && this.spatialDirty === false && reason !== "manual") return false;
|
||||
const profiler = window.TarinaiPerf;
|
||||
const end = profiler?.begin?.("update.spatial") || null;
|
||||
const end = profiler.begin("update.spatial") || null;
|
||||
try {
|
||||
const full = reason === "manual" || reason === "reset" || !this.spatialVersion || !this.spatial?.rebuildStaticItems;
|
||||
if (full) {
|
||||
|
|
@ -274,9 +274,6 @@
|
|||
|
||||
markItemBucketsDirty(reason = "manual") {
|
||||
this.itemBucketsDirty = true;
|
||||
this.itemBucketsDirtyReason = reason;
|
||||
this.lastItemBucketsDirtyReason = reason;
|
||||
this.itemBucketDirtyMarksTotal = (this.itemBucketDirtyMarksTotal || 0) + 1;
|
||||
},
|
||||
|
||||
ensureItemBuckets(reason = "read") {
|
||||
|
|
@ -333,9 +330,7 @@
|
|||
bucket.push(it);
|
||||
}
|
||||
this.itemBucketsDirty = false;
|
||||
this.itemBucketsDirtyReason = "";
|
||||
this.itemBucketRebuildsTotal = (this.itemBucketRebuildsTotal || 0) + 1;
|
||||
this.lastItemBucketRebuildReason = reason;
|
||||
},
|
||||
|
||||
liveItemsOfType(type, predicate = null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue