Rando - Fix ice trap particles#2229
Merged
briaguya0 merged 2 commits intoHarbourMasters:develop-bradleyfrom Dec 21, 2022
Merged
Rando - Fix ice trap particles#2229briaguya0 merged 2 commits intoHarbourMasters:develop-bradleyfrom
briaguya0 merged 2 commits intoHarbourMasters:develop-bradleyfrom
Conversation
briaguya0
approved these changes
Dec 21, 2022
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.
Resolves #2037
The custom particles function uses the item ID to decide what particles to show. The problem is, when something is an ice trap, the item ID also corresponds to that ID (139).
Since the item ID is the only thing that's truly unique for each item (GI and GID is sometimes the same across multiple items), and the itemID itself is used to decide what item to grant, the only good way I could think of to achieve this was to introduce 2 more properties in GetItemEntry. I'm not super happy about introducing these 2 new properties, but I can't think of a cleaner solution.
These 2 new properties will be duplicates of the original item ID and modIndex when they aren't ice traps, and reflect the fake item's ID and modindex when it is one. This way the particles spawned will correctly be based on the fake item instead of the ice trap.
The biggest issue with the particles not showing up before is that shops can have ice traps disguised as songs, and some fake names are basically the warp song variant of the normal song or the other way around. Example: Ice trap is named Saria's Song, but is supposed to show the Minuet model, which is nearly impossible to tell apart without the particles.
Build Artifacts