Skip to content
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

QOL improvement: "Don't prompt for a direction for an action if there is only one direction possible" #33431

Merged
merged 2 commits into from
Aug 22, 2019

Conversation

ipcyborg
Copy link
Contributor

@ipcyborg ipcyborg commented Aug 21, 2019

Summary

SUMMARY: Features "Quality of Life improvement: don't prompt for a direction for an action if there is only one direction possible"

Purpose of change

To simplify the usage of lockpicks on doors.

Describe the solution

Related to #33402.
Added a set of proper lockpicking targets.
Check if there is only one of them is adjacent to player.
If yes, than just lock pick it. If no, then prompt for direction.
If there is nothing to lockpick, then cancel action with a message (don't prompt for direction).

Describe alternatives you've considered

Do the same for other actions?
I see that some of them, like ACTION_BUTCHER, use can_interact_at to filter tiles available for this specific action. It also provides visual information if used in examine action.
But I think that lock picking should be turned into proper action then, right?

Additional context

None

@ZhilkinSerg ZhilkinSerg added [C++] Changes (can be) made in C++. Previously named `Code` Controls / Input Keyboard, mouse, keybindings, input UI, etc. Quality of Life QoL: degree to which players are comfortable, and able to enjoy CDDA labels Aug 21, 2019
@Leland
Copy link
Contributor

Leland commented Aug 21, 2019

Doesn't fix #33402 – make sure to change the description so it won't automatically close it :)

I'll move that issue to a series of checkboxes so we can see progress on this

@ipcyborg ipcyborg changed the title QOL improvement: "Don't prompt for a direction for an action if there is only one direction possible #33402" QOL improvement: "Don't prompt for a direction for an action if there is only one direction possible" Aug 21, 2019
@ZhilkinSerg ZhilkinSerg merged commit 7c8279a into CleverRaven:master Aug 22, 2019
@ipcyborg ipcyborg deleted the fix-33402-auto-choose-dir branch August 22, 2019 12:35
misterprimus pushed a commit to misterprimus/Cataclysm-DDA that referenced this pull request Sep 21, 2019
… is only one direction possible" (CleverRaven#33431)

* Fixed "Don't prompt for a direction for an action if there is only one direction possible CleverRaven#33402" - for lockpicking

* Added message and cancel action if there is no lock to pick
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Controls / Input Keyboard, mouse, keybindings, input UI, etc. Quality of Life QoL: degree to which players are comfortable, and able to enjoy CDDA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants