Implement mod-defined package loaders.

This commit is contained in:
Paul Chote
2017-05-07 12:25:04 +00:00
parent 9b4f602cca
commit 0222ea675c
26 changed files with 993 additions and 838 deletions

View File

@@ -60,13 +60,16 @@ namespace OpenRA.FileSystem
// Other package types can be loaded normally
IReadOnlyPackage package;
var s = GetStream(filename);
if (s == null)
return null;
if (context.TryParsePackage(s, filename, out package))
return package;
s.Dispose();
return null;
}
public void Update(string filename, byte[] contents)
{
// HACK: ZipFiles can't be loaded as read-write from a stream, so we are