Work order slots link to the recipe when empty

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rope 2026-10-28 12:51:40 +00:00
parent 70be493558
commit ece0f101aa
2 changed files with 5 additions and 2 deletions

View file

@ -6593,6 +6593,7 @@ PATCH_NOTES = [
{"date": "2026-10-28", "title": "Queue", "notes": [
("new", "Work orders no longer erase your crafting queue"),
("new", "Items link to where they're made: click to jump to the recipe."),
("new", "Work order slots link to the recipe when you have none."),
("new", "Queue: ▲ on #1 swaps it with the current make."),
("new", "Updated Guard kit, added recipes for crafting professions to contribute to defence of town without needing combat-related loot."),
("new", "Townsfolk mood: food, firewood and seasonal clothes. Kindling (Firekeeping), smocks and cloaks (Tailoring)."),

View file

@ -2459,8 +2459,10 @@ function orderSlots(o) {
const give = Math.min(have, need - pool);
// What putting them in pays you once they're crafted: your value's slice of the reagents' share.
const share = o.by === S.uid ? 0 : Math.round(o.reward / o.qty * out * C.input_share * item(id).value / worth * give);
const fill = give ? `${tip} · +${fmt(give)}${share ? ` → ${fmt(share)} gold` : ""}` : `${tip} · 🎒 0`;
return `<div class="ro-slot open"><button class="doll-slot empty-req" data-order-fill="${o.id}" data-item="${id}" ${give ? "" : "disabled"} title="${esc(fill)}">${item(id).icon}</button>
const fill = give ? `${tip} · +${fmt(give)}${share ? ` → ${fmt(share)} gold` : ""}` : `${tip} · 🎒 0${gotoTip(id)}`;
// None to give: the slot links to where it's made instead.
const click = give ? `data-order-fill="${o.id}" data-item="${id}"` : sourceOf(id) ? goto(id) : "disabled";
return `<div class="ro-slot open"><button class="doll-slot empty-req" ${click} title="${esc(fill)}">${item(id).icon}</button>
<span class="ro-have ${pool + have < need ? "bad" : "good"}">${fmt(pool)} / ${fmt(need)}</span><span class="ro-name">${esc(name)}</span></div>`;
}).join("");
}