Replace ITraitInfo interface with TraitInfo class.

This commit is contained in:
Paul Chote
2020-05-11 18:12:19 +01:00
committed by reaperrr
parent 3cd7ec3878
commit 86f61298e6
243 changed files with 510 additions and 505 deletions

View File

@@ -21,7 +21,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits.Render
{
// TODO: This trait is hacky and should go away as soon as we support granting a condition on docking, in favor of toggling two regular WithVoxelBodies
public class WithVoxelUnloadBodyInfo : ITraitInfo, IRenderActorPreviewVoxelsInfo, Requires<RenderVoxelsInfo>
public class WithVoxelUnloadBodyInfo : TraitInfo, IRenderActorPreviewVoxelsInfo, Requires<RenderVoxelsInfo>
{
[Desc("Voxel sequence name to use when docked to a refinery.")]
public readonly string UnloadSequence = "unload";
@@ -32,7 +32,7 @@ namespace OpenRA.Mods.Cnc.Traits.Render
[Desc("Defines if the Voxel should have a shadow.")]
public readonly bool ShowShadow = true;
public object Create(ActorInitializer init) { return new WithVoxelUnloadBody(init.Self, this); }
public override object Create(ActorInitializer init) { return new WithVoxelUnloadBody(init.Self, this); }
public IEnumerable<ModelAnimation> RenderPreviewVoxels(
ActorPreviewInitializer init, RenderVoxelsInfo rv, string image, Func<WRot> orientation, int facings, PaletteReference p)