add enumeration of bots

This commit is contained in:
Chris Forbes
2010-12-21 18:13:38 +13:00
parent 7ef884532d
commit 29fbeb2c5d
4 changed files with 16 additions and 5 deletions

View File

@@ -211,7 +211,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
if (showBotOptions)
{
var bots = new string[] { "HackyAI" };
var bots = Rules.Info["player"].Traits.WithInterface<IBotInfo>().Select(t => t.Name);
bots.Do(bot =>
dropDownOptions.Add(new Pair<string, Action>("Bot: {0}".F(bot),
() => orderManager.IssueOrder(Order.Command("slot_bot {0} {1}".F(slot.Index, bot))))));