From 871da1be783308045b0e85d1330daa31b2094adc Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 18 Mar 2024 14:08:11 +0100 Subject: [PATCH] Revert "change default settings to more release-friendly values" This reverts commit ee63a4e9c6b0b561b64b59dd7cdb1d0cc4585bb4. --- Cargo.lock | 10 ++++++++++ Cargo.toml | 4 ++-- src/hud.rs | 12 ++++++------ src/settings.rs | 4 ++-- src/world.rs | 2 +- 5 files changed, 21 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 104df91..a3103c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -294,6 +294,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "611dd99f412e862610adb43e2243b16436c6d8009f6d9dbe8ce3d6d840b34029" dependencies = [ + "bevy_dylib", "bevy_internal", ] @@ -470,6 +471,15 @@ dependencies = [ "sysinfo", ] +[[package]] +name = "bevy_dylib" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3b3b76f0d7a4da8f944e5316f2d2d2af3bbb40d87508355993ea69afbc9411c" +dependencies = [ + "bevy_internal", +] + [[package]] name = "bevy_ecs" version = "0.13.0" diff --git a/Cargo.toml b/Cargo.toml index d1deaf8..1f7945c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,8 +6,8 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -#bevy = { version = "0.13.0", features = ["dynamic_linking"] } -bevy = "0.13.0" +bevy = { version = "0.13.0", features = ["dynamic_linking"] } +#bevy = "0.13.0" # Enable a small amount of optimization in debug mode [profile.dev] diff --git a/src/hud.rs b/src/hud.rs index 629e306..147adb8 100644 --- a/src/hud.rs +++ b/src/hud.rs @@ -1,7 +1,7 @@ use crate::{settings, actor, audio}; use bevy::prelude::*; use bevy::diagnostic::{DiagnosticsStore, FrameTimeDiagnosticsPlugin}; -//use bevy::core_pipeline::bloom::{BloomCompositeMode, BloomSettings}; +use bevy::core_pipeline::bloom::{BloomCompositeMode, BloomSettings}; use std::collections::VecDeque; use std::time::SystemTime; @@ -238,25 +238,25 @@ fn handle_input( keyboard_input: Res>, mut settings: ResMut, mut query: Query<&mut Visibility, With>, - //mut query_bloomsettings: Query<&mut BloomSettings>, + mut query_bloomsettings: Query<&mut BloomSettings>, mut evwriter: EventWriter, mut evwriter_togglemusic: EventWriter, ) { if keyboard_input.just_pressed(settings.key_togglehud) { for mut vis in &mut query { - //if let Ok(mut bloomsettings) = query_bloomsettings.get_single_mut() { + if let Ok(mut bloomsettings) = query_bloomsettings.get_single_mut() { if *vis == Visibility::Inherited { *vis = Visibility::Hidden; settings.hud_active = false; - //bloomsettings.composite_mode = BloomCompositeMode::EnergyConserving; + bloomsettings.composite_mode = BloomCompositeMode::EnergyConserving; } else { *vis = Visibility::Inherited; settings.hud_active = true; - //bloomsettings.composite_mode = BloomCompositeMode::Additive; + bloomsettings.composite_mode = BloomCompositeMode::Additive; } evwriter.send(audio::AudioSwitchEvent()); evwriter_togglemusic.send(audio::ToggleMusicEvent()); - //} + } } } } diff --git a/src/settings.rs b/src/settings.rs index 4eb3b77..13318f3 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -26,8 +26,8 @@ pub struct Settings { impl Default for Settings { fn default() -> Self { Settings { - mute_sfx: false, - mute_music: false, + mute_sfx: true, + mute_music: true, volume_sfx: 100, volume_music: 100, font_size_hud: 32.0, diff --git a/src/world.rs b/src/world.rs index d3a1391..7bda9db 100644 --- a/src/world.rs +++ b/src/world.rs @@ -13,7 +13,7 @@ const MARS_SIZE: f32 = 10.0; const SUN_SIZE: f32 = 5000.0; const ASTRONAUT_SIZE: f32 = 5.0; -const SUN_BRIGHTNESS: f32 = 1e6; +const SUN_BRIGHTNESS: f32 = 1e5; const SKYBOX_BRIGHTNESS: f32 = 300.0; const ASSET_CUBEMAP: &str = "textures/stars_cubemap.png";