mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-15 16:42:41 +00:00
Adv 2.0 L4e reader flip (read-only sites): house state via loadHouseState
dnd_rest long-rest eligibility, dnd_sheet housing display, and petShouldArrive / mistyHousingHint now source house state from player_meta via loadHouseState(userID) instead of *AdventureCharacter. petShouldArrive, mistyHousingHint, and renderDnDSheet gained a HouseState parameter; scheduler and Misty NPC callers load it. Reader flip inside adventure_housing.go itself stays deferred — its mutation paths bundle with cutting AdvCharacter writes post-soak. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -308,7 +308,7 @@ func TestSheet_ShowsSubclassWhenChosen(t *testing.T) {
|
||||
STR: 16, DEX: 12, CON: 14, INT: 8, WIS: 10, CHA: 10,
|
||||
Subclass: SubclassBattleMaster,
|
||||
}
|
||||
out := renderDnDSheet(c, nil, nil, nil, nil)
|
||||
out := renderDnDSheet(c, nil, nil, HouseState{}, nil, nil)
|
||||
if !strings.Contains(out, "Battle Master") {
|
||||
t.Errorf("sheet missing subclass name:\n%s", out)
|
||||
}
|
||||
@@ -320,7 +320,7 @@ func TestSheet_PromptsWhenUnchosenAtL5(t *testing.T) {
|
||||
Level: 5, HPMax: 40, HPCurrent: 40, ArmorClass: 16,
|
||||
STR: 16, DEX: 12, CON: 14, INT: 8, WIS: 10, CHA: 10,
|
||||
}
|
||||
out := renderDnDSheet(c, nil, nil, nil, nil)
|
||||
out := renderDnDSheet(c, nil, nil, HouseState{}, nil, nil)
|
||||
if !strings.Contains(out, "!subclass") {
|
||||
t.Errorf("sheet should nudge `!subclass` when unchosen at L5:\n%s", out)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user