cleanup
This commit is contained in:
parent
1bd1525eb8
commit
548386ef54
|
@ -184,7 +184,10 @@ pub fn handle_game_event(
|
|||
prefs.save();
|
||||
}
|
||||
GameEvent::SetSound(cycle) => {
|
||||
match cycle.to_index(settings.noise_cancellation_mode, &settings.noise_cancellation_modes) {
|
||||
match cycle.to_index(
|
||||
settings.noise_cancellation_mode,
|
||||
&settings.noise_cancellation_modes,
|
||||
) {
|
||||
Some(mode) => {
|
||||
settings.set_noise_cancellation_mode(mode);
|
||||
}
|
||||
|
|
|
@ -34,8 +34,8 @@ pub mod prelude {
|
|||
pub use crate::{
|
||||
actor, audio, camera, chat, cmd, common, game, hud, load, menu, nature, var, visual, world,
|
||||
};
|
||||
pub use game::Turn::Toggle;
|
||||
pub use game::Cycle::Next;
|
||||
pub use game::Turn::Toggle;
|
||||
pub use game::{GameEvent, Turn};
|
||||
}
|
||||
|
||||
|
|
|
@ -458,9 +458,9 @@ pub fn update_menu(
|
|||
|
||||
match MENUDEF[i].1 {
|
||||
MenuAction::ToggleSound => {
|
||||
let noisecancel =
|
||||
if let Some(noisecancel) =
|
||||
settings.noise_cancellation_modes.get(settings.noise_cancellation_mode)
|
||||
let noisecancel = if let Some(noisecancel) = settings
|
||||
.noise_cancellation_modes
|
||||
.get(settings.noise_cancellation_mode)
|
||||
{
|
||||
noisecancel
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue