The Witness: Make item links work properly with the hint system #3110
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.
Right now, the hints system in The Witness doesn't really work when a Witness item ends up on an item_link location. It will just say something goofy like "Bunker Laser can be found at Item Link: Bunker Laser"
With this change, it'll actually find the real location of where the item linked item ended up.
This fixes some client issues with displaying the hints correctly as well, so it's kind of also a bugfix.
I don't know if this is the correct way to get the "real location" of an item linked item, but I couldn't find a way to break it.
Tested: I tried a bunch of things I could think of and made sure they correctly hinted the items and acted right in game. But I'm not an item links expert so there might be something I overlooked. At the very least it should be "safe" because I put in an Exception for StopIteration on the find_item.