removed unused processesseessess
This commit is contained in:
parent
348f355eb2
commit
4fdc567e08
158 changed files with 1317 additions and 3351 deletions
22
js/ants.js
22
js/ants.js
|
|
@ -13,14 +13,6 @@ const ANT_WORKER_RETURN_WEAK_SPEED = 9.0;
|
|||
const ANT_WORKER_DRAG_SPEED = 6.1875;
|
||||
const ANT_QUEEN_SPEED = 13.5;
|
||||
|
||||
const ANT_EXTENSION_HOOKS = Object.freeze({
|
||||
nestHunger: "reserved",
|
||||
nestGrowth: "reserved",
|
||||
queenReproduction: "existing-queen-founding",
|
||||
workerLifecycle: "worker-pool-hp",
|
||||
carryingSuccessRate: "current-deterministic-haul",
|
||||
territorialBehavior: "reserved",
|
||||
});
|
||||
|
||||
function clampAntHp(v) {
|
||||
return clamp(Number(v) || 0, 0, ANT_WORKER_HP);
|
||||
|
|
@ -84,7 +76,6 @@ class AntActor {
|
|||
this.seed = opts.seed || Math.random() * 1000;
|
||||
this.wanderAngle = opts.wanderAngle || rand(0, Math.PI * 2);
|
||||
this.nextTurn = opts.nextTurn || rand(0.4, 1.6);
|
||||
this.returnTimer = opts.returnTimer || 0;
|
||||
this.foundingX = opts.foundingX;
|
||||
this.foundingY = opts.foundingY;
|
||||
this.foundingDelayUntil = Number.isFinite(opts.foundingDelayUntil) ? opts.foundingDelayUntil : -Infinity;
|
||||
|
|
@ -292,7 +283,6 @@ class AntActor {
|
|||
target.target = null;
|
||||
if (targetWasSleeping) {
|
||||
target.startSleeping?.(null, "\u7720\u3063\u305f\u307e\u307e\u30a2\u30ea\u306b\u904b\u3070\u308c\u3066\u3044\u308b");
|
||||
target.sleepTimer = Math.max(target.sleepTimer || 0, 0.8);
|
||||
} else {
|
||||
if (target.enterPanic) target.enterPanic({ threat: this, reason: "\u30a2\u30ea\u306b\u5de3\u3078\u904b\u3070\u308c\u3066\u3044\u308b", fear: 0.36, wake: true, cause: "ant_drag" });
|
||||
else { target.setActionState?.("panic", { target: target.panicDestination ? target.panicDestination(this) : null, reason: "\u30a2\u30ea\u306b\u5de3\u3078\u904b\u3070\u308c\u3066\u3044\u308b", wake: true }); target.fearTimer = Math.max(target.fearTimer || 0, 0.36); }
|
||||
|
|
@ -428,7 +418,7 @@ class AntActor {
|
|||
draw(ctx, time = 0, lighting = null) {
|
||||
if (this.dead) return;
|
||||
const id = this.spriteId();
|
||||
const img = typeof getRenderableImage === "function" ? getRenderableImage(id, id) : images.get(id);
|
||||
const img = getRenderableImage(id, id);
|
||||
const lightState = lighting || getLightingState(this.world);
|
||||
ctx.save();
|
||||
const shadow = projectedShadowParams(lightState, this.kind === "queen" ? 0.78 : 0.26);
|
||||
|
|
@ -479,13 +469,3 @@ class AntActor {
|
|||
}
|
||||
}
|
||||
|
||||
window.AntActor = AntActor;
|
||||
window.ANT_NEST_START_COUNT = ANT_NEST_START_COUNT;
|
||||
window.ANT_NEST_MAX_COUNT = ANT_NEST_MAX_COUNT;
|
||||
window.ANT_NEST_MAX_OUTSIDE = ANT_NEST_MAX_OUTSIDE;
|
||||
window.ANT_WORKER_HP = ANT_WORKER_HP;
|
||||
window.ANT_QUEEN_HP = ANT_QUEEN_HP;
|
||||
window.ANT_EXTENSION_HOOKS = ANT_EXTENSION_HOOKS;
|
||||
window.buildAntWorkerPool = buildAntWorkerPool;
|
||||
window.ensureAntNestWorkerPool = ensureAntNestWorkerPool;
|
||||
window.syncAntNestCount = syncAntNestCount;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue