mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2024-11-30 22:00:16 +00:00
7eec409086
* Merge from CookieScythe branch * Rename block to shieldstun, add icons to layout.arc, add new options to ui_menu * Address clippy warnings and reformat * Add fn_null_check back to whitelist * Pray to clippy gods
26 lines
548 B
Rust
26 lines
548 B
Rust
use smash::app::{self};
|
|
|
|
use crate::common::consts::*;
|
|
use crate::common::*;
|
|
|
|
static mut DIRECTION: AttackAngle = AttackAngle::NEUTRAL;
|
|
|
|
pub fn roll_direction() {
|
|
unsafe {
|
|
DIRECTION = MENU.attack_angle.get_random();
|
|
}
|
|
}
|
|
|
|
pub unsafe fn mod_get_stick_dir(
|
|
module_accessor: &mut app::BattleObjectModuleAccessor,
|
|
) -> Option<f32> {
|
|
if !is_operation_cpu(module_accessor) {
|
|
return None;
|
|
}
|
|
|
|
match DIRECTION {
|
|
AttackAngle::UP => Some(1.0),
|
|
AttackAngle::DOWN => Some(-1.0),
|
|
_ => None,
|
|
}
|
|
}
|