Queue: gathering too
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a723558fb2
commit
45a51476a9
3 changed files with 19 additions and 9 deletions
|
|
@ -20,7 +20,7 @@ let seenOrders = null; // order ids already known, so only new ones toast
|
|||
let deliveredSeen = {}; // how much of each order had arrived
|
||||
let earnedSeen = {}; // gold each order had paid you for reagents
|
||||
let pickedClass = null; // registration
|
||||
let queueOpen = false; // the crafting queue panel under the top bar
|
||||
let queueOpen = false; // the queue panel under the top bar
|
||||
const tabs = {}; // skill -> selected recipe tab
|
||||
let refreshing = false;
|
||||
let refreshedFor = null; // action (start and length) a completion refresh was sent for
|
||||
|
|
@ -777,7 +777,7 @@ function topbar() {
|
|||
chips += `<span class="chip muted">Idle${S.me.stopped ? ` · ${esc(S.me.stopped)}` : ""}</span>`;
|
||||
}
|
||||
if (S.me?.action?.left || S.me?.queue.length) {
|
||||
chips += `<button class="chip ${queueOpen ? "on" : ""}" data-queue-menu title="Crafting queue">⏳ ${S.me.queue.length}</button>`;
|
||||
chips += `<button class="chip ${queueOpen ? "on" : ""}" data-queue-menu title="Queue">⏳ ${S.me.queue.length}</button>`;
|
||||
}
|
||||
const fires = S.me ? Object.keys(C.fires).map((id) => [id, fireNow(id)]) : [];
|
||||
if (fires.some(([, n]) => n.heat >= 0)) {
|
||||
|
|
@ -791,7 +791,7 @@ function topbar() {
|
|||
return `<button class="menu-btn" data-menu aria-label="Menu">☰</button><h1>${esc(title)}</h1>${chips}${S.me ? trackedBar() : ""}${S.me && queueOpen ? queuePanel() : ""}`;
|
||||
}
|
||||
|
||||
// The crafting queue, opened from the ⏳ chip: what's being made, what's next, and in what order.
|
||||
// The queue, opened from the ⏳ chip: what's being made, what's next, and in what order.
|
||||
function queuePanel() {
|
||||
const me = S.me, q = me.queue, recipe = (id) => C.actions.find((x) => x.id === id);
|
||||
const now = me.action?.left && recipe(me.action.id), back = me.action?.resume && recipe(me.action.resume);
|
||||
|
|
@ -805,10 +805,10 @@ function queuePanel() {
|
|||
<button class="btn sm danger" data-unqueue="${i}" title="Remove">✕</button></li>`;
|
||||
}).join("");
|
||||
return `<div class="queue-panel">
|
||||
<div class="qp-head"><b>⏳ Crafting queue</b><span class="muted small">${q.length}</span><button class="x" data-queue-menu title="Close">✕</button></div>
|
||||
<div class="qp-head"><b>⏳ Queue</b><span class="muted small">${q.length}</span><button class="x" data-queue-menu title="Close">✕</button></div>
|
||||
${now ? `<div class="qp-row now">${now.icon}<span class="qp-name">${esc(now.name)}<span class="muted small">${fmt(me.action.left)} left</span></span>
|
||||
<button class="btn sm" data-queue-skip title="Drop this make, on to the next">Skip</button></div>` : ""}
|
||||
${rows ? `<ol class="qp-list">${rows}</ol>` : `<p class="muted small">Empty. +Q on a recipe adds to it.</p>`}
|
||||
${rows ? `<ol class="qp-list">${rows}</ol>` : `<p class="muted small">Empty. +Q on a recipe or gathering adds to it.</p>`}
|
||||
<div class="qp-foot"><span class="muted small qp-then">After queue: ${back ? `${esc(back.name)}${now ? `<button class="x" data-queue-then title="Idle after the queue">✕</button>` : ""}` : "idle"}</span>
|
||||
${q.length ? `<button class="btn sm" data-queue-clear>Clear</button>` : ""}</div>
|
||||
</div>`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue