Show a spinner overlay on ingredients that are being crafted - #209
Merged
rubensworks merged 3 commits intoAug 29, 2026
Merged
Conversation
The storage terminal now indicates which ingredients are being produced by running crafting jobs, by drawing an animated spinner over their slot. The spinner is colored by the crafting job status, and the tooltip shows the quantity that is still being crafted together with the job status. The server-side ingredient tab periodically collects the outputs that all running crafting jobs are still expected to produce, and sends them to the client. Just like the crafting jobs gui, this is throttled by guiTerminalCraftingJobsUpdateFrequency, and nothing is sent as long as no crafting jobs are running. Closes #138 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FzSYcpDAVUfCpTPpjMmeoz
Running crafting jobs report the FINISHED status in-between the batches that they hand to their crafting interface. As the storage terminal skipped the outputs of finished jobs, the spinner disappeared as soon as the job started producing, even though the job was still running. Such a job is not actually done: jobs that are done are not exposed as running jobs anymore. Their remaining outputs are now shown as actively being crafted. Ingredients that are both stored and craftable were showing the spinner twice. The crafting option slot now defers to the stored ingredient slot when the same instance is also shown as a stored ingredient. The collecting of pending crafting job outputs moved into PendingCraftingJobOutputs, so that it can be covered by a game test that runs an actual crafting job. This test needs a network with item storage, for which Integrated Tunnels was added as a dependency, just like Integrated Crafting does for its own game tests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FzSYcpDAVUfCpTPpjMmeoz
rubensworks
commented
Aug 29, 2026
The storage terminal always shows a single channel, so the pending crafting job outputs are now collected for the selected channel instead of for all channels at once. This channel is propagated from the container into the server tab, and the client only applies the received outputs as long as that channel is being shown. The priority that decides which status is shown when multiple crafting jobs produce the same ingredient is now a field of TerminalCraftingJobStatus. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FzSYcpDAVUfCpTPpjMmeoz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #138
The storage terminal now indicates which ingredients are being produced by running crafting jobs, by drawing an animated spinner over their slot. The spinner is colored by the crafting job status (reusing the existing
TerminalCraftingJobStatuscolors), and the tooltip shows the quantity that is still being crafted together with the job status and its description.This applies to all ingredient tabs (items, fluids, energy, ...) and to the crafting tab, both on stored ingredients and on craftable ingredients.
How it works
TerminalStorageTabIngredientComponentServer#updatePendingCraftingJobOutputswalks all running crafting job plans of the network (including their dependencies), and collects the outputs that they are still expected to produce for its own ingredient component. Finished jobs are skipped, and jobs that occur multiple times within a plan (due to job splitting) are only counted once.PendingCraftingJobOutputs, where quantities are summed and the most relevant status is kept (statuses that need the player's attention, such as missing inputs, take precedence over crafting).TerminalStorageIngredientCraftingJobsPacket. Just like the crafting jobs gui, this is throttled byguiTerminalCraftingJobsUpdateFrequency, only happens for the active tab, and nothing is sent as long as no crafting jobs are running. When no crafting handler is installed, no work is done at all.TerminalStorageSlotIngredientlooks up the pending output for its instance, draws the spinner in the background layer, and adds the tooltip lines. The instance that is being moved around by the player does not get an overlay.Changes
icons.png(8 frames of 8x8, at y=64), exposed asImages.SPINNER.gui.integratedterminals.terminal_storage.tooltip.crafting, the existinggui.integratedterminals.craftingplan.status[.desc]keys are reused for the status.Testing
./gradlew buildpasses../gradlew runGameTestServerpasses (17 tests), including 6 new game tests inGameTestPendingCraftingJobOutputsthat cover the aggregation of pending outputs (quantity-independent lookups, summing of quantities, status precedence, empty instances and multiple channels).Generated by Claude Code