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