use crate::{PreparedComponentControl, PreparedControlEffectRow, PreparedControlEffectSection}; impl PreparedComponentControl { /// Initial node-attached sound rows driven by a weapon's timeline. pub fn weapon_node_sound_rows(&self) -> impl Iterator { let rows = match &self.effect_section { PreparedControlEffectSection::Parsed(rows) => rows.as_slice(), _ => &[], }; rows.iter().filter(|row| { row.opcode == 3 && self.initial_effect_group == Some(row.table_index) && row.raw_condition[0] & 0xf000_0000 == 0 && !self.typed_records.iter().any(|record| { self.weapon_windup_sound_rows(record) .any(|windup| windup.row_index == row.row_index) }) && self.typed_records.iter().any(|record| { record.tag == 2 && record.values.iter().any(|&index| { self.timeline_rows .get(index as usize) .is_some_and(|timeline| { timeline.flags & 0x44 == 0 && timeline.node_index == row.point_offsets[0] as usize }) }) }) }) } }