mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-16 08:52:42 +00:00
Adv 2.0 D&D Phase R R2: Harvest nodes & per-room registry
Per-zone resource registry (§3, all 10 zones) and full per-room harvest layer wired into expeditions: !forage / !mine / !scavenge / !essence / !commune / !resources. Auto-spawns a DungeonRun per region on !expedition start, swaps it on !region travel, retires on abandon/extract. Long rest at camp replenishes nodes across every room and region. Reuses existing flavor.Harvest* / RichYield / NodeDepleted / per-zone Harvest<Zone> pools. Also clears two pre-existing test failures introduced by the E6c flavor expansion (briefing substring list + combat-lift trial count). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -312,6 +312,17 @@ func updateCamp(expID string, c *CampState) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// setExpeditionRunID writes the expedition's linked zone-run pointer.
|
||||
// Used during region transitions and on initial spawn (R2).
|
||||
func setExpeditionRunID(expID, runID string) error {
|
||||
_, err := db.Get().Exec(`
|
||||
UPDATE dnd_expedition
|
||||
SET run_id = ?,
|
||||
last_activity = CURRENT_TIMESTAMP
|
||||
WHERE expedition_id = ?`, nullableString(runID), expID)
|
||||
return err
|
||||
}
|
||||
|
||||
// abandonExpedition flags the active expedition as abandoned. Idempotent.
|
||||
func abandonExpedition(userID id.UserID) error {
|
||||
e, err := getActiveExpedition(userID)
|
||||
|
||||
Reference in New Issue
Block a user