move ActorGroupProxy to mod; move SupportPower traits into directory

This commit is contained in:
Bob
2010-07-08 14:01:44 +12:00
parent 9054f10b83
commit 6a840dff4c
11 changed files with 9 additions and 9 deletions

View File

@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace OpenRA.Traits
{
class ActorGroupProxyInfo : TraitInfo<ActorGroupProxy> { }
class ActorGroupProxy : IResolveOrder
{
public void ResolveOrder(Actor self, Order order)
{
if (order.OrderString == "CreateGroup")
{
/* create a group */
var actors = order.TargetString.Split(',')
.Select(id => uint.Parse(id))
.Select(id => self.World.Actors.FirstOrDefault(a => a.ActorID == id))
.Where(a => a != null);
var g = new Group(actors);
// g.Dump();
}
}
}
}