Merge pull request #11771 from pchote/split-content-files

Rework mod enumeration and split content metadata into their own files.
This commit is contained in:
reaperrr
2016-08-18 14:59:51 +02:00
committed by GitHub
96 changed files with 5803 additions and 5630 deletions

View File

@@ -17,21 +17,21 @@ namespace OpenRA.Mods.D2k.UtilityCommands
{
class ImportD2kMapCommand : IUtilityCommand
{
public string Name { get { return "--import-d2k-map"; } }
string IUtilityCommand.Name { get { return "--import-d2k-map"; } }
public bool ValidateArguments(string[] args)
bool IUtilityCommand.ValidateArguments(string[] args)
{
return args.Length >= 3;
}
[Desc("FILENAME", "TILESET", "Convert a legacy Dune 2000 MAP file to the OpenRA format.")]
public void Run(ModData modData, string[] args)
void IUtilityCommand.Run(Utility utility, string[] args)
{
// HACK: The engine code assumes that Game.modData is set.
Game.ModData = modData;
Game.ModData = utility.ModData;
var rules = Ruleset.LoadDefaultsForTileSet(modData, "ARRAKIS");
var map = D2kMapImporter.Import(args[1], modData.Manifest.Mod.Id, args[2], rules);
var rules = Ruleset.LoadDefaultsForTileSet(utility.ModData, "ARRAKIS");
var map = D2kMapImporter.Import(args[1], utility.ModData.Manifest.Id, args[2], rules);
if (map == null)
return;