diff --git a/src/camera.rs b/src/camera.rs index 2dc9b67..2816d9d 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -16,7 +16,9 @@ use crate::prelude::*; use bevy::core_pipeline::bloom::{BloomCompositeMode, BloomSettings}; use bevy::core_pipeline::tonemapping::Tonemapping; use bevy::input::mouse::{MouseMotion, MouseWheel}; -use bevy::pbr::{CascadeShadowConfigBuilder, DirectionalLightShadowMap, VolumetricFogSettings, VolumetricLight}; +use bevy::pbr::{ + CascadeShadowConfigBuilder, DirectionalLightShadowMap, VolumetricFogSettings, VolumetricLight, +}; use bevy::prelude::*; use bevy::transform::TransformSystem; use bevy::window::PrimaryWindow; @@ -816,7 +818,10 @@ fn tweak_scene( } } -pub fn update_volumetric_fog(settings: Res, mut q_fog: Query<&mut VolumetricFogSettings>) { +pub fn update_volumetric_fog( + settings: Res, + mut q_fog: Query<&mut VolumetricFogSettings>, +) { let mut fog = if let Ok(x) = q_fog.get_single_mut() { x } else { diff --git a/src/game.rs b/src/game.rs index 8e2bbcf..b848de8 100644 --- a/src/game.rs +++ b/src/game.rs @@ -480,8 +480,7 @@ fn handle_cheats( // We targeted something, but it has no velocity. v.0 = DVec3::ZERO; } - } - else { + } else { // We aren't targeting anything. Match orbital velocity. v.0 = nature::orbital_velocity(pos.0 - jupiter_pos.0, nature::JUPITER_MASS); } diff --git a/src/hud.rs b/src/hud.rs index 8ba8ba7..78e3630 100644 --- a/src/hud.rs +++ b/src/hud.rs @@ -884,7 +884,7 @@ fn update_speedometer( atmo += format!("p: {}bar\n", nature::readable_si(val as f64)).as_str(); } if let Some(val) = settings.atmo_density { - atmo += format!("dens: {}g/m³\n", nature::readable_si(val*1000.0)).as_str(); + atmo += format!("dens: {}g/m³\n", nature::readable_si(val * 1000.0)).as_str(); } if let Some(val) = settings.atmo_drag { atmo += format!("drag: {}m/s²\n", nature::readable_si(val)).as_str(); @@ -986,7 +986,16 @@ fn update_hud( ), >, settings: Res, - q_target: Query<(&IsClickable, &Transform, Option<&Mass>, Option<&Position>, Option<&LinearVelocity>), With>, + q_target: Query< + ( + &IsClickable, + &Transform, + Option<&Mass>, + Option<&Position>, + Option<&LinearVelocity>, + ), + With, + >, ) { if timer.0.tick(time.delta()).just_finished() || log.needs_rerendering { let q_camera_result = q_camera.get_single(); @@ -1059,7 +1068,9 @@ fn update_hud( let size = nature::readable_si(trans.scale.x as f64 * 2.0); let mass = if let Some(mass) = mass { nature::readable_si(mass.0 * 0.001) - } else { String::from("?") }; + } else { + String::from("?") + }; text.sections[0].value = format!("Target: {target_name}\n{pronoun}Distance: {distance}\nSize: {size}m\nMass: {mass}g\n\n"); } else {