Fix all warnings

This commit is contained in:
2026-09-12 17:01:15 +02:00
parent 50f0371b54
commit df18ffa1a7
15 changed files with 25 additions and 44 deletions
+1 -5
View File
@@ -347,10 +347,6 @@ impl DebugSettings {
self.motion_sampling.cycle(); self.motion_sampling.cycle();
} }
fn cycle_game_speed(&mut self) {
self.motion_sampling.cycle();
}
fn rows_mut(&mut self, handle: usize) -> &mut [FighterDebugRowKind; PLAYER_DEBUG_ROW_COUNT] { fn rows_mut(&mut self, handle: usize) -> &mut [FighterDebugRowKind; PLAYER_DEBUG_ROW_COUNT] {
self.player_rows self.player_rows
.entry(handle) .entry(handle)
@@ -493,7 +489,7 @@ fn handle_palette_input(
} else { } else {
None None
}; };
if let Some(direction) = direction {} if let Some(_direction) = direction {}
} }
if gamepad.just_pressed(GamepadButton::South) { if gamepad.just_pressed(GamepadButton::South) {
match page { match page {
+1 -1
View File
@@ -134,7 +134,7 @@ impl AttackHitbox {
/// Knockback calculation /// Knockback calculation
pub fn calculate_knockback( pub fn calculate_knockback(
&self, &self,
attack: AttackKind, _attack: AttackKind,
receiver_attribs: &FighterAttributes, receiver_attribs: &FighterAttributes,
receiver_damage: FighterDamage, receiver_damage: FighterDamage,
+3 -4
View File
@@ -20,7 +20,6 @@ use crate::fighter::{
}; };
use crate::input::FighterInput; use crate::input::FighterInput;
use crate::math::int::FGi32; use crate::math::int::FGi32;
use crate::math::vec3::FGVec3;
use crate::player::Player; use crate::player::Player;
use crate::scripting::FighterAttackScript; use crate::scripting::FighterAttackScript;
@@ -335,11 +334,11 @@ pub fn attack_debug(
&FighterFacingDirection, &FighterFacingDirection,
&FighterAnimationFrame, &FighterAnimationFrame,
)>, )>,
attack_scripts: Res<Assets<FighterAttackScript>>, _attack_scripts: Res<Assets<FighterAttackScript>>,
mut gizmos: Gizmos, mut gizmos: Gizmos,
) { ) {
for (hitboxes, matrices, translation, facing_direction, frame) in query { for (hitboxes, _matrices, _translation, _facing_direction, _frame) in query {
if let Some(script) = &hitboxes.attack_script { if let Some(_script) = &hitboxes.attack_script {
for solved_hitbox in hitboxes.active_hitboxes_solved.iter() { for solved_hitbox in hitboxes.active_hitboxes_solved.iter() {
let start = solved_hitbox.capsule.start.to_vec3(); let start = solved_hitbox.capsule.start.to_vec3();
let end = solved_hitbox.capsule.end.to_vec3(); let end = solved_hitbox.capsule.end.to_vec3();
+1 -5
View File
@@ -1,11 +1,7 @@
use fixed::types::I16F16;
use crate::{ use crate::fighter::{
fighter::{
attack::{AttackKind, update_active_hitbox_list}, attack::{AttackKind, update_active_hitbox_list},
state::{FighterState, FighterStateImpl, ground::GroundedStateCommon, wait::WaitState}, state::{FighterState, FighterStateImpl, ground::GroundedStateCommon, wait::WaitState},
},
math::int::FGi32,
}; };
#[derive(Clone, Debug, Hash)] #[derive(Clone, Debug, Hash)]
-1
View File
@@ -12,7 +12,6 @@ use strum_macros::EnumIter;
use crate::fighter::attack::AttackKind; use crate::fighter::attack::AttackKind;
use crate::game_settings::GameSettings; use crate::game_settings::GameSettings;
use crate::input::FighterInputFrame; use crate::input::FighterInputFrame;
use crate::math::int::FGi32;
use crate::netcode::GGRSCfg; use crate::netcode::GGRSCfg;
use crate::player::Player; use crate::player::Player;
+1 -1
View File
@@ -1,4 +1,4 @@
use bevy::{picking::Pickable, prelude::*, text::FontSourceTemplate, ui::widget::ImageNodeSize}; use bevy::{picking::Pickable, prelude::*, text::FontSourceTemplate};
use crate::{ use crate::{
fighter::{FighterId, manifest::FighterManifest}, fighter::{FighterId, manifest::FighterManifest},
@@ -4,7 +4,7 @@ pub struct FighterPortrait {
} }
impl FighterPortrait { impl FighterPortrait {
pub fn create(player_slot: usize) -> impl Scene { pub fn create(_player_slot: usize) -> impl Scene {
bsn![ bsn![
Node { Node {
max_width: px(300), max_width: px(300),
+8 -10
View File
@@ -1,8 +1,7 @@
use bevy::{ use bevy::{
picking::pointer::{PointerId, PointerLocation}, picking::pointer::PointerId,
prelude::*, prelude::*,
}; };
use bevy_egui::egui::accesskit::TextAlign;
use crate::{ use crate::{
AppState, AppState,
@@ -10,15 +9,14 @@ use crate::{
game_settings::CommonAssets, game_settings::CommonAssets,
input::{LocalInputAssignments, LocalInputSource}, input::{LocalInputAssignments, LocalInputSource},
menus::{ menus::{
MenuMarker, build_menu_with_props, MenuMarker,
button::FGUiButton, button::FGUiButton,
character_select::{character_box::CharacterBox, token::CharacterSelectToken}, character_select::{character_box::CharacterBox, token::CharacterSelectToken},
cursor::{FGMenuCursor, MenuCursorInputSource}, cursor::{FGMenuCursor, MenuCursorInputSource},
errors::MenuErrors::{self, FighterManifestNotFound}, errors::MenuErrors::FighterManifestNotFound,
match_config::{MenuMatchConfig, MenuMatchPlayerSlot}, match_config::{MenuMatchConfig, MenuMatchPlayerSlot},
scaling, spawn_menu, scaling, spawn_menu,
style::{FGUiButtonType, FGUiStyle}, style::{FGUiButtonType, FGUiStyle},
wrap_menu,
}, },
}; };
@@ -42,10 +40,10 @@ pub fn setup_character_select(
existing_menu: Option<Single<Entity, With<MenuMarker>>>, existing_menu: Option<Single<Entity, With<MenuMarker>>>,
mut commands: Commands, mut commands: Commands,
manifest_registry: Res<FighterManifestRegistry>, manifest_registry: Res<FighterManifestRegistry>,
assignments: Res<LocalInputAssignments>, _assignments: Res<LocalInputAssignments>,
manifests: Res<Assets<FighterManifest>>, manifests: Res<Assets<FighterManifest>>,
common_assets: Res<CommonAssets>, _common_assets: Res<CommonAssets>,
styles: Res<Assets<FGUiStyle>>, _styles: Res<Assets<FGUiStyle>>,
) { ) {
let character_boxes = manifest_registry let character_boxes = manifest_registry
.iter() .iter()
@@ -195,7 +193,7 @@ pub fn css_auto_assign_slots(
#[derive(Event)] #[derive(Event)]
pub struct FighterSelectedEvent { pub struct FighterSelectedEvent {
slot: usize, _slot: usize,
} }
pub fn select_fighter( pub fn select_fighter(
@@ -215,7 +213,7 @@ pub fn select_fighter(
.get(&character_box.fighter_manifest) .get(&character_box.fighter_manifest)
.ok_or(FighterManifestNotFound)?; .ok_or(FighterManifestNotFound)?;
match_config.set_player_fighter(slot, Some(manifest.id))?; match_config.set_player_fighter(slot, Some(manifest.id))?;
commands.trigger(FighterSelectedEvent { slot }); commands.trigger(FighterSelectedEvent { _slot: slot });
} }
} }
} }
+2 -2
View File
@@ -1,6 +1,6 @@
use bevy::{ecs::query::QueryEntityError, reflect::Reflect}; use bevy::reflect::Reflect;
use crate::{fighter::FighterId, menus::match_config::MenuMatchConfigErrors}; use crate::menus::match_config::MenuMatchConfigErrors;
#[derive(thiserror::Error, Debug, Reflect)] #[derive(thiserror::Error, Debug, Reflect)]
pub enum MenuErrors { pub enum MenuErrors {
+2 -3
View File
@@ -1,11 +1,10 @@
use bevy::{ use bevy::{
prelude::*, text::FontSourceTemplate, prelude::*, text::FontSourceTemplate,
ui::auto_directional_navigation::AutoDirectionalNavigation,
}; };
use crate::{ use crate::{
AppState, AppState,
menus::{MenuMarker, button::menu_button, navigation::NavigationDefaultFocus}, menus::{button::menu_button, navigation::NavigationDefaultFocus},
}; };
#[derive(SceneComponent, Default, Clone)] #[derive(SceneComponent, Default, Clone)]
@@ -58,4 +57,4 @@ impl MainMenu {
} }
} }
pub fn setup_main_menu(mut commands: Commands) {} pub fn setup_main_menu(_commands: Commands) {}
+2 -3
View File
@@ -6,7 +6,6 @@ use bevy::{
prelude::*, prelude::*,
}; };
use bevy::prelude::*;
use ron_asset_manager::RonAssetPlugin; use ron_asset_manager::RonAssetPlugin;
use crate::{ use crate::{
@@ -31,7 +30,7 @@ pub struct MenuMarker {}
pub struct MenuPlugin; pub struct MenuPlugin;
pub fn build_menu_scene<S>(existing_menu: Option<Single<Entity, With<MenuMarker>>>) -> impl Scene pub fn build_menu_scene<S>(_existing_menu: Option<Single<Entity, With<MenuMarker>>>) -> impl Scene
where where
S: SceneComponent + Default + Clone + Send + Sync, S: SceneComponent + Default + Clone + Send + Sync,
{ {
@@ -103,7 +102,7 @@ where
pub fn build_menu<S>( pub fn build_menu<S>(
existing_menu: Option<Single<Entity, With<MenuMarker>>>, existing_menu: Option<Single<Entity, With<MenuMarker>>>,
mut commands: Commands, commands: Commands,
) where ) where
S: SceneComponent + Default + Clone + Send + Sync, S: SceneComponent + Default + Clone + Send + Sync,
{ {
-1
View File
@@ -10,7 +10,6 @@ use bevy::{
prelude::*, prelude::*,
ui::auto_directional_navigation::AutoDirectionalNavigator, ui::auto_directional_navigation::AutoDirectionalNavigator,
}; };
use bevy_egui::egui::IntoAtoms;
use std::collections::HashSet; use std::collections::HashSet;
// Action state and input handling // Action state and input handling
-2
View File
@@ -1,5 +1,3 @@
use bevy::camera::CameraProjection;
use bevy::camera::Projection::Orthographic;
use bevy::prelude::*; use bevy::prelude::*;
use bevy::window::WindowResized; use bevy::window::WindowResized;
+1 -2
View File
@@ -6,12 +6,11 @@ use crate::{
match_loading::initiate_match, match_loading::initiate_match,
menus::{ menus::{
MenuMarker, MenuMarker,
button::FGUiButton,
cursor, cursor,
match_config::MenuMatchConfig, match_config::MenuMatchConfig,
spawn_menu, spawn_menu,
stage_select::stage_box::StageBox, stage_select::stage_box::StageBox,
style::{FGUiButtonType, FGUiStyle}, style::FGUiStyle,
}, },
stage::manifest::{StageManifest, StageManifestRegistry}, stage::manifest::{StageManifest, StageManifestRegistry},
}; };
+1 -2
View File
@@ -1,7 +1,6 @@
use bevy::{picking::Pickable, prelude::*, text::FontSourceTemplate, ui::widget::ImageNodeSize}; use bevy::{picking::Pickable, prelude::*, text::FontSourceTemplate};
use crate::{ use crate::{
fighter::{FighterId, manifest::FighterManifest},
menus::{button::FGUiButton, style::FGUiButtonType}, menus::{button::FGUiButton, style::FGUiButtonType},
stage::manifest::{StageId, StageManifest}, stage::manifest::{StageId, StageManifest},
}; };