Remove hardcoded references to FacingInit and TurretFacingInit.
This commit is contained in:
committed by
RoosterDragon
parent
2a2bd676a3
commit
fdafbd9f15
@@ -16,7 +16,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
public class TurretedInfo : ITraitInfo, UsesInit<TurretFacingInit>, Requires<BodyOrientationInfo>
|
||||
public class TurretedInfo : ITraitInfo, UsesInit<TurretFacingInit>, Requires<BodyOrientationInfo>, IActorPreviewInitInfo
|
||||
{
|
||||
public readonly string Turret = "primary";
|
||||
[Desc("Speed at which the turret turns.")]
|
||||
@@ -29,6 +29,14 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Muzzle position relative to turret or body. (forward, right, up) triples")]
|
||||
public readonly WVec Offset = WVec.Zero;
|
||||
|
||||
[Desc("Facing to use for actor previews (map editor, color picker, etc)")]
|
||||
public readonly int PreviewFacing = 92;
|
||||
|
||||
IEnumerable<object> IActorPreviewInitInfo.ActorPreviewInits(ActorInfo ai, ActorPreviewType type)
|
||||
{
|
||||
yield return new TurretFacingInit(PreviewFacing);
|
||||
}
|
||||
|
||||
public virtual object Create(ActorInitializer init) { return new Turreted(init, this); }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user