本工具只计算平均负载,不是精确队列调度器。它不计算多个角色同时到期、Spawn补能、出生方向阻塞、DISRUPT_SPAWN、Extension可用性、spawnCreep失败和真实优先级。
只读队列探针
const roleProfiles = [
{
"role": "Harvester",
"plannedCount": 2,
"replacementLead": 61
},
{
"role": "Hauler",
"plannedCount": 2,
"replacementLead": 60
},
{
"role": "Upgrader",
"plannedCount": 1,
"replacementLead": 65
}
];
for (const profile of roleProfiles) {
const creeps = Object.values(Game.creeps).filter(creep => creep.memory.role === profile.role);
const ttl = creeps.map(creep => creep.ticksToLive ?? 0).sort((a, b) => a - b);
console.log({ role: profile.role, plannedCount: profile.plannedCount, liveCount: creeps.length, lowestTTL: ttl[0] ?? null, replacementLead: profile.replacementLead });
}