Skip to content

Conversation

@Vgoloshivskiy
Copy link
Contributor

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

Add oxygen distraction handling during melee attacks.
@github-actions github-actions bot added Info / User Interface Game - player communication, menus, etc. [C++] Changes (can be) made in C++. Previously named `Code` Melee Melee weapons, tactics, techniques, reach attack labels Jan 6, 2026
@RenechCDDA
Copy link
Member

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.

@RenechCDDA RenechCDDA closed this Jan 6, 2026
Comment on lines +651 to +653
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")
Copy link
Contributor

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 🐶

Suggested change
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") {
Copy link
Contributor

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 🐶

Suggested change
if(action == "NO") {
if( action == "NO" ) {

Comment on lines +666 to +669
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);
Copy link
Contributor

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 🐶

Suggested change
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 );

Comment on lines +672 to +673
}

Copy link
Contributor

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 🐶

Suggested change
}
}

@Vgoloshivskiy
Copy link
Contributor Author

Vgoloshivskiy commented Jan 6, 2026

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.

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.
+
There is already interrupt there so why not add one more? maybe if I add setting that will allow this to trigger only if setting is activated, you will allow it?
+
After 8 hours at works I don't have focus for 100% of combat

@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. json-styled JSON lint passed, label assigned by github actions Melee Melee weapons, tactics, techniques, reach attack

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants