Fix formatting and shit

This commit is contained in:
2026-08-26 21:35:43 +02:00
parent a857a3c814
commit d9222409ce
20 changed files with 26 additions and 59 deletions
-1
View File
@@ -1,4 +1,3 @@
use bevy::prelude::*;
use fixed::traits::Fixed;
use crate::fighter::*;
+2 -8
View File
@@ -8,14 +8,8 @@ use crate::fighter::animation::AnimKind;
use crate::fighter::state::FighterState;
use crate::fighter::state::fall::FallState;
use crate::fighter::state::ground::{GroundedMotionResult, GroundedStateCommon};
use crate::fighter::state::wait::WaitState;
use crate::fighter::{FighterAttributes, FighterFacingDirection, FighterVelocity, collision};
use crate::game_settings::GameSettings;
use crate::input::{
FighterCommands::{SmashMoveLeft, SmashMoveRight},
FighterInput,
};
use crate::math::int::FGi32;
use crate::fighter::FighterFacingDirection;
use crate::input::FighterCommands::{SmashMoveLeft, SmashMoveRight};
#[derive(Debug, Clone)]
pub struct DashState {
+3 -7
View File
@@ -1,20 +1,16 @@
use bevy::prelude::*;
use super::{FighterStateContext, FighterStateImpl, ground, walk};
use super::{FighterStateContext, FighterStateImpl};
use crate::fighter::state::ground::GroundedStateCommon;
use crate::fighter::state::land::LandingState;
use crate::fighter::state::wait::WaitState;
use crate::fighter::state::{FighterState, air};
use crate::fighter::{FighterAttributes, FighterVelocity, collision, motion};
use crate::game_settings::GameSettings;
use crate::stage::line::StageCollision;
use crate::fighter::collision;
#[derive(Debug, Clone, Copy, Hash)]
pub struct FallState;
impl FighterStateImpl for FallState {
const NAME: &'static str = "Fall";
fn check_interrupt(&self, state_context: &FighterStateContext) -> Option<FighterState> {
fn check_interrupt(&self, _state_context: &FighterStateContext) -> Option<FighterState> {
None
}
+3 -4
View File
@@ -4,14 +4,13 @@
use crate::fighter::state::{FighterState, FighterStateContext};
use crate::fighter::{
FighterAttributes, FighterECB, FighterPreviousTranslation, FighterTranslation, FighterVelocity,
FighterAttributes, FighterPreviousTranslation, FighterTranslation, FighterVelocity,
};
use crate::game_settings::GameSettings;
use crate::math::int::FGi32;
use crate::math::vec::FGVec2;
use crate::stage::StagePoly;
use crate::stage::line::{
StageCollision, StageLineID, StagePolyLineSegment, StagePolyLineSegmentType,
StageLineID, StagePolyLineSegmentType,
};
use bevy::prelude::*;
@@ -89,7 +88,7 @@ pub fn apply_grounded_motion(
pub fn collide_with_stage_grounded(
state_context: &mut FighterStateContext,
ground_common: &mut GroundedStateCommon,
can_walk_off: bool,
_can_walk_off: bool,
) -> GroundedMotionResult {
let translation = &mut state_context.translation;
let ecb = &state_context.ecb;
+2 -2
View File
@@ -5,7 +5,7 @@ use bevy::prelude::*;
use crate::{
fighter::{
animation::AnimKind, collision, state::{
FighterState, FighterStateContext, FighterStateImpl, air, fall::FallState, ground::{self, GroundedMotionResult, GroundedStateCommon}, land::LandingState, wait::WaitState,
FighterState, FighterStateContext, FighterStateImpl, air, fall::FallState, ground::{self, GroundedMotionResult, GroundedStateCommon}, land::LandingState,
},
}, input::FighterCommands,
};
@@ -98,7 +98,7 @@ impl FighterStateImpl for JumpSquatState {
impl FighterStateImpl for JumpState {
const NAME: &'static str = "Jump";
fn check_interrupt(&self, state_context: &FighterStateContext) -> Option<FighterState> {
fn check_interrupt(&self, _state_context: &FighterStateContext) -> Option<FighterState> {
None
}
+3 -7
View File
@@ -2,20 +2,16 @@ use std::time::Duration;
use bevy::prelude::*;
use crate::{
fighter::{
use crate::fighter::{
animation::AnimKind,
collision,
state::{
FighterState, FighterStateContext, FighterStateImpl, air, dash,
FighterState, FighterStateContext, FighterStateImpl, dash,
fall::FallState,
ground::{self, GroundedMotionResult, GroundedStateCommon},
wait::WaitState,
walk,
},
},
input::FighterCommands,
};
};
#[derive(Debug, Clone, Hash)]
pub struct LandingState {
-3
View File
@@ -7,9 +7,6 @@ use crate::fighter::animation::AnimKind;
use crate::fighter::state::FighterState;
use crate::fighter::state::fall::FallState;
use crate::fighter::state::ground::{GroundedMotionResult, GroundedStateCommon};
use crate::fighter::{FighterAttributes, FighterVelocity};
use crate::game_settings::GameSettings;
use crate::input::FighterInput;
use crate::math::int::FGi32;
#[derive(Component, Debug, Clone, Hash)]
-3
View File
@@ -9,9 +9,6 @@ use crate::fighter::state::ground::{
GroundedMotionResult, GroundedStateCommon, grounded_movement_common_interrupts,
};
use crate::fighter::state::{FighterState, dash};
use crate::fighter::{FighterAttributes, FighterVelocity};
use crate::game_settings::GameSettings;
use crate::stage::line::StageLineID;
#[derive(Debug, Clone, Hash)]
pub struct WaitState {
+1 -4
View File
@@ -6,10 +6,7 @@ use super::{FighterStateContext, FighterStateImpl, dash, ground, wait};
use crate::fighter::animation::AnimKind;
use crate::fighter::state::fall::FallState;
use crate::fighter::state::ground::{GroundedMotionResult, GroundedStateCommon};
use crate::fighter::state::{self, FighterState};
use crate::fighter::{FighterAttributes, FighterVelocity};
use crate::game_settings::GameSettings;
use crate::input::FighterInput;
use crate::fighter::state::FighterState;
#[derive(Debug, Clone, Hash)]
pub struct WalkState {