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

@@ -12,6 +12,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.Traits;
using OpenRA.FileFormats;
namespace OpenRA.Mods.RA
{
@@ -65,7 +66,11 @@ namespace OpenRA.Mods.RA
if (self.World.WorldActor.traits.Get<UnitInfluence>().GetUnitsAt(p).Any()) continue;
self.World.AddFrameEndTask(
w => crates.Add(w.CreateActor("crate", p, self.World.WorldActor.Owner)));
w => crates.Add(w.CreateActor("crate", new TypeDictionary
{
new LocationInit( p ),
new OwnerInit( self.World.WorldActor.Owner ),
})));
return;
}
}