Merge pull request #8228 from Mailaender/render-trait-doc

Added render trait documentation
This commit is contained in:
Pavel Penev
2015-05-24 14:41:44 +03:00
8 changed files with 8 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Render trait for stationary objects that can be placed from the build palette.")]
public class RenderBuildingInfo : RenderSimpleInfo, Requires<BuildingInfo>, IPlaceBuildingDecoration
{
public readonly bool PauseOnLowPower = false;

View File

@@ -15,6 +15,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Render trait for buildings that change the sprite according to the remaining resource storage capacity across all depots.")]
class RenderBuildingSiloInfo : RenderBuildingInfo
{
public override object Create(ActorInitializer init) { return new RenderBuildingSilo(init, this); }

View File

@@ -16,6 +16,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Render trait for actors that change sprites if neighbors with the same trait are present.")]
class RenderBuildingWallInfo : RenderBuildingInfo
{
public readonly string Type = "wall";

View File

@@ -17,7 +17,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
class RenderDetectionCircleInfo : ITraitInfo
class RenderDetectionCircleInfo : ITraitInfo, Requires<DetectCloakedInfo>
{
public object Create(ActorInitializer init) { return new RenderDetectionCircle(init.Self); }
}

View File

@@ -16,6 +16,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Basic render trait for immobile actors.")]
public class RenderSimpleInfo : RenderSpritesInfo, IRenderActorPreviewSpritesInfo, IQuantizeBodyOrientationInfo, Requires<IBodyOrientationInfo>
{
public readonly string Sequence = "idle";

View File

@@ -23,6 +23,7 @@ namespace OpenRA.Mods.Common.Traits
IEnumerable<IActorPreview> RenderPreviewSprites(ActorPreviewInitializer init, RenderSpritesInfo rs, string image, int facings, PaletteReference p);
}
[Desc("Render trait fundament that won't work without additional With* render traits.")]
public class RenderSpritesInfo : IRenderActorPreviewInfo, ITraitInfo, ILegacyEditorRenderInfo
{
[Desc("The sequence name that defines the actor sprites. Defaults to the actor name.")]

View File

@@ -13,6 +13,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Render trait for non-animated actors that have sprites facing into each direction.")]
public class RenderUnitInfo : RenderSimpleInfo, Requires<IFacingInfo>
{
public override object Create(ActorInitializer init) { return new RenderUnit(init, this); }

View File

@@ -17,6 +17,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Replaces the sprite during construction.")]
public class WithMakeAnimationInfo : ITraitInfo, Requires<BuildingInfo>, Requires<RenderBuildingInfo>
{
[Desc("Sequence name to use")]