Skip to content

Commit

Permalink
Merge pull request #3669 from dan9550/util-map-hash
Browse files Browse the repository at this point in the history
Get the hash of map files using OpenRA.Utility
  • Loading branch information
Mailaender committed Aug 11, 2013
2 parents f4371f8 + 1b6d798 commit 119f9b9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions OpenRA.Utility/Command.cs
Expand Up @@ -530,6 +530,12 @@ public static void ExtractTraitDocs(string[] args)

Console.WriteLine();
Console.WriteLine("```");
}

public static void GetMapHash(string[] args)
{
var result = new Map(args[1]).Uid;
Console.WriteLine(result);
}
}
}
4 changes: 3 additions & 1 deletion OpenRA.Utility/Program.cs
Expand Up @@ -30,6 +30,7 @@ static void Main(string[] args)
{ "--r8", Command.ConvertR8ToPng },
{ "--transpose", Command.TransposeShp },
{ "--docs", Command.ExtractTraitDocs },
{ "--map-hash", Command.GetMapHash },
};

if (args.Length == 0) { PrintUsage(); return; }
Expand Down Expand Up @@ -65,7 +66,8 @@ static void PrintUsage()
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)
Expand Down

0 comments on commit 119f9b9

Please sign in to comment.