Pin auto-crafted items to the first row of ME terminals - #607
Open
programgames wants to merge 1 commit into
Open
Pin auto-crafted items to the first row of ME terminals#607programgames wants to merge 1 commit into
programgames wants to merge 1 commit into
Conversation
When a player requests a crafting job, the requested item is pinned to the first row of that player's ME terminal until the terminal is closed after the job ends, so it stays visible without searching for it. - Add PinnedKeys, a client-side registry of pinned item keys, capped at one terminal row - Add PacketPinCraftedItem, sent by CraftingCPUCluster to the requesting player when a job starts, completes or is cancelled - Reserve the first row of ItemRepo for pinned entries, opt-in so that non-terminal screens keep their current behaviour - Highlight that row in GuiMEMonitorable and keep it out of the scroll range - Add the pinAutoCraftedItems client config option, on by default Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JEfWADSjczynwLCC6s8vVJ
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.
What
When a player requests a crafting job, the requested item is pinned to the first row of that player's ME terminal. The pin stays until the terminal is closed after the job ends, so the player does not have to search for the result.
How
CraftingCPUClusterresolveRequestingPlayer()is extracted from the existingnotifyRequester().PacketPinCraftedItem(new)IAEItemStackand afinishedflag. The finished notice is always processed, so a pin cannot get stuck when the option is turned off mid-craft.AppEngPacketHandlerBasePinnedKeys(new)MAX_PINNED = 9(one row), evicting the oldest entry.ClientHelperItemReposetPinnedRowEnabled(), off by default soGuiNetworkStatusand other consumers are unaffected.GuiMEMonitorableperRowtosetRowSize()forTerminalStyle.FULL, keeps the pinned row out of the scroll range, and highlights it.AEConfigpinAutoCraftedItemsclient option, on by default.Notes
drawRect()leaves the GL colour tinted, so it is reset to opaque white right after the highlight is drawn.AEFeature.CRAFTING_TOASTS: a player who disabled toasts still gets pinning.