Fix sail trim highlight fallback after Red Reef update#243
Conversation
|
Full disclosure, this is my first PR to another repo on GitHub, so please be as critical as needed. Also, GPT/Codex was used to help troubleshoot the issue and code the fix, so please be as critical as needed for that reason as well. I instructed Codex to be as minimal as possible and to stick to the coding style of the overall plugin, so I hope this PR is to your liking! At first, the fix was to simply monitor the in-game chat for the phrase "You feel a gust of wind.", but as this wasn't being used as the method of identifying if the sails needed to be trimmed, I figured there may be a reason as to why this approach was not being used. Perhaps other plugins may hide this text and thereby break the text based detection method? So I pushed Codex to look for other triggers to monitor, and it eventually found a working method after much trial and error + feeding it logs. |
Summary
Fixes sail trim highlighting after the Red Reef update by using the trim-window varbit and adding a fallback for the changed menu action state.
Why
The existing trim detection could stop matching the current in-game interaction state, so eligible sails were no longer highlighted reliably when the trim action was available.
Testing
./gradlew testwith the Homebrew JDK 11 runtime