Moves the last 3 UtilityCommands and some prerequisite references to Mods.Common

This commit is contained in:
reaperrr
2015-01-15 22:39:41 +01:00
parent c092c0231f
commit f3d364877a
5 changed files with 11 additions and 8 deletions

View File

@@ -0,0 +1,32 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.IO;
namespace OpenRA.Mods.Common.UtilityCommands
{
class ExportCharacterSeparatedRules : IUtilityCommand
{
public string Name { get { return "--generate-dps-table"; } }
[Desc("Export the damage per second evaluation into a CSV file for inspection.")]
public void Run(ModData modData, string[] args)
{
Game.ModData = modData;
var table = ActorStatsExport.GenerateTable();
var filename = "{0}-mod-dps.csv".F(Game.ModData.Manifest.Mod.Id);
using (var outfile = new StreamWriter(filename))
outfile.Write(table.ToCharacterSeparatedValues(";", true));
Console.WriteLine("{0} has been saved.".F(filename));
Console.WriteLine("Open as values separated by semicolon.");
}
}
}