-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve directional highlight prompts #37597
Conversation
There is an overload of |
Bail with a message from prompts lacking a valid target. Autoselect the target if there is exactly one valid target.
10ad12e
to
1084c6d
Compare
Thanks for the tip @BevapDin. I tweaked that function slightly to exhibit the behavior I wanted and went ahead and applied the same changes to everything using it. This should give the UI a bit more consistency and avoid unnecessary prompts. |
Co-Authored-By: Alexey Mostovoy <1931904+AMurkin@users.noreply.github.com>
@snipercup Yes, that is what I indented to implement, though the new behavior can be reverted for just examine if need be. This change pushes a little farther in the direction of separation of uses for the various actions. My thoughts are that, as you point out, Regarding deconstruction and the scope of this PR, deconstruction doesn't currently use the |
The new behavior of bailing with an error message when there is no vaild target stays.
As @esotericist pointed out, auto select for examine isn't great if the player is next to one valid target and a second invalid target that they wish to check for interactivity. I've kept the new failure message if there are no valid targets however. |
There are good arguments for and against this behavior, so the only reasonable thing to do is to make it configurable. Enabling this saves key presses plain and simple. Disabling this makes directional actions more consistent since one can always count on pressing the action key and the direction in quick succession without waiting to see if a target was autoselected. The default was subjectively chosen to be true based on general impressions of popularity.
2bb15fc
to
3d68f8b
Compare
Quoting from the last commit message: There are good arguments for and against this behavior, so the only Enabling this saves keypresses plain and simple. Disabling this makes directional actions more consistent since one can The default was subjectively chosen to be true based on general The new behavior of bailing with a helpful prompt when there are no valid targets was not made configurable and stayed as is. |
I don't understand how any tile could be an invalid target for the "examine" action. Consider these messages as I enter a dark room and examine the area around me, before this change:
Now, I can only examine my surroundings like this if there are at least 2 tiles nearby containing items, doors, windows or other interactive things. Although the "examine" keyboard shortcut has been repurposed to automatically do all kinds of different things, I think it's important to remember the original meaning of the word "examine" in such a strongly text-based role-playing environment. Thank you for making it configurable! I only wish the original behavior had been left as the default. |
@wapcaplet I personally turn this auto setting off as well and since this PR has brought consistency to all the directional actions I think it's an improvement once you find the setting. Before, some actions auto selected a target like pry, and others didn't like examine. I totally see where you're coming from with the use of examine to look at nearby terrain, but there's been a movement towards separation of functions between the different actions recently. The look around hotkey, |
Unfortunately, the "Autoselect if exactly one valid target" setting has no effect on the "examine" shortcomings I mentioned above. Adjacent structures, furniture, and terrain can no longer be examined at all, unless one of them happens to be interactive. #37745 |
Summary
SUMMARY: Interface "Improve directional highlight prompts."
Purpose of change
This is just something that was bugging me, and I feel like the new behavior is a UX enhancement. It started off with just opening/closing of doors but the scope expanded to standardizing all such prompts.
Describe the solution
Check adjacent tiles for valid targets before prompting the player to select one. If there are none, exit with a message. If there is exactly one, use that as the target automatically. If there are more than one, prompt as per the current behavior.
Testing
Tested all combinations of opening/closing with 0/1/many adjacent valid targets.