Use SHA1 for map uids

This commit is contained in:
Paul Chote
2010-04-08 20:41:22 +12:00
committed by Bob
parent f5787476f7
commit 73dc63886a
17 changed files with 52 additions and 31 deletions

View File

@@ -20,6 +20,7 @@
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System;
namespace OpenRA.FileFormats
@@ -43,7 +44,7 @@ namespace OpenRA.FileFormats
public Lazy<Bitmap> Preview;
static List<string> Fields = new List<string>() {
"Uid", "Title", "Description", "Author", "PlayerCount", "Tileset", "TopLeft", "BottomRight"
"Title", "Description", "Author", "PlayerCount", "Tileset", "TopLeft", "BottomRight"
};
public MapStub() {}
@@ -57,6 +58,10 @@ namespace OpenRA.FileFormats
Preview = Lazy.New(
() => {return new Bitmap(Package.GetContent("preview.png"));}
);
StreamReader uidStream = new StreamReader(Package.GetContent("map.uid"));
Uid = uidStream.ReadLine();
uidStream.Close();
}
public Rectangle PreviewBounds(Rectangle container)