Skip to content

setfaction: add Max Ally/KOS/Apprehensive and color-code the CoV Faction cell - #275

Merged
ebm5025 merged 3 commits into
mainfrom
claude/eqnotify-castle-bot-integration-5c7l4s
Aug 30, 2026
Merged

setfaction: add Max Ally/KOS/Apprehensive and color-code the CoV Faction cell#275
ebm5025 merged 3 commits into
mainfrom
claude/eqnotify-castle-bot-integration-5c7l4s

Conversation

@ebm5025

@ebm5025 ebm5025 commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Enhances /bot setfaction (from #274):

  • New choices: adds Max Ally, KOS, and Apprehensive to the faction list, reordered best (Max Ally) → worst (KOS), with Unknown last.
  • Color-codes the sheet cell on set, by standing:
    • 🔴 redKOS, Scowling, Threatening
    • 🟢 greenMax Ally, Ally
    • 🟡 yellow — everything else (including Warmly)

Changes

  • setfaction-subcommand.ts: expanded FACTION_LEVELS; added a factionBackgroundColor() mapping; after recording the value it colors the CoV Faction cell.
  • public-accounts-sheet.ts: new setBotCellBackground(botName, column, color) that sets a single cell's background via the google-spreadsheet cell API (loadCells over just that cell → getCellbackgroundColorsaveUpdatedCells).

Coloring runs after the value is written and is resilient: if it fails (e.g. permissions), the failure is logged and noted in the reply, but the faction value is still recorded.

Testing

  • yarn tsc — clean.
  • yarn test:ci — 84 tests pass.
  • Note: the cell-coloring path talks to the live Google sheet, which the sandbox can't reach — worth confirming after deploy that setting a faction paints the CoV Faction cell the expected color.

🤖 Generated with Claude Code

claude added 3 commits August 30, 2026 03:23
- Add "Max Ally", "KOS", and "Apprehensive" faction choices; reorder the list
  best (Max Ally) to worst (KOS).
- On set, color the CoV Faction sheet cell by standing: red for KOS/Scowling/
  Threatening, green for Max Ally/Ally/Warmly, yellow otherwise.

Adds SheetPublicAccountService.setBotCellBackground(), which sets a single
cell's background via the Google Sheets cell API. Coloring failures are logged
and noted in the reply but don't fail the value update.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWXRmPbtEz35wquwFd8Cu7
Green is now Max Ally / Ally only; Warmly falls through to yellow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWXRmPbtEz35wquwFd8Cu7
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWXRmPbtEz35wquwFd8Cu7
@ebm5025
ebm5025 merged commit cc7cb29 into main Aug 30, 2026
1 check passed
@ebm5025
ebm5025 deleted the claude/eqnotify-castle-bot-integration-5c7l4s branch August 30, 2026 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants