CommonClient: Move command marker to last_autofillable_command #4907
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.
What is this fixing or adding?
This changes the command marker
!
from being hardcoded inget_input_text_from_response
, to being explicit inlast_autofillable_command
. This allows/
commands to uselast_autofillable_command
to be autofilled when user presses the "Didn't find something that closely matches 'something wrong', did you mean 'the correct name'? (66% sure)" message.I need this to fix an issue with the Stardew client tracker. Currently, when pressing the autofill questions, the
!hint
command gets filled instead of the correct/explain
command. Setting the last command toexplain
autofills!explain
, with the wrong command marker.Without this change, I would need to hook into the
ConnectBarTextInput
in intercept when the command is autofilled to change the marker. Every other client would also need to do that if they want the same behavior.How was this tested?
I made typo with
!hint
,!hint_location
,!getitem
to make sure they still work. I also tested with the/explain
commands from the Stardew client. See this commit agilbert1412@d2fdda4If this makes graphical changes, please attach screenshots.
Current Stardew Client behavior
Screen.Recording.2025-04-20.at.12.34.12.PM.mov
With this change + setting `last_autofillable_command` correctly in the client
Screen.Recording.2025-04-20.at.12.28.06.PM.mov