Skip to content

feat(fizruk): per-game status details, starting with Factorio research - #516

Merged
Szer merged 1 commit into
mainfrom
feat/fizruk-status-details
Sep 25, 2026
Merged

Szer merged 1 commit into
mainfrom
feat/fizruk-status-details

Conversation

@Szer

@Szer Szer commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Adds an optional per-game details list to the Fizruk config. Each entry is a typed status detail with its own fetcher; its line goes into /status after the players line, only while the game pod is Ready. Other games get their own detail types later without touching the core.

First type, factorio-research:

Research: Mining productivity 4 (37.5%).
Research: nothing queued.
Research: unknown (RCON request timed out).
  • Reads game.forces.player.current_research and research_progress over the RCON endpoint already declared in the game's players block; config validation rejects the type for a game without RCON.
  • Uses /sc (silent-command), so players' in-game consoles don't echo it on every /status.
  • No ETA by design: research speed fluctuates, and a two-sample estimate would be noise.
  • A save that still has achievements enabled silently swallows its first Lua command (verified against 2.1.20: empty output, then normal output on repeat). The command always prints something (none when idle), so empty output means "refused" and is retried once.
  • Rcon.runCommand/execAsync run any command; the players probe is unchanged on top of them. The password lookup moved to Rcon.passwordFor so both callers share it.

Verified: 108 unit tests pass (new: config parsing, name humanizing, parse/format, RCON command round-trip). The exact compiled command string was run against a local factoriotools/factorio:2.1.20 container: first call empty, retry none, then mining-productivity-3\t4\t0.3745 while researching.

Needs a one-line my-infra config change ("details": [{ "type": "factorio-research" }] on the factorio game) after deploy; unknown fields are ignored by the current build, so order doesn't matter.

🤖 Generated with Claude Code

Games can list extra /status facts in config (details: [{ type: ... }]);
each type has its own fetcher in StatusDetails. factorio-research reads the
current technology and its progress over the game's RCON endpoint with a
silent command. The RCON client now runs any command, not just
/players online.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Szer
Szer merged commit a4db441 into main Sep 25, 2026
9 checks passed
@Szer
Szer deleted the feat/fizruk-status-details branch September 25, 2026 07:10
Szer added a commit that referenced this pull request Sep 25, 2026
They are local working notes swept into #516 by a blanket git add; the
files stay on disk, untracked.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant