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, 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_systems(Update, popup_keybind);
|
||||
@@ -181,6 +184,7 @@ fn interact_click(
|
||||
}
|
||||
}
|
||||
/// Handles debug interactions (shift + left click).
|
||||
#[cfg(debug_assertions)]
|
||||
fn debug_click(
|
||||
mouse_btn: Res<ButtonInput<MouseButton>>,
|
||||
keys: Res<ButtonInput<KeyCode>>,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#[cfg(debug_assertions)]
|
||||
use crate::features::phase::components::SessionTracker;
|
||||
use crate::{features::inventory::ui::open_inventory, prelude::*};
|
||||
use components::*;
|
||||
|
||||
62
src/main.rs
62
src/main.rs
@@ -1,15 +1,19 @@
|
||||
use bevy_dev_tools::fps_overlay::*;
|
||||
use pomomon_garden::prelude::*;
|
||||
|
||||
fn main() {
|
||||
let config = GameConfig::read_config().unwrap_or(GameConfig::default());
|
||||
|
||||
App::new()
|
||||
.add_plugins((
|
||||
DefaultPlugins.set(ImagePlugin::default_nearest()),
|
||||
AsepriteUltraPlugin,
|
||||
))
|
||||
.add_plugins((FpsOverlayPlugin {
|
||||
let mut app = App::new();
|
||||
|
||||
app.add_plugins((
|
||||
DefaultPlugins.set(ImagePlugin::default_nearest()),
|
||||
AsepriteUltraPlugin,
|
||||
));
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
{
|
||||
use bevy_dev_tools::fps_overlay::*;
|
||||
app.add_plugins(FpsOverlayPlugin {
|
||||
config: FpsOverlayConfig {
|
||||
refresh_interval: core::time::Duration::from_millis(100),
|
||||
enabled: true,
|
||||
@@ -20,27 +24,29 @@ fn main() {
|
||||
},
|
||||
..default()
|
||||
},
|
||||
},))
|
||||
.add_plugins((
|
||||
features::CorePlugin,
|
||||
features::StartScreenPlugin,
|
||||
features::GameScreenPlugin,
|
||||
features::GridPlugin,
|
||||
features::PomPlugin,
|
||||
features::InputPlugin,
|
||||
features::PhasePlugin,
|
||||
features::HudPlugin,
|
||||
features::SavegamePlugin,
|
||||
features::UiPlugin,
|
||||
features::InventoryPlugin,
|
||||
features::ShopPlugin,
|
||||
features::WonderEventPlugin,
|
||||
features::NotificationPlugin,
|
||||
features::AchievementPlugin,
|
||||
))
|
||||
.insert_resource(config)
|
||||
.add_systems(Startup, overwrite_default_font)
|
||||
.run();
|
||||
});
|
||||
}
|
||||
|
||||
app.add_plugins((
|
||||
features::CorePlugin,
|
||||
features::StartScreenPlugin,
|
||||
features::GameScreenPlugin,
|
||||
features::GridPlugin,
|
||||
features::PomPlugin,
|
||||
features::InputPlugin,
|
||||
features::PhasePlugin,
|
||||
features::HudPlugin,
|
||||
features::SavegamePlugin,
|
||||
features::UiPlugin,
|
||||
features::InventoryPlugin,
|
||||
features::ShopPlugin,
|
||||
features::WonderEventPlugin,
|
||||
features::NotificationPlugin,
|
||||
features::AchievementPlugin,
|
||||
));
|
||||
app.insert_resource(config);
|
||||
app.add_systems(Startup, overwrite_default_font);
|
||||
app.run();
|
||||
}
|
||||
|
||||
fn overwrite_default_font(mut fonts: ResMut<Assets<Font>>) {
|
||||
|
||||
Reference in New Issue
Block a user