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

fix: sleep menu no longer complains about deafness when using infolink alarm #6026

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/handle_action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@

inline static void pldrive( point d )
{
return pldrive( tripoint( d, 0 ) );

Check warning on line 514 in src/handle_action.cpp

View workflow job for this annotation

GitHub Actions / build

return statement within a void function should not have a specified return value [readability-avoid-return-with-void-value]
}

static void open()
Expand Down Expand Up @@ -1097,7 +1097,8 @@

time_duration try_sleep_dur = 24_hours;
std::string deaf_text;
if( g->u.is_deaf() ) {
// Infolink alarm is silent and works even if deaf
if( g->u.is_deaf() && !g->u.has_bionic( bionic_id( "bio_infolink" ) ) ) {
deaf_text = _( "<color_c_red> (DEAF!)</color>" );
}
if( u.has_alarm_clock() ) {
Expand Down Expand Up @@ -1341,7 +1342,7 @@
const optional_vpart_position vp = here.veh_at( u.pos() );

turret_data turret;
if( vp && ( turret = vp->vehicle().turret_query( u.pos() ) ) ) {

Check warning on line 1345 in src/handle_action.cpp

View workflow job for this annotation

GitHub Actions / build

an assignment within an 'if' condition is bug-prone [bugprone-assignment-in-if-condition]
avatar_action::fire_turret_manual( u, here, turret );
return;
}
Expand Down
Loading