-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Implement oxygen distraction checks in melee #84513
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
Conversation
Add oxygen distraction handling during melee attacks.
|
As discussed in the development discord, this is wholly inappropriate. You already receive log messages indicating that you are receiving damage, the same as being attacked. In particular you are trying to force an activity interrupt. Except there is no activity to interrupt. Melee fighting is not an activity. If you do not pay attention to the fact your character is dying, that is "your fault", as a player. There is no reason that crowd crush should be special-cased. |
| if( is_avatar() && get_player_character().oxygen <= 5 && uistate.distraction_oxygen && !get_player_character().activity.is_distraction_ignored(distraction_type::oxygen)) { | ||
| const std::string& action = query_popup() | ||
| .context("CANCEL_ACTIVITY_OR_IGNORE_QUERY") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JSON & C++ formatters] reported by reviewdog 🐶
| if( is_avatar() && get_player_character().oxygen <= 5 && uistate.distraction_oxygen && !get_player_character().activity.is_distraction_ignored(distraction_type::oxygen)) { | |
| const std::string& action = query_popup() | |
| .context("CANCEL_ACTIVITY_OR_IGNORE_QUERY") | |
| if( is_avatar() && get_player_character().oxygen <= 5 && uistate.distraction_oxygen && | |
| !get_player_character().activity.is_distraction_ignored( distraction_type::oxygen ) ) { | |
| const std::string &action = query_popup() | |
| .context( "CANCEL_ACTIVITY_OR_IGNORE_QUERY" ) |
| .action; | ||
|
|
||
|
|
||
| if(action == "NO") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JSON & C++ formatters] reported by reviewdog 🐶
| if(action == "NO") { | |
| if( action == "NO" ) { |
| if(action == "IGNORE") { | ||
| get_player_character().activity.ignore_distraction(distraction_type::oxygen); | ||
| for (player_activity& activity : get_player_character().backlog) { | ||
| activity.ignore_distraction(distraction_type::oxygen); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JSON & C++ formatters] reported by reviewdog 🐶
| if(action == "IGNORE") { | |
| get_player_character().activity.ignore_distraction(distraction_type::oxygen); | |
| for (player_activity& activity : get_player_character().backlog) { | |
| activity.ignore_distraction(distraction_type::oxygen); | |
| if( action == "IGNORE" ) { | |
| get_player_character().activity.ignore_distraction( distraction_type::oxygen ); | |
| for( player_activity &activity : get_player_character().backlog ) { | |
| activity.ignore_distraction( distraction_type::oxygen ); |
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JSON & C++ formatters] reported by reviewdog 🐶
| } | |
| } | |
It is not technically it will also interrupt attack if you are drowning for example and trying to attack invisible star Vampire/shadow zombie at night instead of going onto solid ground as movement and attack both tied to dicrectional keys. |
Add oxygen distraction handling during melee attacks.
Summary
Interface "Oxygen check before Melee attack"
Purpose of change
Sometimes I press tab few seconds too long and I die. Bummer
Describe the solution
It adds popup if character is suffocating.
Describe alternatives you've considered
I was told it was impossible but here I am
Testing
tested on my PC worked fine
Additional context