Work orders: show what a lit fire pays

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rope 2026-10-24 18:56:15 +01:00
parent 2bcda564b8
commit 517b560019
4 changed files with 51 additions and 11 deletions

14
game.py
View file

@ -3525,11 +3525,14 @@ def post_order(world: dict, player: dict, kind: str, item: str, qty, provide, re
return "Not enough gold"
provided = {}
if kind == "craft":
runs = _batches(action, item, qty)
# The pool holds what a run takes right now: a lit fire's share stays with the fire.
runs, inputs = _batches(action, item, qty), fire_inputs(world, action)
for input_item in provide or []:
if input_item not in action["inputs"]:
return "That isn't in the recipe"
need = action["inputs"][input_item] * runs
if input_item not in inputs:
return f"The {FIRES[action['fire']]['name'].lower()} pays that"
need = inputs[input_item] * runs
if player["bank"].get(input_item, 0) < need:
return f"Not enough {ITEMS[input_item]['name'].lower()}"
provided[input_item] = need
@ -3559,7 +3562,10 @@ def provide_reagent(world: dict, player: dict, order_id, item: str) -> str | Non
action = ACTION_BY_ID[order["action"]]
if item not in action["inputs"]:
return "That isn't in the recipe"
need = action["inputs"][item] * _batches(action, order["item"], order["qty"] - order["delivered"])
inputs = fire_inputs(world, action)
if item not in inputs:
return f"The {FIRES[action['fire']]['name'].lower()} pays that"
need = inputs[item] * _batches(action, order["item"], order["qty"] - order["delivered"])
short = need - order["provided"].get(item, 0)
if short <= 0:
return "Already provided"
@ -5986,6 +5992,8 @@ PATCH_NOTES = [
"and Aimed Shot 25% faster."),
("fix", "Work orders on phones: the item picker and reagent slots show names, and picking an item scrolls to "
"the amount, price and Post."),
("fix", "Work orders show what a lit fire pays: its log is struck through instead of asked for, and the forge "
"pays a coal. Orders never needed that log from the crafter, they just asked for it."),
]},
{"date": "2026-10-24", "title": "A dungeon in every area", "notes": [
("new", "Six more dungeons for 2–4, seven pulls each with two mini-bosses and a final boss: Goblin Warren "