Crafting queue menu
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
77fa8ad3e6
commit
4abf165857
5 changed files with 115 additions and 2 deletions
27
game.py
27
game.py
|
|
@ -3195,6 +3195,32 @@ def queue_remove(player: dict, index: int) -> str | None:
|
|||
return None
|
||||
|
||||
|
||||
def queue_move(player: dict, index: int, to: int) -> str | None:
|
||||
queue = player["queue"]
|
||||
if not (0 <= index < len(queue) and 0 <= to < len(queue)):
|
||||
return "Not in the queue"
|
||||
queue.insert(to, queue.pop(index))
|
||||
return None
|
||||
|
||||
|
||||
def queue_set(player: dict, index: int, qty: int) -> str | None:
|
||||
if not 0 <= index < len(player["queue"]):
|
||||
return "Not in the queue"
|
||||
if not 1 <= qty <= MAKE_MAX:
|
||||
return f"1 to {MAKE_MAX:,}"
|
||||
player["queue"][index]["n"] = qty
|
||||
return None
|
||||
|
||||
|
||||
def skip_make(world: dict, player: dict, now: float) -> str | None:
|
||||
"""Drop the make that's running: on to the next in the queue, or back to what you were doing."""
|
||||
current = player["action"]
|
||||
if not current or "left" not in current or "enemy" in ACTION_BY_ID[current["id"]]:
|
||||
return "Not making anything"
|
||||
finish_once(world, player, now)
|
||||
return None
|
||||
|
||||
|
||||
def next_queued(world: dict, player: dict, at: float, summary: dict | None, skipped: dict | None = None) -> bool:
|
||||
"""Start the next make in the queue (True), skipping any you can't make right now.
|
||||
`skipped` is a make that ran out of materials before its count was done."""
|
||||
|
|
@ -6196,6 +6222,7 @@ PATCH_NOTES = [
|
|||
{"date": "2026-10-27", "title": "Prayer", "notes": [
|
||||
("fix", "+Q button: rounded corners."),
|
||||
("fix", "Make box: number field sits in front of +Q."),
|
||||
("new", "Crafting queue menu: tap ⏳ in the top bar to reorder, change counts, skip or clear."),
|
||||
("new", "Bury on the spot: bones from combat turns into prayer points and 1/2 bury XP as they drop. Toggle in the Prayer menu."),
|
||||
("balance", "Prayer costs adjusted."),
|
||||
("balance", "Prayer potions now relevant for new costs."),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue