Skip to content

Show the channels of ingredients in storage terminal tooltips - #218

Open
rubensworks wants to merge 2 commits into
master-1.21-ltsfrom
feature/71-terminal-channel-tooltips
Open

Show the channels of ingredients in storage terminal tooltips#218
rubensworks wants to merge 2 commits into
master-1.21-ltsfrom
feature/71-terminal-channel-tooltips

Conversation

@rubensworks

Copy link
Copy Markdown
Member

Closes #71

When the storage terminal shows all channels at once, tooltips now indicate in which channel an ingredient is available. In a single-channel view nothing is added, as the channel is already known there.

  • Stored in one channel: Channel: 0
  • Stored in multiple channels: a Channels: header followed by one line per channel with its quantity, formatted by the ingredient component's own handler (so fluids read mB, energy FE)
  • Crafting option slots indicate the single channel their recipe is available in
  • Can be disabled through the new client-side guiStorageTooltipChannels config

Everything is derived from the per-channel views that the client already receives, so no additional packets are needed. The tooltip lines are now only built while a slot is hovered, where they were previously constructed every frame for every visible slot.

Testing

build and runGameTestServer pass. Six game tests were added for the channel lookup and the tooltip lines.

Manually verified with clientdevbridge on a network with two item interfaces and three fluid interfaces spread over channels 0 and 1: the multi-channel breakdown, the single-channel line (items, fluids and energy), and the absence of channel lines while a single channel is selected.

🤖 Generated with Claude Code

https://claude.ai/code/session_011TkM3k6R4UTjPCxR4PCHL7


Generated by Claude Code

When all channels are shown at once, tooltips now indicate in which
channel an ingredient is stored, with a quantity breakdown when it is
stored in multiple channels. Crafting options indicate their channel as
well. This can be disabled with the guiStorageTooltipChannels config.

Closes #71

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011TkM3k6R4UTjPCxR4PCHL7
Resolves a conflict in the crafting option tooltip lines: master added an
estimated duration line, which is now combined with the channel lines.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011TkM3k6R4UTjPCxR4PCHL7
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