mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-14 20:54:16 +01:00
Ensure materials end in .mtrl
This commit is contained in:
parent
616db0dcc3
commit
2e76148fba
1 changed files with 4 additions and 1 deletions
|
|
@ -290,10 +290,13 @@ public partial class ModEditWindow
|
|||
/// While materials can be relative (`/mt_...`) or absolute (`bg/...`),
|
||||
/// they invariably must contain at least one directory seperator.
|
||||
/// Missing this can lead to a crash.
|
||||
///
|
||||
/// They must also be at least one character (though this is enforced
|
||||
/// by containing a `/`), and end with `.mtrl`.
|
||||
/// </remarks>
|
||||
public bool ValidateMaterial(string material)
|
||||
{
|
||||
return material.Contains('/');
|
||||
return material.Contains('/') && material.EndsWith(".mtrl");
|
||||
}
|
||||
|
||||
/// <summary> Remove the material given by the index. </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue