move ActiveModVersion,ActiveModTitle out of cnc-specific code

This commit is contained in:
Chris Forbes
2011-09-24 21:19:05 +12:00
parent 15d846bfb0
commit e7900d069d
6 changed files with 31 additions and 38 deletions

View File

@@ -12,6 +12,7 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.Graphics;
namespace OpenRA.Widgets
@@ -208,6 +209,18 @@ namespace OpenRA.Widgets
}
public static Action Once( Action a ) { return () => { if (a != null) { a(); a = null; } }; }
public static string ActiveModVersion()
{
var mod = Game.modData.Manifest.Mods[0];
return Mod.AllMods[mod].Version;
}
public static string ActiveModTitle()
{
var mod = Game.modData.Manifest.Mods[0];
return Mod.AllMods[mod].Title;
}
}
[Flags]