husks should not be mobile

This commit is contained in:
Chris Forbes
2010-05-16 16:30:49 +12:00
parent 128f12e88e
commit 7e754a5590
5 changed files with 46 additions and 33 deletions

22
OpenRA.Mods.RA/Husk.cs Normal file
View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
{
class HuskInfo : ITraitInfo { public object Create(Actor self) { return new Husk(self); } }
class Husk : IOccupySpace
{
Actor self;
public Husk(Actor self)
{
this.self = self;
self.World.WorldActor.traits.Get<UnitInfluence>().Add(self, this);
}
public IEnumerable<int2> OccupiedCells() { yield return self.Location; }
}
}