Seed sphere creation fix#782
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a bug where players were unable to place items into the Seed Sphere Assembly crafting dialog. By updating the storage context validation, the server now correctly recognizes the Seed Master NPC as the authorized entity for this specific crafting process, resolving the interaction failure. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the IsStorageContextAllowed method in MoveItemAction.cs to change the required NPC window for SeedSphereCrafting from SeedResearcher to SeedMaster. I have no feedback to provide as there are no review comments to evaluate.
Fixes: #767
BUG: Seed Sphere Assembly does not allow placing items
Description:
When a player talks to the Seed Master NPC in Elveland and selects "Seed Sphere
Assembly" (Seed Sphere Creation, crafting 43), then tries to put the required
items (Seed, Sphere, Jewel of Creation, Jewel of Chaos) into the crafting
dialog, the NPC does not allow placing any items.
Root cause:
In MoveItemAction.cs, method IsStorageContextAllowed, the SeedSphereCrafting
storage is checked against NpcWindow.SeedResearcher. However, the "Seed Sphere
Assembly" dialog is opened by the Seed Master NPC (NpcWindow.SeedMaster), not
by the Seed Researcher.
As a result, when the player has the Seed Master window open (correct for this
dialog) and tries to move an item to the SeedSphereCrafting storage, the server
rejects the move because it expects the Seed Researcher window to be open.
The SocketSystem.cs initialization confirms the crafting assignments:
and crafting 43 (Seed Sphere Creation)
(Mount Seed Sphere) and crafting 45 (Remove Seed Sphere)
In MoveItemAction.cs, line 424:
Storages.SeedCrafting => ... NpcWindow.SeedMaster // correct
Storages.SeedSphereCrafting => ... NpcWindow.SeedResearcher // BUG!
Fix:
In src/GameLogic/PlayerActions/Items/MoveItemAction.cs, line 424, change:
NpcWindow.SeedResearcher -> NpcWindow.SeedMaster
After the fix:
Storages.SeedSphereCrafting => state == PlayerState.NpcDialogOpened
&& openedWindow == NpcWindow.SeedMaster,