add trait documentation

This commit is contained in:
Matthias Mailänder
2015-05-24 09:09:51 +02:00
parent cc34463019
commit 5b5b0c02dd
7 changed files with 7 additions and 0 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

@@ -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")]