mirror of
https://codeberg.org/icewind/vbspview.git
synced 2026-06-03 18:24:09 +02:00
material dump
This commit is contained in:
parent
e4b884f680
commit
c625fa85eb
2 changed files with 5 additions and 0 deletions
|
|
@ -30,3 +30,6 @@ steamy-vdf = { version = "0.3.0", git = "https://github.com/icewind1991/steamy",
|
|||
|
||||
[profile.dev.package."*"]
|
||||
opt-level = 2
|
||||
|
||||
[features]
|
||||
dump_materials = []
|
||||
|
|
@ -118,6 +118,8 @@ pub fn load_material(
|
|||
}
|
||||
|
||||
fn parse_vdf(bytes: &[u8]) -> Result<Table, Error> {
|
||||
#[cfg(feature = "dump_materials")]
|
||||
println!("{}", String::from_utf8_lossy(bytes));
|
||||
let mut reader = steamy_vdf::Reader::from(bytes);
|
||||
Table::load(&mut reader).map_err(|e| {
|
||||
error!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue