Extend event effects through add-building strip

This commit is contained in:
Jan Petykiewicz 2026-04-19 01:46:59 -07:00
commit b2da02befa
7 changed files with 3319 additions and 1161 deletions

View file

@ -9485,6 +9485,16 @@ fn parse_event_runtime_collection_summary_with_tag_width(
.collect::<Vec<_>>();
mutation_candidate_unknown_descriptor_ids.sort_unstable();
mutation_candidate_unknown_descriptor_ids.dedup();
let mut mutation_candidate_special_condition_label_matches =
mutation_candidate_unknown_descriptor_ids
.iter()
.filter_map(|descriptor_id| {
known_special_condition_label_for_compact_descriptor_id(*descriptor_id)
.map(|label| format!("{descriptor_id} -> {label}"))
})
.collect::<Vec<_>>();
mutation_candidate_special_condition_label_matches.sort();
mutation_candidate_special_condition_label_matches.dedup();
let mut dispatch_strip_unknown_condition_ids = records
.iter()
.filter(|record| {
@ -9533,6 +9543,12 @@ fn parse_event_runtime_collection_summary_with_tag_width(
mutation_candidate_unknown_descriptor_ids
));
}
if !mutation_candidate_special_condition_label_matches.is_empty() {
control_lane_notes.push(format!(
"unlabeled 0x00431b20 dispatch-strip descriptor ids matching known special-condition label_id-2000 values = {:?}",
mutation_candidate_special_condition_label_matches
));
}
if !dispatch_strip_unknown_condition_ids.is_empty() {
control_lane_notes.push(format!(
"standalone condition ids still missing checked-in labels in the 0x00431b20 dispatch strip = {:?}",
@ -9587,6 +9603,16 @@ fn opcode_reaches_world_apply_compact_runtime_effect_dispatch_strip(opcode: u8)
matches!(opcode, 0x04..=0x08 | 0x0d | 0x10..=0x13 | 0x16)
}
fn known_special_condition_label_for_compact_descriptor_id(
descriptor_id: u32,
) -> Option<&'static str> {
let label_id = descriptor_id.checked_add(2000)?;
KNOWN_SPECIAL_CONDITION_DEFINITIONS
.iter()
.find(|definition| definition.label_id == label_id)
.map(|definition| definition.label)
}
fn try_parse_nondirect_event_runtime_record_summaries(
records_payload: &[u8],
records_payload_offset: usize,
@ -23874,8 +23900,8 @@ mod tests {
#[test]
fn checked_in_event_effect_table_covers_the_full_exported_descriptor_set() {
let rows = checked_in_event_effect_descriptor_rows();
assert_eq!(rows.len(), 520);
for descriptor_id in 0..520_u32 {
assert_eq!(rows.len(), 614);
for descriptor_id in 0..614_u32 {
assert!(
real_grouped_effect_descriptor_metadata(descriptor_id).is_some(),
"descriptor {descriptor_id} should be recoverable from the checked-in effect table"