Add a IAutoSelctionSizeInfo trait interface
This commit is contained in:
@@ -14,7 +14,7 @@ using OpenRA.Traits;
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("Special case trait for actors that need to define targetable area and screen map bounds manually.")]
|
||||
public class CustomSelectionSizeInfo : ITraitInfo
|
||||
public class CustomSelectionSizeInfo : ITraitInfo, IAutoSelectionSizeInfo
|
||||
{
|
||||
[FieldLoader.Require]
|
||||
public readonly int[] CustomBounds = null;
|
||||
|
||||
@@ -14,7 +14,7 @@ using OpenRA.Traits;
|
||||
namespace OpenRA.Mods.Common.Traits.Render
|
||||
{
|
||||
[Desc("Automatically calculates the targetable area and screen map boundaries from the sprite size.")]
|
||||
public class AutoSelectionSizeInfo : ITraitInfo, Requires<RenderSpritesInfo>
|
||||
public class AutoSelectionSizeInfo : ITraitInfo, Requires<RenderSpritesInfo>, IAutoSelectionSizeInfo
|
||||
{
|
||||
public object Create(ActorInitializer init) { return new AutoSelectionSize(this); }
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ using OpenRA.Traits;
|
||||
namespace OpenRA.Mods.Common.Traits.Render
|
||||
{
|
||||
[Desc("Also returns a default selection size that is calculated automatically from the voxel dimensions.")]
|
||||
public class WithVoxelBodyInfo : ConditionalTraitInfo, IRenderActorPreviewVoxelsInfo, Requires<RenderVoxelsInfo>
|
||||
public class WithVoxelBodyInfo : ConditionalTraitInfo, IRenderActorPreviewVoxelsInfo, Requires<RenderVoxelsInfo>, IAutoSelectionSizeInfo
|
||||
{
|
||||
public readonly string Sequence = "idle";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user