mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2024-11-24 10:54:16 +00:00
Format Rust code using rustfmt
This commit is contained in:
parent
6f6ce58a88
commit
ac81ef810f
3 changed files with 16 additions and 16 deletions
|
@ -10,10 +10,10 @@ pub mod combo;
|
|||
pub mod directional_influence;
|
||||
pub mod frame_counter;
|
||||
pub mod ledge;
|
||||
pub mod throw;
|
||||
pub mod sdi;
|
||||
pub mod shield;
|
||||
pub mod tech;
|
||||
pub mod throw;
|
||||
|
||||
mod air_dodge_direction;
|
||||
mod attack_angle;
|
||||
|
@ -86,7 +86,7 @@ pub unsafe fn handle_get_command_flag_cat(
|
|||
flag |= mash::get_command_flag_cat(module_accessor, category);
|
||||
// Get throw directions
|
||||
flag |= throw::get_command_flag_throw_direction(module_accessor);
|
||||
|
||||
|
||||
once_per_frame_per_fighter(module_accessor, category);
|
||||
|
||||
flag
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
use crate::common::*;
|
||||
use crate::training::frame_counter;
|
||||
use crate::training::ledge;
|
||||
use crate::training::throw;
|
||||
use crate::training::mash;
|
||||
use crate::training::sdi;
|
||||
use crate::training::shield_tilt;
|
||||
use crate::training::throw;
|
||||
use smash::app::{self, lua_bind::*};
|
||||
use smash::lib::lua_const::*;
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ fn roll_throw_delay() {
|
|||
return;
|
||||
}
|
||||
|
||||
THROW_DELAY = MENU.throw_delay.get_random().into_meddelay();
|
||||
THROW_DELAY = MENU.throw_delay.get_random().into_meddelay();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ fn roll_pummel_delay() {
|
|||
return;
|
||||
}
|
||||
|
||||
PUMMEL_DELAY = MENU.pummel_delay.get_random().into_meddelay();
|
||||
PUMMEL_DELAY = MENU.pummel_delay.get_random().into_meddelay();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -83,16 +83,15 @@ fn roll_throw_case() {
|
|||
}
|
||||
|
||||
pub unsafe fn get_command_flag_throw_direction(
|
||||
module_accessor: &mut app::BattleObjectModuleAccessor
|
||||
module_accessor: &mut app::BattleObjectModuleAccessor,
|
||||
) -> i32 {
|
||||
|
||||
if !is_operation_cpu(module_accessor) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if StatusModule::status_kind(module_accessor) as i32 != *FIGHTER_STATUS_KIND_CATCH_WAIT
|
||||
&& StatusModule::status_kind(module_accessor) as i32 != *FIGHTER_STATUS_KIND_CATCH_PULL
|
||||
&& StatusModule::status_kind(module_accessor) as i32 != *FIGHTER_STATUS_KIND_CATCH_ATTACK
|
||||
if StatusModule::status_kind(module_accessor) as i32 != *FIGHTER_STATUS_KIND_CATCH_WAIT
|
||||
&& StatusModule::status_kind(module_accessor) as i32 != *FIGHTER_STATUS_KIND_CATCH_PULL
|
||||
&& StatusModule::status_kind(module_accessor) as i32 != *FIGHTER_STATUS_KIND_CATCH_ATTACK
|
||||
{
|
||||
// No longer holding character, so re-roll the throw case and reset the delay counter for next time
|
||||
reset_throw_case();
|
||||
|
@ -101,8 +100,9 @@ pub unsafe fn get_command_flag_throw_direction(
|
|||
reset_pummel_delay();
|
||||
return 0;
|
||||
}
|
||||
|
||||
if !WorkModule::is_enable_transition_term( // If you can't throw right now, don't bother
|
||||
|
||||
if !WorkModule::is_enable_transition_term(
|
||||
// If you can't throw right now, don't bother
|
||||
module_accessor,
|
||||
*FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_THROW_HI,
|
||||
) {
|
||||
|
@ -130,10 +130,10 @@ pub unsafe fn get_command_flag_throw_direction(
|
|||
if MENU.pummel_delay == MedDelay::empty() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// (this conditional would need to be changed to speed up pummelling)
|
||||
if StatusModule::status_kind(module_accessor) as i32 == *FIGHTER_STATUS_KIND_CATCH_WAIT {
|
||||
let status = *FIGHTER_STATUS_KIND_CATCH_ATTACK;//.unwrap_or(0);
|
||||
let status = *FIGHTER_STATUS_KIND_CATCH_ATTACK; //.unwrap_or(0);
|
||||
StatusModule::change_status_request_from_script(module_accessor, status, true);
|
||||
}
|
||||
|
||||
|
@ -149,6 +149,6 @@ pub unsafe fn get_command_flag_throw_direction(
|
|||
mash::buffer_menu_mash();
|
||||
return cmd;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue