ee0e9a365a
Build / build (push) Failing after 36s
Remote files are satistaskory/remote/<name-and-motd>.dat. Not IP, not world seed. Singleplayer is still the world folder.
53 lines
1.2 KiB
Markdown
53 lines
1.2 KiB
Markdown
# 💾 Persistence
|
||
|
||
Port used by [[▶️ Create Goal]] (and the sibling quantity / clear paths).
|
||
|
||
The domain does not know where the plan is stored (ADR-004). Infrastructure answers.
|
||
|
||
---
|
||
|
||
## Shape
|
||
|
||
```text
|
||
GoalStore
|
||
all() / find / put / remove / clear
|
||
```
|
||
|
||
Play uses `PersistingGoalStore`: RAM plus a write after each change.
|
||
|
||
`InMemoryGoalStore` remains for unit tests.
|
||
|
||
---
|
||
|
||
## Shipped implementation
|
||
|
||
Client-owned files (ADR-018). The host does not need this mod.
|
||
|
||
| Where | File |
|
||
|-------|------|
|
||
| Singleplayer | `<world>/satistaskory.dat` |
|
||
| Remote / LAN guest | `satistaskory/remote/<name-and-motd>.dat` in the game directory |
|
||
|
||
| Event | Result |
|
||
|-------|--------|
|
||
| Join world | Load this client's file for that world, or for that server name + MOTD |
|
||
| Create / + / − / Clear | Write that file |
|
||
| Leave world | Unload RAM. Do not write empty (that would wipe the save) |
|
||
| Death | Irrelevant. The plan is not on the player entity |
|
||
|
||
A later server or cloud adapter is still allowed. It does not change `GoalStore`. It is not required for the prosthetic to function.
|
||
|
||
---
|
||
|
||
## Related Documents
|
||
|
||
[[🏛️ Architecture]]
|
||
|
||
[[📦 Packages]]
|
||
|
||
[[📝 Decisions]]
|
||
|
||
[[▶️ Create Goal]]
|
||
|
||
[[🎯 Goal]]
|