From 326437ddf93e0fda0a109acd102410f06e251b2b Mon Sep 17 00:00:00 2001 From: rope Date: Tue, 20 Oct 2026 18:31:51 +0100 Subject: [PATCH] Order reward follows the quantity at the same price each Co-Authored-By: Claude Opus 5.5 --- static/app.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/static/app.js b/static/app.js index 07d341b..dabf582 100644 --- a/static/app.js +++ b/static/app.js @@ -1670,8 +1670,11 @@ document.addEventListener("change", (e) => { draft.reward = draft.item ? item(draft.item).value * (draft.kind === "craft" ? draft.qty : 1) : 0; if (!list[draft.item]) draft.item = ""; } else { + const before = draft.qty; draft[key] = Math.max(key === "qty" ? 1 : 0, Math.floor(Number(e.target.value) || 0)); if (key === "qty") draft.qty = Math.min(draft.qty, C.order_max[draft.kind]); + // A crafting order's reward is the total: it follows the quantity at the same price each. + if (key === "qty" && draft.kind === "craft") draft.reward = Math.round(draft.reward / before * draft.qty); if (key === "qty" && draft.kind === "craft" && draft.item) { // Drop provided reagents the bank can no longer cover at the new quantity. const a = C.actions.find((x) => x.id === C.order_recipes[draft.item]), runs = Math.ceil(draft.qty / a.outputs[draft.item]);