fix: Remove debug features from release build
This commit is contained in:
@@ -42,7 +42,10 @@ impl Plugin for InputPlugin {
|
|||||||
app.add_systems(Update, next_phase.run_if(in_state(AppState::GameScreen)));
|
app.add_systems(Update, next_phase.run_if(in_state(AppState::GameScreen)));
|
||||||
|
|
||||||
app.add_systems(Update, shop_keybind.run_if(in_state(AppState::GameScreen)));
|
app.add_systems(Update, shop_keybind.run_if(in_state(AppState::GameScreen)));
|
||||||
app.add_systems(Update, inventory_keybind.run_if(in_state(AppState::GameScreen)));
|
app.add_systems(
|
||||||
|
Update,
|
||||||
|
inventory_keybind.run_if(in_state(AppState::GameScreen)),
|
||||||
|
);
|
||||||
|
|
||||||
app.add_message::<ClosePopupMessage>();
|
app.add_message::<ClosePopupMessage>();
|
||||||
app.add_systems(Update, popup_keybind);
|
app.add_systems(Update, popup_keybind);
|
||||||
@@ -181,6 +184,7 @@ fn interact_click(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// Handles debug interactions (shift + left click).
|
/// Handles debug interactions (shift + left click).
|
||||||
|
#[cfg(debug_assertions)]
|
||||||
fn debug_click(
|
fn debug_click(
|
||||||
mouse_btn: Res<ButtonInput<MouseButton>>,
|
mouse_btn: Res<ButtonInput<MouseButton>>,
|
||||||
keys: Res<ButtonInput<KeyCode>>,
|
keys: Res<ButtonInput<KeyCode>>,
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#[cfg(debug_assertions)]
|
||||||
use crate::features::phase::components::SessionTracker;
|
use crate::features::phase::components::SessionTracker;
|
||||||
use crate::{features::inventory::ui::open_inventory, prelude::*};
|
use crate::{features::inventory::ui::open_inventory, prelude::*};
|
||||||
use components::*;
|
use components::*;
|
||||||
|
|||||||
28
src/main.rs
28
src/main.rs
@@ -1,15 +1,19 @@
|
|||||||
use bevy_dev_tools::fps_overlay::*;
|
|
||||||
use pomomon_garden::prelude::*;
|
use pomomon_garden::prelude::*;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let config = GameConfig::read_config().unwrap_or(GameConfig::default());
|
let config = GameConfig::read_config().unwrap_or(GameConfig::default());
|
||||||
|
|
||||||
App::new()
|
let mut app = App::new();
|
||||||
.add_plugins((
|
|
||||||
|
app.add_plugins((
|
||||||
DefaultPlugins.set(ImagePlugin::default_nearest()),
|
DefaultPlugins.set(ImagePlugin::default_nearest()),
|
||||||
AsepriteUltraPlugin,
|
AsepriteUltraPlugin,
|
||||||
))
|
));
|
||||||
.add_plugins((FpsOverlayPlugin {
|
|
||||||
|
#[cfg(debug_assertions)]
|
||||||
|
{
|
||||||
|
use bevy_dev_tools::fps_overlay::*;
|
||||||
|
app.add_plugins(FpsOverlayPlugin {
|
||||||
config: FpsOverlayConfig {
|
config: FpsOverlayConfig {
|
||||||
refresh_interval: core::time::Duration::from_millis(100),
|
refresh_interval: core::time::Duration::from_millis(100),
|
||||||
enabled: true,
|
enabled: true,
|
||||||
@@ -20,8 +24,10 @@ fn main() {
|
|||||||
},
|
},
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
},))
|
});
|
||||||
.add_plugins((
|
}
|
||||||
|
|
||||||
|
app.add_plugins((
|
||||||
features::CorePlugin,
|
features::CorePlugin,
|
||||||
features::StartScreenPlugin,
|
features::StartScreenPlugin,
|
||||||
features::GameScreenPlugin,
|
features::GameScreenPlugin,
|
||||||
@@ -37,10 +43,10 @@ fn main() {
|
|||||||
features::WonderEventPlugin,
|
features::WonderEventPlugin,
|
||||||
features::NotificationPlugin,
|
features::NotificationPlugin,
|
||||||
features::AchievementPlugin,
|
features::AchievementPlugin,
|
||||||
))
|
));
|
||||||
.insert_resource(config)
|
app.insert_resource(config);
|
||||||
.add_systems(Startup, overwrite_default_font)
|
app.add_systems(Startup, overwrite_default_font);
|
||||||
.run();
|
app.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn overwrite_default_font(mut fonts: ResMut<Assets<Font>>) {
|
fn overwrite_default_font(mut fonts: ResMut<Assets<Font>>) {
|
||||||
|
|||||||
Reference in New Issue
Block a user