Skip to content

Commit

Permalink
prevent bell spam (#47987)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamuro-g authored and ZhilkinSerg committed May 28, 2021
1 parent 4c9d821 commit c0b654a
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/computer_session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,12 +405,21 @@ void computer_session::action_unlock()
query_any( _( "Lock disabled. Press any key…" ) );
}

//Toll is required for the church computer/mechanism to function
//Toll is required for the church/school computer/mechanism to function
void computer_session::action_toll()
{
sounds::sound( get_player_character().pos(), 120, sounds::sound_t::music,
//~ the sound of a church bell ringing
_( "Bohm… Bohm… Bohm…" ), true, "environment", "church_bells" );
if( calendar::turn < comp.next_attempt ) {
print_error( _( "[Bellsystem 1.2] is currently in use." ) );
query_any( _( "Please wait for at least one minute." ) );
reset_terminal();
} else {
comp.next_attempt = calendar::turn + 1_minutes;
sounds::sound( get_player_character().pos(), 120, sounds::sound_t::music,
//~ the sound of a church bell ringing
_( "Bohm… Bohm… Bohm…" ), true, "environment", "church_bells" );

query_any( _( "[Bellsystem 1.2] activated. Have a nice day." ) );
}
}

void computer_session::action_sample()
Expand Down

0 comments on commit c0b654a

Please sign in to comment.