Skip to content

Commit 26390b3

Browse files
committed
Editor: fixed making template using standard pattern list
1 parent 8f93e16 commit 26390b3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Editor/AGS.Editor/Tasks.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public string[] GetPatternsForStandardGameFiles(Game game, bool mediaResources)
7979
}
8080

8181
string[] roomFiles = null;
82-
if (game.SavedXmlVersionIndex != null && game.SavedXmlVersionIndex < AGSEditor.AGS_4_0_0_XML_VERSION_INDEX_OPEN_ROOMS)
82+
if (game.SavedXmlVersionIndex != null && game.SavedXmlVersionIndex > 0 && game.SavedXmlVersionIndex < AGSEditor.AGS_4_0_0_XML_VERSION_INDEX_OPEN_ROOMS)
8383
{
8484
roomFiles = new string[] { "*.crm" };
8585
}
@@ -94,7 +94,7 @@ public string[] GetPatternsForStandardGameFiles(Game game, bool mediaResources)
9494
}
9595

9696
string[] fontFiles = null;
97-
if (game.SavedXmlVersionIndex != null && game.SavedXmlVersionIndex < AGSEditor.AGS_4_0_0_XML_VERSION_INDEX_FONT_SOURCES)
97+
if (game.SavedXmlVersionIndex != null && game.SavedXmlVersionIndex > 0 && game.SavedXmlVersionIndex < AGSEditor.AGS_4_0_0_XML_VERSION_INDEX_FONT_SOURCES)
9898
{
9999
fontFiles = new string[]
100100
{
@@ -146,6 +146,7 @@ private void ConstructBasicFileListForTemplate(List<string> filesToInclude, List
146146
var patternStr = GetPatternsForStandardGameFiles(Factory.AGSEditor.CurrentGame, mediaResources: true);
147147
var patterns = IncludeUtils.CreatePatternList(patternStr, IncludeUtils.MatchOption.CaseInsensitive);
148148
string[] files = Utilities.GetDirectoryFileList(Factory.AGSEditor.CurrentGame.DirectoryPath, "*.*", SearchOption.AllDirectories, relativePaths: true);
149+
files = IncludeUtils.FilterItemList(files, patterns, IncludeUtils.MatchOption.CaseInsensitive);
149150
filesToInclude.AddRange(files);
150151

151152
if (GetFilesForInclusionInTemplate != null)

0 commit comments

Comments
 (0)