Allow passing map author as an argument

This commit is contained in:
Gustas
2025-01-03 19:19:25 +02:00
committed by Matthias Mailänder
parent 459bbf0025
commit 6193da6899
5 changed files with 13 additions and 5 deletions

View File

@@ -51,6 +51,10 @@ namespace OpenRA.Mods.Cnc.UtilityCommands
Game.ModData = ModData = utility.ModData;
var filename = args[1];
var author = args.Length > 2
? args[2]
: "Westwood Studios";
using (var stream = File.OpenRead(filename))
{
var file = new IniFile(stream);
@@ -73,7 +77,7 @@ namespace OpenRA.Mods.Cnc.UtilityCommands
Map = new Map(ModData, terrainInfo, MapSize, MapSize)
{
Title = basic.GetValue("Name", Path.GetFileNameWithoutExtension(filename)),
Author = "Westwood Studios",
Author = author,
RequiresMod = ModData.Manifest.Id
};