Quick and esy way to get the hash of map files using OpenRA.Utility

This commit is contained in:
Dan9550
2013-08-11 12:47:34 +10:00
parent 69130fea95
commit 1b6d79888f
2 changed files with 9 additions and 1 deletions

View File

@@ -530,6 +530,12 @@ namespace OpenRA.Utility
Console.WriteLine();
Console.WriteLine("```");
}
public static void GetMapHash(string[] args)
{
var result = new Map(args[1]).Uid;
Console.WriteLine(result);
}
}
}

View File

@@ -30,6 +30,7 @@ namespace OpenRA.Utility
{ "--r8", Command.ConvertR8ToPng },
{ "--transpose", Command.TransposeShp },
{ "--docs", Command.ExtractTraitDocs },
{ "--map-hash", Command.GetMapHash },
};
if (args.Length == 0) { PrintUsage(); return; }
@@ -65,7 +66,8 @@ namespace OpenRA.Utility
Console.WriteLine(" --remap SRCMOD:PAL DESTMOD:PAL SRCSHP DESTSHP Remap SHPs to another palette");
Console.WriteLine(" --r8 R8FILE PALETTE START END FILENAME [--noshadow] [--infrantry] [--vehicle] [--projectile] [--building] [--wall] [--tileset] Convert Dune 2000 DATA.R8 to PNGs choosing start- and endframe as well as type for correct offset to append multiple frames to one PNG named by filename optionally removing the shadow.");
Console.WriteLine(" --transpose SRCSHP DESTSHP START N M [START N M ...] Transpose the N*M block of frames starting at START.");
Console.WriteLine(" --docs MOD Generate trait documentation in MarkDown format.");
Console.WriteLine(" --docs MOD Generate trait documentation in MarkDown format.");
Console.WriteLine(" --map-hash MAPFILE Generate hash of specified oramap file.");
}
static string GetNamedArg(string[] args, string arg)