From 5606267df56a24f1b38c94bf3e3f4d4e3eb996eb Mon Sep 17 00:00:00 2001 From: rope Date: Tue, 3 Nov 2026 20:07:42 +0000 Subject: [PATCH] Work orders: hammer on recipe and gathering cards Co-Authored-By: Claude Opus 5.5 --- game.py | 1 + static/app.js | 9 ++++++++- static/styles.css | 5 ++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/game.py b/game.py index 9c7f58b..826cd55 100644 --- a/game.py +++ b/game.py @@ -6854,6 +6854,7 @@ ORDER_RECIPES, ORDER_RAW = _order_sources() PATCH_NOTES = [ {"date": "2026-11-03", "title": "Combat materials on order", "notes": [ ("new", "Work orders: relics, reagents and trophies under Materials ⚔️, by area."), + ("new", "Work orders: 🔨 on recipes and gathering, opens the order."), ]}, {"date": "2026-11-02", "title": "Militia drilling", "notes": [ ("fix", "Drilling the militia is no longer wiped before a raid is calculated. Last raid losses recalculated."), diff --git a/static/app.js b/static/app.js index 418ae56..d16a624 100644 --- a/static/app.js +++ b/static/app.js @@ -1846,6 +1846,7 @@ function actionCard(a) { : why || "Make this many, then queue more behind it"; const queued = me.queue.map((q, i) => q.id === a.id ? i + 1 : 0).filter(Boolean); const out = Object.keys(a.outputs)[0]; + const orderable = out && (C.order_recipes[out] || C.order_raw[out]); const icon = a.icon; const time = me.times[a.id]; let io = ""; @@ -1900,7 +1901,7 @@ function actionCard(a) {
${icon}
${esc(a.name)} ${Object.keys(a.outputs).map((id) => needTag(id) + fittedTag(id)).join("")}
Level ${a.level} · ${dur(time)} · ${a.xp} XP
-
${Object.keys(a.inputs).length ? `` : ""}
+ ${orderable ? `` : ""}${Object.keys(a.inputs).length ? `` : ""} ${io ? `
${io}
` : ""} ${extra} ${me.action?.plot2 && (active || second) ? `
Plot ${active ? 1 : 2}${growingNow ? " · growing now" : " · next"}
` : ""} @@ -3216,6 +3217,12 @@ document.addEventListener("click", (e) => { draft.fund = d.forFund; return go("orders"); } + if (d.orderItem) { + // From a recipe or gathering card: a work order for that item, ready to price and post. + draft = { kind: C.order_recipes[d.orderItem] ? "craft" : "gather", item: "", qty: 1, provide: [], reward: 0 }; + pickOrderItem(d.orderItem); + return go("orders"); + } if ("orderShow" in d) { orderTab = "open"; return go("orders"); } if ("orderNew" in d) { draft = draft ? null : { kind: "craft", item: "", qty: 1, provide: [], reward: 0 }; diff --git a/static/styles.css b/static/styles.css index 3a56f22..3c1a422 100644 --- a/static/styles.css +++ b/static/styles.css @@ -196,7 +196,10 @@ textarea { width: 100%; resize: vertical; min-height: 60px; } filter: grayscale(1); opacity: .35; } .pin:hover { opacity: .7; } .pin.on { filter: none; opacity: 1; } -.action .top .pin { margin-left: auto; align-self: flex-start; font-size: 14px; } +.action .top .tools { margin-left: auto; align-self: flex-start; display: flex; align-items: center; gap: 6px; flex: none; } +.action .top .pin { font-size: 14px; } +.order-it { background: none; border: 0; padding: 0 4px; font-size: 15px; line-height: 1; cursor: pointer; opacity: .55; } +.order-it:hover { opacity: 1; } .action { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);