Add trait descriptions to ResourceType.
This commit is contained in:
@@ -16,21 +16,46 @@ namespace OpenRA.Traits
|
|||||||
{
|
{
|
||||||
public class ResourceTypeInfo : ITraitInfo
|
public class ResourceTypeInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
|
[Desc("Sequence image that holds the different variants.")]
|
||||||
public readonly string Sequence = "resources";
|
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;
|
public readonly int ResourceType = 1;
|
||||||
|
|
||||||
|
[Desc("Credit value of a single resource unit.")]
|
||||||
public readonly int ValuePerUnit = 0;
|
public readonly int ValuePerUnit = 0;
|
||||||
|
|
||||||
|
[Desc("Maximum number of resource units allowed in a single cell.")]
|
||||||
public readonly int MaxDensity = 10;
|
public readonly int MaxDensity = 10;
|
||||||
|
|
||||||
|
[FieldLoader.Require]
|
||||||
|
[Desc("Resource identifier used by other traits.")]
|
||||||
public readonly string Name = null;
|
public readonly string Name = null;
|
||||||
|
|
||||||
|
[Desc("Terrain type used to determine unit movement and minimap colors.")]
|
||||||
public readonly string TerrainType = "Ore";
|
public readonly string TerrainType = "Ore";
|
||||||
|
|
||||||
|
[Desc("Terrain types that this resource can spawn on.")]
|
||||||
public readonly HashSet<string> AllowedTerrainTypes = new HashSet<string>();
|
public readonly HashSet<string> AllowedTerrainTypes = new HashSet<string>();
|
||||||
|
|
||||||
|
[Desc("Allow resource to spawn under Mobile actors.")]
|
||||||
public readonly bool AllowUnderActors = false;
|
public readonly bool AllowUnderActors = false;
|
||||||
|
|
||||||
|
[Desc("Allow resource to spawn under Buildings.")]
|
||||||
public readonly bool AllowUnderBuildings = false;
|
public readonly bool AllowUnderBuildings = false;
|
||||||
|
|
||||||
|
[Desc("Allow resource to spawn on ramp tiles.")]
|
||||||
public readonly bool AllowOnRamps = false;
|
public readonly bool AllowOnRamps = false;
|
||||||
|
|
||||||
|
[Desc("Harvester content pip color.")]
|
||||||
public PipType PipColor = PipType.Yellow;
|
public PipType PipColor = PipType.Yellow;
|
||||||
|
|
||||||
public object Create(ActorInitializer init) { return new ResourceType(this, init.World); }
|
public object Create(ActorInitializer init) { return new ResourceType(this, init.World); }
|
||||||
|
|||||||
Reference in New Issue
Block a user