new mapactor init stuff
This commit is contained in:
@@ -41,7 +41,7 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
public Aircraft( ActorInitializer init , AircraftInfo info)
|
||||
{
|
||||
this.Location = init.location;
|
||||
this.Location = init.Get<LocationInit,int2>();
|
||||
Info = info;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace OpenRA.Mods.RA
|
||||
public Crate(ActorInitializer init, CrateInfo info)
|
||||
{
|
||||
this.self = init.self;
|
||||
this.Location = init.location;
|
||||
this.Location = init.Get<LocationInit,int2>();
|
||||
this.Info = info;
|
||||
|
||||
self.World.WorldActor.traits.Get<UnitInfluence>().Add(self, this);
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
self.World.AddFrameEndTask(w =>
|
||||
{
|
||||
var crate = new Actor(w, "crate", new int2(0, 0), w.WorldActor.Owner);
|
||||
var crate = w.CreateActor(false, "crate", new int2(0, 0), w.WorldActor.Owner);
|
||||
crates.Add(crate);
|
||||
|
||||
var startPos = w.ChooseRandomEdgeCell();
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace OpenRA.Mods.RA.Crates
|
||||
var location = ChooseEmptyCellNear(collector);
|
||||
if (location != null)
|
||||
collector.World.AddFrameEndTask(
|
||||
w => w.Add(new Actor(w, Info.Unit, location.Value, collector.Owner)));
|
||||
w => w.CreateActor(Info.Unit, location.Value, collector.Owner));
|
||||
|
||||
base.Activate(collector);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace OpenRA.Mods.RA
|
||||
public Husk(ActorInitializer init)
|
||||
{
|
||||
this.self = init.self;
|
||||
this.location = init.location;
|
||||
this.location = init.Get<LocationInit,int2>();
|
||||
self.World.WorldActor.traits.Get<UnitInfluence>().Add(self, this);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace OpenRA.Mods.RA
|
||||
{
|
||||
this.self = init.self;
|
||||
this.info = info;
|
||||
this.location = init.location;
|
||||
this.location = init.Get<LocationInit,int2>();
|
||||
self.World.WorldActor.traits.Get<UnitInfluence>().Add(self, this);
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
var cargo = a.traits.Get<Cargo>();
|
||||
foreach (var i in items)
|
||||
cargo.Load(a, new Actor(owner.World, i.ToLowerInvariant(),
|
||||
cargo.Load(a, owner.World.CreateActor(false, i.ToLowerInvariant(),
|
||||
new int2(0,0), a.Owner));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user