diff --git a/OpenRA.Game/Traits/World/ResourceType.cs b/OpenRA.Game/Traits/World/ResourceType.cs index 2fc3ebd8c2..9618e02e29 100644 --- a/OpenRA.Game/Traits/World/ResourceType.cs +++ b/OpenRA.Game/Traits/World/ResourceType.cs @@ -16,21 +16,46 @@ namespace OpenRA.Traits { public class ResourceTypeInfo : ITraitInfo { + [Desc("Sequence image that holds the different variants.")] public readonly string Sequence = "resources"; - [SequenceReference("Sequence")] public readonly string[] Variants = { }; - [PaletteReference] public readonly string Palette = TileSet.TerrainPaletteInternalName; + + [SequenceReference("Sequence")] + [Desc("Randomly chosen image sequences.")] + public readonly string[] Variants = { }; + + [PaletteReference] + [Desc("Palette used for rendering the resource sprites.")] + public readonly string Palette = TileSet.TerrainPaletteInternalName; + + [Desc("Resource index used in the binary map data.")] public readonly int ResourceType = 1; + [Desc("Credit value of a single resource unit.")] public readonly int ValuePerUnit = 0; + + [Desc("Maximum number of resource units allowed in a single cell.")] public readonly int MaxDensity = 10; + + [FieldLoader.Require] + [Desc("Resource identifier used by other traits.")] public readonly string Name = null; + + [Desc("Terrain type used to determine unit movement and minimap colors.")] public readonly string TerrainType = "Ore"; + [Desc("Terrain types that this resource can spawn on.")] public readonly HashSet AllowedTerrainTypes = new HashSet(); + + [Desc("Allow resource to spawn under Mobile actors.")] public readonly bool AllowUnderActors = false; + + [Desc("Allow resource to spawn under Buildings.")] public readonly bool AllowUnderBuildings = false; + + [Desc("Allow resource to spawn on ramp tiles.")] public readonly bool AllowOnRamps = false; + [Desc("Harvester content pip color.")] public PipType PipColor = PipType.Yellow; public object Create(ActorInitializer init) { return new ResourceType(this, init.World); }