diff --git a/GameRes/GameRes.cs b/GameRes/GameRes.cs index 392f6f05..e1a9e602 100644 --- a/GameRes/GameRes.cs +++ b/GameRes/GameRes.cs @@ -95,10 +95,19 @@ namespace GameRes protected IResource () { - Extensions = new string[] { Tag.ToLowerInvariant() }; + Extensions = new string[] { GetDefaultExtension() }; 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 () { return null;