Add is_audio to ScriptBuilder (#12)

This commit is contained in:
2026-04-13 08:31:18 +08:00
parent 8f59064239
commit e16412350f
3 changed files with 13 additions and 0 deletions

View File

@@ -124,6 +124,11 @@ pub trait ScriptBuilder: std::fmt::Debug {
false
}
/// Returns true if this script is an audio.
fn is_audio(&self) -> bool {
false
}
/// Creates an archive with the given files.
///
/// * `filename` - The path of the archive file to create.

View File

@@ -73,6 +73,10 @@ impl ScriptBuilder for BgiAudioBuilder {
None
}
}
fn is_audio(&self) -> bool {
true
}
}
#[derive(Debug)]

View File

@@ -79,6 +79,10 @@ impl ScriptBuilder for PcmBuilder {
None
}
}
fn is_audio(&self) -> bool {
true
}
}
#[derive(Debug, IntEnum)]