This commit is contained in:
33333-33333 2026-06-24 13:48:22 +09:00
commit d5c661bc22
53 changed files with 4264 additions and 950 deletions

View file

@ -6,7 +6,7 @@
Object.defineProperties(World.prototype, Object.getOwnPropertyDescriptors({
updateAnts(dt) {
if (!this.ants) this.ants = [];
const nests = (this.items || []).filter(it => it && !it.dead && it.type === "ant_nest");
const nests = this.itemsOfType?.("ant_nest") || (this.items || []).filter(it => it && !it.dead && it.type === "ant_nest");
for (const nest of nests) {
if (typeof ensureAntNestWorkerPool === "function") ensureAntNestWorkerPool(nest);
if (!Number.isFinite(nest.antCount)) nest.antCount = ANT_NEST_START_COUNT || 6;