City work orders
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
4b0724e6e5
commit
e1d37ede87
4 changed files with 243 additions and 47 deletions
3
app.py
3
app.py
|
|
@ -218,6 +218,7 @@ def roster(world: dict, now: float) -> list[dict]:
|
|||
# A fight others can tag into, and who's in it together.
|
||||
"fight": player["action"]["id"] if game.joinable(world, player) and game.offline_limit(world, player) > now else None,
|
||||
"party": (player["action"] or {}).get("party"),
|
||||
"order": (player["action"] or {}).get("order"), # the work order they're crafting
|
||||
"garrison": player["garrison"], "donated": player["donated"],
|
||||
"look": game.look_view(player),
|
||||
"seen": int(player["last_active"]),
|
||||
|
|
@ -409,7 +410,7 @@ class Handler(BaseHTTPRequestHandler):
|
|||
return game.set_manual(world, player, str(body.get("id")), bool(body.get("on")), now)
|
||||
if path == "/api/order":
|
||||
return game.post_order(world, player, body.get("kind"), str(item), qty, body.get("provide"),
|
||||
body.get("reward"), now)
|
||||
body.get("reward"), now, bool(body.get("city")), str(body["fund"]) if body.get("fund") else None)
|
||||
if path == "/api/order/provide":
|
||||
return game.provide_reagent(world, player, body.get("id"), str(item))
|
||||
if path == "/api/order/cancel":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue