Auto-walk: gate on fork/rest, slow cadence, credit DnD streak

Four fixes for the auto-walk loop that was re-clearing the same room
every 15 min while a fork was pending, ignoring the rest lockout, and
not counting expedition activity toward the daily streak:

- advanceOnceWithOpts / runAutopilotWalk now short-circuit to stopFork
  when NodeChoices has a pending fork. Stops phantom kills + duplicate
  loot drops + fork re-prompts on the same cleared room.
- fireExpeditionAutoRuns honors restingLockoutRemaining so the
  background ticker no longer walks through a long rest.
- autoRunCooldown 15m -> 2h, autoRunTickInterval 5m -> 15m. Auto-walk
  DMs are now a once-in-a-while ping, not a steady drip.
- markActedToday + HasActedToday recognise LastActionDate. Wired into
  !rest short/long, !expedition start/abandon, !extract, foreground
  !zone advance, and !zone go so DnD-side activity credits the streak
  even when the expedition ends before midnight.

(cherry picked from commit 9e27fd8257a4c92150ad584b393bf5a72270b82c)
This commit is contained in:
prosolis
2026-05-18 17:16:04 -07:00
parent e4518c9c39
commit 01d2329993
7 changed files with 76 additions and 5 deletions

View File

@@ -252,6 +252,7 @@ func (p *AdventurePlugin) handleExtractCmd(ctx MessageContext, _ string) error {
line := flavor.Pick(flavor.ExtractionVoluntary)
_ = appendExpeditionLog(updated.ID, updated.CurrentDay, "narrative",
"voluntary extraction", line)
markActedToday(ctx.Sender)
var b strings.Builder
b.WriteString(fmt.Sprintf("🚪 **Extraction — %s, Day %d**\n\n",