Fixes batch 3: autosave, campaign-agnostic PCs, live push, builder
- Autosave: while signed in, a debounced full backup pushes whenever durable data
changes (useCloudAutosave watches a fingerprint of the main tables; high-churn
tables excluded). No-op signed out.
- Campaign-agnostic characters: PCs are now global — the Characters roster shows
every player character regardless of active campaign, and any PC can be added to
a fight. NPCs stay per-campaign. (charactersRepo.listAllPcs / useAllPcs; difficulty
fallback stays campaign-scoped.)
- Live "bring your own character": a joining player can push one of their own local
characters; the GM's grant inserts it into the campaign and seats them.
- Character builder: a system picker (5e / PF2e, defaults to the campaign) so creation
no longer assumes 5e; PF2e skill wording ("Trained" vs "proficient"); spell step now
explains how many to pick + that they're known spells prepared later.
230 unit + 34 e2e + 2 realtime green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -88,6 +88,11 @@ export const charactersRepo = {
|
||||
return db.characters.where('campaignId').equals(campaignId).toArray();
|
||||
},
|
||||
|
||||
/** All player characters across every campaign (PCs are campaign-agnostic). */
|
||||
listAllPcs(): Promise<Character[]> {
|
||||
return db.characters.where('kind').equals('pc').toArray();
|
||||
},
|
||||
|
||||
get(id: string): Promise<Character | undefined> {
|
||||
return db.characters.get(id);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user