Convert all CreateActor calls to use TypeDictionary

This commit is contained in:
alzeih
2010-08-02 01:28:07 +12:00
parent 4ea66ea309
commit 578d42614b
20 changed files with 131 additions and 63 deletions

View File

@@ -10,6 +10,7 @@
using System.Linq;
using OpenRA.Traits;
using OpenRA.FileFormats;
namespace OpenRA.Mods.RA.Crates
{
@@ -41,7 +42,11 @@ namespace OpenRA.Mods.RA.Crates
var location = ChooseEmptyCellNear(collector);
if (location != null)
collector.World.AddFrameEndTask(
w => w.CreateActor(Info.Unit, location.Value, collector.Owner));
w => w.CreateActor(Info.Unit, new TypeDictionary
{
new LocationInit( location.Value ),
new OwnerInit( collector.Owner )
}));
base.Activate(collector);
}