(IResource.GetDefaultExtension): new method.

This commit is contained in:
morkt 2016-09-07 20:26:39 +04:00
parent 07affe292c
commit 7f272a6c16

View File

@ -95,10 +95,19 @@ namespace GameRes
protected IResource () protected IResource ()
{ {
Extensions = new string[] { Tag.ToLowerInvariant() }; Extensions = new string[] { GetDefaultExtension() };
Signatures = new uint[] { this.Signature }; Signatures = new uint[] { this.Signature };
} }
protected string GetDefaultExtension ()
{
var ext = Tag.ToLowerInvariant();
int slash = ext.IndexOf ('/');
if (slash != -1)
ext = ext.Substring (0, slash);
return ext;
}
public virtual ResourceOptions GetDefaultOptions () public virtual ResourceOptions GetDefaultOptions ()
{ {
return null; return null;