mirror of
https://codeberg.org/icewind/vmt-parser.git
synced 2026-06-03 12:04:06 +02:00
base texture is optional
This commit is contained in:
parent
4629d01d0f
commit
79c4221a65
1 changed files with 10 additions and 10 deletions
|
|
@ -96,17 +96,17 @@ impl Material {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn base_texture(&self) -> &str {
|
pub fn base_texture(&self) -> Option<&str> {
|
||||||
match self {
|
match self {
|
||||||
Material::LightMappedGeneric(mat) => &mat.base_texture,
|
Material::LightMappedGeneric(mat) => Some(&mat.base_texture),
|
||||||
Material::VertexLitGeneric(mat) => &mat.base_texture,
|
Material::VertexLitGeneric(mat) => Some(&mat.base_texture),
|
||||||
Material::UnlitGeneric(mat) => &mat.base_texture,
|
Material::UnlitGeneric(mat) => Some(&mat.base_texture),
|
||||||
Material::UnlitTwoTexture(mat) => &mat.base_texture,
|
Material::UnlitTwoTexture(mat) => Some(&mat.base_texture),
|
||||||
Material::WorldVertexTransition(mat) => &mat.base_texture,
|
Material::WorldVertexTransition(mat) => Some(&mat.base_texture),
|
||||||
Material::Sprite(mat) => &mat.base_texture,
|
Material::Sprite(mat) => Some(&mat.base_texture),
|
||||||
Material::Water(mat) => mat.base_texture.as_deref().unwrap_or_default(),
|
Material::Water(mat) => mat.base_texture.as_deref(),
|
||||||
Material::EyeRefract(mat) => &mat.iris,
|
Material::EyeRefract(mat) => Some(&mat.iris),
|
||||||
_ => "",
|
_ => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue