Add a bot type identifier.

This commit is contained in:
Paul Chote
2017-05-28 21:04:58 +00:00
parent e88754cd4a
commit b0906e1836
13 changed files with 71 additions and 21 deletions

View File

@@ -15,9 +15,15 @@ namespace OpenRA.Mods.Common.AI
{
public sealed class DummyAIInfo : ITraitInfo, IBotInfo
{
[Desc("Ingame name this bot uses.")]
[Desc("Human-readable name this bot uses.")]
public readonly string Name = "Unnamed Bot";
[FieldLoader.Require]
[Desc("Internal id for this bot.")]
public readonly string Type = null;
string IBotInfo.Type { get { return Type; } }
string IBotInfo.Name { get { return Name; } }
public object Create(ActorInitializer init) { return new DummyAI(this); }