Archipelago
Archipelago copied to clipboard
Core: Fix auto-fill in the text client when clicking on a hint suggestion
What is this fixing or adding?
#2833 added more details to failed hints commands, which broke the hint suggestion copy system that was expecting a different string, so I fixed it here
How was this tested?
By left clicking the different things that are auto-fillable when clicked on
If this makes graphical changes, please attach screenshots.
(previous behavior was the same but nothing in the textbox after a click)
Now that you say it, there's an edge case that won't work if the player hints for something that contains did you mean '
or ends with did you mean
This case is so extreme I doubt it would be useful to spend time fixing it (the result is just something like !hint ', did you mean 'Hazardous Mechs
), and there would be another edge case that would probably appear anyway, unless we totally change the way it works and the server sends a suggestion separately
Bonus Points for a Unittest that prevents this in the future.
I think making a new module util
alongside Utils
should not be part of this bug-fix pull request. (And I think other people expressed this in the discord discussions about it.)
I think it would be better to put it in Utils.py
here, and another pull request could be made for reorganizing modules.
Well then, where in Utils? At the end? No one gave me clear indications except Black Silver who said to put it inside a util module
Well then, where in Utils?
after get_fuzzy_results
Well I moved it to where you suggested
Right, I forgot to reformat the file for once
Code looks fine. Let me know once this merge conflict is fixed and I'll revisit.