Struct brawllib_rs::script_runner::ScriptRunner
source · pub struct ScriptRunner<'a> {Show 108 fields
pub subaction_name: String,
pub wiird_frame_speed_modifiers: &'a [WiiRDFrameSpeedModifier],
pub call_stacks: Vec<CallStack<'a>>,
pub fighter_scripts: &'a [&'a ScriptAst],
pub common_scripts: &'a [&'a ScriptAst],
pub section_scripts: &'a [SectionScriptAst],
pub call_every_frame: HashMap<i32, CallEveryFrame<'a>>,
pub visited_gotos: Vec<i32>,
pub subaction_index: usize,
pub frame_index: f32,
pub animation_index: f32,
pub frame_count: usize,
pub interruptible: bool,
pub hitboxes: [Option<ScriptCollisionBox>; 7],
pub hurtbox_state_all: HurtBoxState,
pub hurtbox_states: HashMap<i32, HurtBoxState>,
pub ledge_grab_enable: LedgeGrabEnable,
pub frame_speed_modifier: f32,
pub tag_display: bool,
pub x: f32,
pub y: f32,
pub x_vel: f32,
pub y_vel: f32,
pub x_vel_modify: VelModify,
pub y_vel_modify: VelModify,
pub disable_movement: DisableMovement,
pub armor_type: ArmorType,
pub armor_tolerance: f32,
pub damage: f32,
pub airbourne: bool,
pub edge_slide: EdgeSlide,
pub reverse_direction: bool,
pub change_subaction: ChangeSubaction,
pub invisible_bones: Vec<i32>,
pub interrupts: Vec<Interrupt>,
pub bad_interrupts: Vec<Interrupt>,
pub hitbox_sets_rehit: [bool; 10],
pub slope_contour_stand: Option<i32>,
pub slope_contour_full: Option<(i32, i32)>,
pub rumble: Option<(i32, i32)>,
pub rumble_loop: Option<(i32, i32)>,
pub grab_interrupt_damage: Option<i32>,
pub throw: Option<SpecifyThrow>,
pub throw_activate: bool,
pub jumps_used: i32,
pub wall_jump_count: i32,
pub wall_jump_interval: i32,
pub footstool_count: i32,
pub fall_time: i32,
pub swim_time: i32,
pub lip_stick_refresh: i32,
pub curry_remaining_time: i32,
pub curry_angle2: i32,
pub star_remaining_time: i32,
pub mushroom_remaining_time: i32,
pub lightning_remaining_time: i32,
pub size_flag: i32,
pub metal_block_remaining_time: i32,
pub combo_count: i32,
pub bubble_time: i32,
pub attacks_performed: i32,
pub costume_id: i32,
pub hitstun_frames_remaining: i32,
pub meteor_cancel_window: i32,
pub missed_techs: i32,
pub tether_count: i32,
pub temp1: i32,
pub temp2: i32,
pub longterm_access_int: Vec<i32>,
pub special_landing_lag: f32,
pub special_fall_mobility_multiplier: f32,
pub shield_charge: f32,
pub curry_angle1: f32,
pub curry_randomness: f32,
pub longterm_access_float: Vec<f32>,
pub is_dead: bool,
pub cannot_die: bool,
pub automatic_footstool: bool,
pub has_final: bool,
pub has_final_aura: bool,
pub has_curry: bool,
pub has_hammer: bool,
pub hit_by_paralyze: bool,
pub has_screw_attack: bool,
pub stamina_dead: bool,
pub has_tag: bool,
pub can_not_ledge_grab: bool,
pub can_not_teeter: bool,
pub velocity_ignore_hitstun: bool,
pub deflection: bool,
pub longterm_access_bool: Vec<bool>,
pub throw_data_param1: i32,
pub throw_data_param2: i32,
pub throw_data_param3: i32,
pub random_access_int: Vec<i32>,
pub enable_turn_when_below_zero: f32,
pub random_access_float: Vec<f32>,
pub character_float: bool,
pub enable_fast_fall: bool,
pub shorthop: bool,
pub enable_action_transition: bool,
pub specials_movement: bool,
pub enable_glide: bool,
pub enable_jab_loop: bool,
pub enable_auto_jab: bool,
pub enable_jab_end: bool,
pub landing_lag: bool,
pub random_access_bool: Vec<bool>,
}
Fields§
§subaction_name: String
§wiird_frame_speed_modifiers: &'a [WiiRDFrameSpeedModifier]
§call_stacks: Vec<CallStack<'a>>
§fighter_scripts: &'a [&'a ScriptAst]
§common_scripts: &'a [&'a ScriptAst]
§section_scripts: &'a [SectionScriptAst]
§call_every_frame: HashMap<i32, CallEveryFrame<'a>>
§visited_gotos: Vec<i32>
§subaction_index: usize
§frame_index: f32
§animation_index: f32
§frame_count: usize
§interruptible: bool
§hitboxes: [Option<ScriptCollisionBox>; 7]
§hurtbox_state_all: HurtBoxState
§hurtbox_states: HashMap<i32, HurtBoxState>
§ledge_grab_enable: LedgeGrabEnable
§frame_speed_modifier: f32
§tag_display: bool
§x: f32
State is maintained across frames
y: f32
State is maintained across frames
x_vel: f32
State is maintained across frames
y_vel: f32
State is maintained across frames
x_vel_modify: VelModify
Reset to None before processing each frame
y_vel_modify: VelModify
Reset to None before processing each frame
disable_movement: DisableMovement
§armor_type: ArmorType
§armor_tolerance: f32
§damage: f32
§airbourne: bool
§edge_slide: EdgeSlide
§reverse_direction: bool
§change_subaction: ChangeSubaction
§invisible_bones: Vec<i32>
Children of these bones are also visible
interrupts: Vec<Interrupt>
Each Interrupt is rechecked every frame after being created
bad_interrupts: Vec<Interrupt>
As a hack to get some subactions working we store “bad interrupts” here instead.
hitbox_sets_rehit: [bool; 10]
§slope_contour_stand: Option<i32>
§slope_contour_full: Option<(i32, i32)>
§rumble: Option<(i32, i32)>
§rumble_loop: Option<(i32, i32)>
§grab_interrupt_damage: Option<i32>
§throw: Option<SpecifyThrow>
§throw_activate: bool
Reset to false before processing each frame.
jumps_used: i32
§wall_jump_count: i32
§wall_jump_interval: i32
§footstool_count: i32
§fall_time: i32
§swim_time: i32
§lip_stick_refresh: i32
§curry_remaining_time: i32
§curry_angle2: i32
§star_remaining_time: i32
§mushroom_remaining_time: i32
§lightning_remaining_time: i32
§size_flag: i32
§metal_block_remaining_time: i32
§combo_count: i32
§bubble_time: i32
§attacks_performed: i32
§costume_id: i32
§hitstun_frames_remaining: i32
§meteor_cancel_window: i32
§missed_techs: i32
§tether_count: i32
§temp1: i32
§temp2: i32
§longterm_access_int: Vec<i32>
§special_landing_lag: f32
§special_fall_mobility_multiplier: f32
§shield_charge: f32
§curry_angle1: f32
§curry_randomness: f32
§longterm_access_float: Vec<f32>
§is_dead: bool
§cannot_die: bool
§automatic_footstool: bool
§has_final: bool
§has_final_aura: bool
§has_curry: bool
§has_hammer: bool
§hit_by_paralyze: bool
§has_screw_attack: bool
§stamina_dead: bool
§has_tag: bool
§can_not_ledge_grab: bool
§can_not_teeter: bool
§velocity_ignore_hitstun: bool
§deflection: bool
§longterm_access_bool: Vec<bool>
§throw_data_param1: i32
§throw_data_param2: i32
§throw_data_param3: i32
§random_access_int: Vec<i32>
§enable_turn_when_below_zero: f32
§random_access_float: Vec<f32>
§character_float: bool
§enable_fast_fall: bool
§shorthop: bool
§enable_action_transition: bool
§specials_movement: bool
§enable_glide: bool
§enable_jab_loop: bool
§enable_auto_jab: bool
§enable_jab_end: bool
§landing_lag: bool
§random_access_bool: Vec<bool>
Implementations§
source§impl<'a> ScriptRunner<'a>
impl<'a> ScriptRunner<'a>
sourcepub fn new(
subaction_index: usize,
wiird_frame_speed_modifiers: &'a [WiiRDFrameSpeedModifier],
subaction_scripts: &[&'a ScriptAst],
fighter_scripts: &'a [&'a ScriptAst],
common_scripts: &'a [&'a ScriptAst],
section_scripts: &'a [SectionScriptAst],
init_hack_script: &Block,
fighter_data: &ArcFighterData,
subaction_name: String
) -> ScriptRunner<'a>
pub fn new( subaction_index: usize, wiird_frame_speed_modifiers: &'a [WiiRDFrameSpeedModifier], subaction_scripts: &[&'a ScriptAst], fighter_scripts: &'a [&'a ScriptAst], common_scripts: &'a [&'a ScriptAst], section_scripts: &'a [SectionScriptAst], init_hack_script: &Block, fighter_data: &ArcFighterData, subaction_name: String ) -> ScriptRunner<'a>
Runs the action main, gfx, sfx and other scripts in subaction_scripts.
all_scripts contains any functions that the action scripts need to call into.
The returned runner has completed the first frame.
Calling runner.step
will advance to frame 2 and then frame 3 and so on.
Auto Trait Implementations§
impl<'a> RefUnwindSafe for ScriptRunner<'a>
impl<'a> Send for ScriptRunner<'a>
impl<'a> Sync for ScriptRunner<'a>
impl<'a> Unpin for ScriptRunner<'a>
impl<'a> UnwindSafe for ScriptRunner<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.