Compare commits

..

No commits in common. "3ae8de91796c5b8c3848bc41ea29f3ea7d821a24" and "de9b8d99e88ea9349bb24fd642b9ace9ddc2d926" have entirely different histories.

5 changed files with 7 additions and 37 deletions

View file

@ -1,10 +1,4 @@
# v0.13.0-dev # v0.12.0-dev
- Reduce power usage when the menu is open or the window is unfocused
- Add sparkles to Jupiter's ring ✨😍✨ best visible from Farview Station
- Add oxygen tank near Luna's workshop, refills oxygen on interaction
# v0.12.0
- Overhaul pizzeria asteroid - Overhaul pizzeria asteroid
- Implement thruster particle effects (only in AR, as they'd be invisble in RL) - Implement thruster particle effects (only in AR, as they'd be invisble in RL)

2
Cargo.lock generated
View file

@ -3039,7 +3039,7 @@ dependencies = [
[[package]] [[package]]
name = "outfly" name = "outfly"
version = "0.13.0-dev" version = "0.12.0"
dependencies = [ dependencies = [
"bevy", "bevy",
"bevy_embedded_assets", "bevy_embedded_assets",

View file

@ -10,7 +10,7 @@
[package] [package]
name = "outfly" name = "outfly"
version = "0.13.0-dev" version = "0.12.0"
edition = "2021" edition = "2021"
homepage = "https://codeberg.org/outfly/outfly" homepage = "https://codeberg.org/outfly/outfly"
repository = "https://codeberg.org/outfly/outfly" repository = "https://codeberg.org/outfly/outfly"

View file

@ -619,9 +619,7 @@ fn check_achievements(
} }
fn handle_window_focus( fn handle_window_focus(
mut local_paused: Local<bool>,
mut settings: ResMut<Settings>, mut settings: ResMut<Settings>,
mut q_window: Query<&mut Window, With<PrimaryWindow>>,
mut er_focus: EventReader<bevy::window::WindowFocused>, mut er_focus: EventReader<bevy::window::WindowFocused>,
mut physicstime: ResMut<Time<Physics>>, mut physicstime: ResMut<Time<Physics>>,
) { ) {
@ -629,23 +627,9 @@ fn handle_window_focus(
settings.window_focused = event.focused; settings.window_focused = event.focused;
} }
let paused = !settings.is_game_running(); if settings.is_game_running() {
if paused != *local_paused {
if paused {
physicstime.pause();
} else {
physicstime.unpause(); physicstime.unpause();
}
for mut window in &mut q_window {
window.cursor.grab_mode = if paused {
bevy::window::CursorGrabMode::None
} else { } else {
bevy::window::CursorGrabMode::Locked physicstime.pause();
};
window.cursor.visible = paused;
}
*local_paused = paused;
} }
} }

View file

@ -115,14 +115,6 @@ fn main() {
mode: bevy_embedded_assets::PluginMode::ReplaceDefault, mode: bevy_embedded_assets::PluginMode::ReplaceDefault,
}); });
// Reduce power usage when unfocused
app.insert_resource(bevy::winit::WinitSettings {
focused_mode: bevy::winit::UpdateMode::Continuous,
unfocused_mode: bevy::winit::UpdateMode::reactive_low_power(
bevy::utils::Duration::from_secs(10),
),
});
app.add_plugins(OutFlyPlugin); app.add_plugins(OutFlyPlugin);
app.insert_resource(prefs); app.insert_resource(prefs);
app.run(); app.run();