Implement new syntax for mod-specific filesystem requests.

This commit is contained in:
Paul Chote
2016-02-06 18:58:16 +00:00
parent a0bc556172
commit a229e4253f
8 changed files with 448 additions and 450 deletions

View File

@@ -81,10 +81,16 @@ namespace OpenRA.FileSystem
if (optional)
name = name.Substring(1);
Action a = () => Mount(OpenPackage(name), explicitName);
var modPackage = name.StartsWith("$");
if (modPackage)
name = name.Substring(1);
Action a = () => Mount(modPackage ? ModMetadata.AllMods[name].Package : OpenPackage(name), explicitName);
if (optional)
{
try { a(); }
catch { }
}
else
a();
}