Replace CenterLocationInit -> CenterPositionInit.
This commit is contained in:
@@ -80,12 +80,12 @@ namespace OpenRA
|
|||||||
public SubCell Value(World world) { return (SubCell)value; }
|
public SubCell Value(World world) { return (SubCell)value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CenterLocationInit : IActorInit<PPos>
|
public class CenterPositionInit : IActorInit<WPos>
|
||||||
{
|
{
|
||||||
[FieldFromYamlKey] public readonly int2 value = int2.Zero;
|
[FieldFromYamlKey] public readonly WPos value = WPos.Zero;
|
||||||
public CenterLocationInit() { }
|
public CenterPositionInit() { }
|
||||||
public CenterLocationInit(PPos init) { value = init.ToInt2(); }
|
public CenterPositionInit(WPos init) { value = init; }
|
||||||
public PPos Value(World world) { return (PPos)value; }
|
public WPos Value(World world) { return value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class OwnerInit : IActorInit<Player>
|
public class OwnerInit : IActorInit<Player>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ namespace OpenRA.Mods.RA
|
|||||||
this.self = init.self;
|
this.self = init.self;
|
||||||
|
|
||||||
TopLeft = init.Get<LocationInit, CPos>();
|
TopLeft = init.Get<LocationInit, CPos>();
|
||||||
CenterPosition = init.Contains<CenterLocationInit>() ? init.Get<CenterLocationInit, PPos>().ToWPos(0) : TopLeft.CenterPosition;
|
CenterPosition = init.Contains<CenterPositionInit>() ? init.Get<CenterPositionInit, WPos>() : TopLeft.CenterPosition;
|
||||||
Facing = init.Contains<FacingInit>() ? init.Get<FacingInit, int>() : 128;
|
Facing = init.Contains<FacingInit>() ? init.Get<FacingInit, int>() : 128;
|
||||||
|
|
||||||
var speed = init.Contains<HuskSpeedInit>() ? init.Get<HuskSpeedInit, int>() : 0;
|
var speed = init.Contains<HuskSpeedInit>() ? init.Get<HuskSpeedInit, int>() : 0;
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
new ParentActorInit(self),
|
new ParentActorInit(self),
|
||||||
new LocationInit(self.Location),
|
new LocationInit(self.Location),
|
||||||
new CenterLocationInit(self.CenterLocation),
|
new CenterPositionInit(self.CenterPosition),
|
||||||
new OwnerInit(self.Owner),
|
new OwnerInit(self.Owner),
|
||||||
new SkipMakeAnimsInit()
|
new SkipMakeAnimsInit()
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user