Files
Stephen Fasciani 3beaa12706
Build / build (push) Failing after 30s
Step goal quantity by one recipe's output, not always 1.
Capture, +, and - use RecipeProvider.outputCount. Planks move by 4. Gather stays 1. Minus at or below one yield removes the goal.
2026-09-09 01:40:16 -04:00

2.2 KiB
Raw Permalink Blame History

▶️ Create Goal

First use case. Application layer. It does not contain domain rules; it uses 🎯 Goal invariants.

Capture (hover item → Add key) is one caller. The use case does not know about inventory screens.


Input

  • ItemId (the item the player pointed at)

Output

Quantity

One recipe’s output on this path (and on overlay [+]). New goal: that many. Existing goal: + that many. No recipe → 1.


Flow

CreateGoal(item)
    ↓
Goal exists for this ItemId?
    yes → quantity += 1
    no  → add Goal(item, 1)
    ↓
RefreshProgress
    remaining per goal = qty − available(item)
    resolve remaining through RecipeProvider
    aggregate
    missing = required − available

Persistence: a file this client owns (ADR-018). Leave the world and the overlay unloads; come back and the goals load. The host does not need this mod.


Sibling use cases (same slice)

Needed so Screen 2’s [+], [-], and Clear are not invented in the UI.

Use case Input Result
Adjust Goal Quantity ItemId, delta +1 Quantity + 1, then RefreshProgress
Remove Goal ItemId Goal gone, then RefreshProgress
Clear Goals — All goals gone, then RefreshProgress
Refresh Progress — Recompute missing list from current goals + inventory
Auto-remove (opt-in) Pickup of the goal item Quantity down by the gain; gone at 0. /satistaskory auto-remove

[-] on the overlay: if quantity > 1, Adjust −1; if quantity is 1, Remove Goal. The overlay does not keep a 0.

No confirm on Clear.


First wiring

Capture: hover an item in inventory, the crafting bench craft pane, or the craft book; tooltip shows the bound key; press it. That calls this use case.

/satistaskory add remains a debug caller (unknown ids are rejected). Overlay on the right of the play screen.

Do not start EMI. Do not start a planner menu.


🎯 Goal

📦 Packages

🔌 Recipe Provider

💾 Persistence

📈 Progress Calculation

🖥️ Experience

🖼️ Wireframes

📝 Decisions

🏛️ Architecture