Allow passing map author as an argument
This commit is contained in:
committed by
Matthias Mailänder
parent
459bbf0025
commit
6193da6899
@@ -59,6 +59,10 @@ namespace OpenRA.Mods.Cnc.UtilityCommands
|
||||
Game.ModData = utility.ModData;
|
||||
|
||||
var filename = args[1];
|
||||
var author = args.Length > 2
|
||||
? args[2]
|
||||
: "Westwood Studios";
|
||||
|
||||
var file = new IniFile(File.Open(args[1], FileMode.Open));
|
||||
var basic = file.GetSection("Basic");
|
||||
var mapSection = file.GetSection("Map");
|
||||
@@ -75,7 +79,7 @@ namespace OpenRA.Mods.Cnc.UtilityCommands
|
||||
var map = new Map(Game.ModData, terrainInfo, mapCanvasSize.Width, mapCanvasSize.Height)
|
||||
{
|
||||
Title = basic.GetValue("Name", Path.GetFileNameWithoutExtension(filename)),
|
||||
Author = "Westwood Studios",
|
||||
Author = author,
|
||||
RequiresMod = utility.ModData.Manifest.Id
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user