Added a bunch of TraitLocationAttributes
Also moved a few traits to their proper subfolders.
This commit is contained in:
committed by
Matthias Mailänder
parent
67598dd151
commit
f056cbba13
@@ -16,6 +16,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Cnc.Traits
|
||||
{
|
||||
[TraitLocation(SystemActors.EditorWorld)]
|
||||
class TSEditorResourceLayerInfo : EditorResourceLayerInfo, Requires<EditorActorLayerInfo>
|
||||
{
|
||||
public readonly string VeinType = "Veins";
|
||||
|
||||
@@ -18,6 +18,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Cnc.Traits
|
||||
{
|
||||
[TraitLocation(SystemActors.World)]
|
||||
class TSResourceLayerInfo : ResourceLayerInfo
|
||||
{
|
||||
public readonly string VeinType = "Veins";
|
||||
|
||||
@@ -13,9 +13,11 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Cnc.Traits
|
||||
{
|
||||
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
|
||||
[Desc("Renders the Tiberian Sun Tiberium resources.", "Attach this to the world actor")]
|
||||
public class TSTiberiumRendererInfo : ResourceRendererInfo
|
||||
{
|
||||
|
||||
@@ -19,6 +19,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Cnc.Traits
|
||||
{
|
||||
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
|
||||
[Desc("Renders the Tiberian Sun Vein resources.", "Attach this to the world actor")]
|
||||
public class TSVeinsRendererInfo : TraitInfo, Requires<IResourceLayerInfo>, IMapPreviewSignatureInfo
|
||||
{
|
||||
|
||||
@@ -15,6 +15,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Cnc.Traits
|
||||
{
|
||||
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
|
||||
public class VoxelNormalsPaletteInfo : TraitInfo
|
||||
{
|
||||
[PaletteDefinition]
|
||||
|
||||
@@ -16,6 +16,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
|
||||
public class CloakPaletteEffectInfo : TraitInfo<CloakPaletteEffect> { }
|
||||
|
||||
public class CloakPaletteEffect : IPaletteModifier, ITick
|
||||
|
||||
@@ -17,6 +17,7 @@ using OpenRA.Traits;
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("Used for day/night effects.")]
|
||||
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
|
||||
public class GlobalLightingPaletteEffectInfo : TraitInfo, ILobbyCustomRulesIgnore
|
||||
{
|
||||
[Desc("Do not modify graphics that use any palette in this list.")]
|
||||
|
||||
@@ -14,6 +14,7 @@ using OpenRA.Traits;
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("A placeholder bot that doesn't do anything.")]
|
||||
[TraitLocation(SystemActors.Player)]
|
||||
public sealed class DummyBotInfo : TraitInfo, IBotInfo
|
||||
{
|
||||
[Desc("Human-readable name this bot uses.")]
|
||||
|
||||
@@ -18,6 +18,7 @@ using OpenRA.Traits;
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("Bot that uses BotModules.")]
|
||||
[TraitLocation(SystemActors.Player)]
|
||||
public sealed class ModularBotInfo : TraitInfo, IBotInfo
|
||||
{
|
||||
[FieldLoader.Require]
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
CPos Location { get; }
|
||||
}
|
||||
|
||||
[TraitLocation(SystemActors.World)]
|
||||
class BridgeLayerInfo : TraitInfo
|
||||
{
|
||||
public override object Create(ActorInitializer init) { return new BridgeLayer(init.World); }
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("Sets a custom terrain type for cells that are obscured by back-facing cliffs.",
|
||||
"This trait replicates the default CliffBackImpassability=2 behaviour from the TS/RA2 rules.ini.")]
|
||||
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
|
||||
class CliffBackImpassabilityLayerInfo : TraitInfo
|
||||
{
|
||||
public readonly string TerrainType = "Impassable";
|
||||
|
||||
@@ -18,6 +18,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[TraitLocation(SystemActors.World)]
|
||||
[Desc("Configuration options for the lobby player color picker. Attach this to the world actor.")]
|
||||
public class ColorPickerManagerInfo : TraitInfo<ColorPickerManager>, IRulesetLoaded
|
||||
{
|
||||
|
||||
@@ -16,6 +16,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[TraitLocation(SystemActors.World)]
|
||||
public class ElevatedBridgeLayerInfo : TraitInfo, Requires<DomainIndexInfo>, ILobbyCustomRulesIgnore
|
||||
{
|
||||
[Desc("Terrain type used by cells outside any elevated bridge footprint.")]
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
[Desc("Placeholder to make static elevated bridges work.",
|
||||
"Define individual trait instances for each elevated bridge footprint in the map.")]
|
||||
[TraitLocation(SystemActors.World)]
|
||||
public class ElevatedBridgePlaceholderInfo : TraitInfo<ElevatedBridgePlaceholder>, Requires<ElevatedBridgeLayerInfo>, ILobbyCustomRulesIgnore
|
||||
{
|
||||
[FieldLoader.Require]
|
||||
|
||||
@@ -15,6 +15,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[TraitLocation(SystemActors.World)]
|
||||
public class ExitsDebugOverlayManagerInfo : TraitInfo
|
||||
{
|
||||
[Desc("The font used to draw cell vectors. Should match the value as-is in the Fonts section of the mod manifest (do not convert to lowercase).")]
|
||||
|
||||
@@ -15,6 +15,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[TraitLocation(SystemActors.World)]
|
||||
public class JumpjetActorLayerInfo : TraitInfo
|
||||
{
|
||||
[Desc("Terrain type of the airborne layer.")]
|
||||
|
||||
@@ -10,9 +10,11 @@
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
|
||||
[Desc("Used by Mobile. Required for jumpjet actors. Attach these to the world actor. You can have multiple variants by adding @suffixes.")]
|
||||
public class JumpjetLocomotorInfo : LocomotorInfo
|
||||
{
|
||||
|
||||
@@ -14,6 +14,7 @@ using OpenRA.Traits;
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("Defines the FMVs that can be played by missions.")]
|
||||
[TraitLocation(SystemActors.World)]
|
||||
public class MissionDataInfo : TraitInfo<MissionData>
|
||||
{
|
||||
[Desc("Briefing text displayed in the mission browser.")]
|
||||
|
||||
@@ -15,6 +15,7 @@ using OpenRA.Traits;
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("Controls the map difficulty, tech level, and short game lobby options.")]
|
||||
[TraitLocation(SystemActors.World)]
|
||||
public class ScriptLobbyDropdownInfo : TraitInfo, ILobbyOptions
|
||||
{
|
||||
[FieldLoader.Require]
|
||||
|
||||
@@ -15,6 +15,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[TraitLocation(SystemActors.World)]
|
||||
public class SubterraneanActorLayerInfo : TraitInfo
|
||||
{
|
||||
[Desc("Terrain type of the underground layer.")]
|
||||
|
||||
@@ -10,10 +10,12 @@
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("Used by Mobile. Required for subterranean actors. Attach these to the world actor. You can have multiple variants by adding @suffixes.")]
|
||||
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
|
||||
public class SubterraneanLocomotorInfo : LocomotorInfo
|
||||
{
|
||||
[Desc("Pathfinding cost for submerging or reemerging.")]
|
||||
|
||||
@@ -17,6 +17,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
|
||||
[Desc("Add to the world actor to apply a global lighting tint and allow actors using the TerrainLightSource to add localised lighting.")]
|
||||
public class TerrainLightingInfo : TraitInfo, ILobbyCustomRulesIgnore
|
||||
{
|
||||
@@ -15,6 +15,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[TraitLocation(SystemActors.World)]
|
||||
public class TerrainTunnelInfo : TraitInfo<TerrainTunnel>, Requires<TerrainTunnelLayerInfo>, ILobbyCustomRulesIgnore
|
||||
{
|
||||
[FieldLoader.Require]
|
||||
|
||||
@@ -16,6 +16,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[TraitLocation(SystemActors.World)]
|
||||
public class TerrainTunnelLayerInfo : TraitInfo, Requires<DomainIndexInfo>, ILobbyCustomRulesIgnore
|
||||
{
|
||||
[Desc("Terrain type used by cells outside any tunnel footprint.")]
|
||||
|
||||
@@ -18,6 +18,7 @@ using OpenRA.Traits;
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("Adds a particle-based overlay.")]
|
||||
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
|
||||
public class WeatherOverlayInfo : TraitInfo, ILobbyCustomRulesIgnore
|
||||
{
|
||||
[Desc("Average number of particles per 100x100 px square.")]
|
||||
|
||||
@@ -15,6 +15,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.D2k.Traits
|
||||
{
|
||||
[TraitLocation(SystemActors.Player)]
|
||||
[Desc("A player with this trait will receive a free harvester when his last one gets eaten by a sandworm, provided he has at least one refinery.")]
|
||||
public class HarvesterInsuranceInfo : TraitInfo
|
||||
{
|
||||
|
||||
@@ -16,6 +16,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.D2k.Traits
|
||||
{
|
||||
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
|
||||
class D2kFogPaletteInfo : TraitInfo
|
||||
{
|
||||
[PaletteDefinition]
|
||||
|
||||
@@ -17,6 +17,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.D2k.Traits
|
||||
{
|
||||
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
|
||||
[Desc("Create a palette by applying a scale and offset to the colors in another palette.")]
|
||||
class PaletteFromScaledPaletteInfo : TraitInfo
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user