document various traits
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
namespace OpenRA.Traits
|
namespace OpenRA.Traits
|
||||||
{
|
{
|
||||||
|
[Desc("Used to define weapon efficiency modifiers with different percentages per Type.")]
|
||||||
public class ArmorInfo : TraitInfo<Armor>
|
public class ArmorInfo : TraitInfo<Armor>
|
||||||
{
|
{
|
||||||
public readonly string Type = null;
|
public readonly string Type = null;
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Common.Power
|
namespace OpenRA.Mods.Common.Power
|
||||||
{
|
{
|
||||||
|
[Desc("Disables the actor when a power outage is triggered (see `InfiltrateForPowerOutage` for more information).")]
|
||||||
public class AffectedByPowerOutageInfo : ITraitInfo
|
public class AffectedByPowerOutageInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
public object Create(ActorInitializer init) { return new AffectedByPowerOutage(init.self); }
|
public object Create(ActorInitializer init) { return new AffectedByPowerOutage(init.self); }
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Common.Power
|
namespace OpenRA.Mods.Common.Power
|
||||||
{
|
{
|
||||||
|
[Desc("Needs power to operate.")]
|
||||||
class RequiresPowerInfo : ITraitInfo
|
class RequiresPowerInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
public object Create(ActorInitializer init) { return new RequiresPower(init.self); }
|
public object Create(ActorInitializer init) { return new RequiresPower(init.self); }
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Common
|
namespace OpenRA.Mods.Common
|
||||||
{
|
{
|
||||||
|
[Desc("Spawns the initial units for each player upon game start.")]
|
||||||
public class SpawnMapActorsInfo : TraitInfo<SpawnMapActors> { }
|
public class SpawnMapActorsInfo : TraitInfo<SpawnMapActors> { }
|
||||||
|
|
||||||
public class SpawnMapActors : IWorldLoaded
|
public class SpawnMapActors : IWorldLoaded
|
||||||
@@ -40,5 +41,5 @@ namespace OpenRA.Mods.Common
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SkipMakeAnimsInit : IActorInit {}
|
public class SkipMakeAnimsInit : IActorInit { }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Common
|
namespace OpenRA.Mods.Common
|
||||||
{
|
{
|
||||||
|
[Desc("Attach this to a unit to enable dynamic upgrades by warheads, experience, crates, support powers, etc.")]
|
||||||
public class UpgradeManagerInfo : ITraitInfo
|
public class UpgradeManagerInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
public object Create(ActorInitializer init) { return new UpgradeManager(init); }
|
public object Create(ActorInitializer init) { return new UpgradeManager(init); }
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ namespace OpenRA.Mods.RA.Activities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Desc("Can be targeted by the Hunt activity.")]
|
||||||
public class HuntableInfo : TraitInfo<Huntable> { }
|
public class HuntableInfo : TraitInfo<Huntable> { }
|
||||||
public class Huntable { }
|
public class Huntable { }
|
||||||
}
|
}
|
||||||
@@ -14,6 +14,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
|
[Desc("Provides access to the attack-move command, which will make the actor automatically engage viable targets while moving to the destination.")]
|
||||||
class AttackMoveInfo : ITraitInfo
|
class AttackMoveInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
public object Create(ActorInitializer init) { return new AttackMove(init.self, this); }
|
public object Create(ActorInitializer init) { return new AttackMove(init.self, this); }
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
|
[Desc("Allows bridges to be targeted for demolition and repair.")]
|
||||||
class BridgeHutInfo : IDemolishableInfo, ITraitInfo
|
class BridgeHutInfo : IDemolishableInfo, ITraitInfo
|
||||||
{
|
{
|
||||||
public bool IsValidTarget(ActorInfo actorInfo, Actor saboteur) { return false; } // TODO: bridges don't support frozen under fog
|
public bool IsValidTarget(ActorInfo actorInfo, Actor saboteur) { return false; } // TODO: bridges don't support frozen under fog
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA.Buildings
|
namespace OpenRA.Mods.RA.Buildings
|
||||||
{
|
{
|
||||||
|
[Desc("Limits the zone where buildings can be constructed to a radius around this actor.")]
|
||||||
public class BaseProviderInfo : ITraitInfo
|
public class BaseProviderInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
public readonly int Range = 10;
|
public readonly int Range = 10;
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
|
[Desc("Can be teleported via Chronoshift power.")]
|
||||||
public class ChronoshiftableInfo : ITraitInfo
|
public class ChronoshiftableInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
public readonly bool ExplodeInstead = false;
|
public readonly bool ExplodeInstead = false;
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ using OpenRA.Mods.RA.Effects;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
|
[Desc("Displays fireports, muzzle offsets, and hit areas in developer mode.")]
|
||||||
public class CombatDebugOverlayInfo : ITraitInfo
|
public class CombatDebugOverlayInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
public object Create(ActorInitializer init) { return new CombatDebugOverlay(init.self); }
|
public object Create(ActorInitializer init) { return new CombatDebugOverlay(init.self); }
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ namespace OpenRA.Mods.RA
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Desc("Provides access to the disguise command, which makes the actor appear to be another player's actor.")]
|
||||||
class DisguiseInfo : TraitInfo<Disguise> { }
|
class DisguiseInfo : TraitInfo<Disguise> { }
|
||||||
|
|
||||||
class Disguise : IEffectiveOwner, IIssueOrder, IResolveOrder, IOrderVoice, IRadarColorModifier, INotifyAttack
|
class Disguise : IEffectiveOwner, IIssueOrder, IResolveOrder, IOrderVoice, IRadarColorModifier, INotifyAttack
|
||||||
@@ -135,6 +136,7 @@ namespace OpenRA.Mods.RA
|
|||||||
public void Attacking(Actor self, Target target, Armament a, Barrel barrel) { DisguiseAs(self, null); }
|
public void Attacking(Actor self, Target target, Armament a, Barrel barrel) { DisguiseAs(self, null); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Desc("Allows automatic targeting of disguised actors.")]
|
||||||
class IgnoresDisguiseInfo : TraitInfo<IgnoresDisguise> { }
|
class IgnoresDisguiseInfo : TraitInfo<IgnoresDisguise> { }
|
||||||
class IgnoresDisguise { }
|
class IgnoresDisguise { }
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,8 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
class EngineerRepairInfo : TraitInfo<EngineerRepair> {}
|
[Desc("Can instantly repair other actors, but gets consumed afterwards.")]
|
||||||
|
class EngineerRepairInfo : TraitInfo<EngineerRepair> { }
|
||||||
|
|
||||||
class EngineerRepair : IIssueOrder, IResolveOrder, IOrderVoice
|
class EngineerRepair : IIssueOrder, IResolveOrder, IOrderVoice
|
||||||
{
|
{
|
||||||
@@ -116,6 +117,7 @@ namespace OpenRA.Mods.RA
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Desc("Eligible for instant repair.")]
|
||||||
class EngineerRepairableInfo : TraitInfo<EngineerRepairable> { }
|
class EngineerRepairableInfo : TraitInfo<EngineerRepairable> { }
|
||||||
|
|
||||||
class EngineerRepairable { }
|
class EngineerRepairable { }
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
|
[Desc("Spawns remains of a husk actor with the correct facing.")]
|
||||||
class HuskInfo : ITraitInfo, IOccupySpaceInfo, IFacingInfo
|
class HuskInfo : ITraitInfo, IOccupySpaceInfo, IFacingInfo
|
||||||
{
|
{
|
||||||
public readonly string[] AllowedTerrain = { };
|
public readonly string[] AllowedTerrain = { };
|
||||||
|
|||||||
@@ -12,13 +12,13 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA.Infiltration
|
namespace OpenRA.Mods.RA.Infiltration
|
||||||
{
|
{
|
||||||
|
[Desc("Steal and reset the owner's exploration.")]
|
||||||
class InfiltrateForExplorationInfo : TraitInfo<InfiltrateForExploration> { }
|
class InfiltrateForExplorationInfo : TraitInfo<InfiltrateForExploration> { }
|
||||||
|
|
||||||
class InfiltrateForExploration : INotifyInfiltrated
|
class InfiltrateForExploration : INotifyInfiltrated
|
||||||
{
|
{
|
||||||
public void Infiltrated(Actor self, Actor infiltrator)
|
public void Infiltrated(Actor self, Actor infiltrator)
|
||||||
{
|
{
|
||||||
// Steal and reset the owners exploration
|
|
||||||
infiltrator.Owner.Shroud.Explore(self.Owner.Shroud);
|
infiltrator.Owner.Shroud.Explore(self.Owner.Shroud);
|
||||||
if (!self.Owner.Shroud.HasFogVisibility())
|
if (!self.Owner.Shroud.HasFogVisibility())
|
||||||
self.Owner.Shroud.ResetExploration();
|
self.Owner.Shroud.ResetExploration();
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
|
[Desc("Spawn another actor immediately upon death.")]
|
||||||
public class LeavesHuskInfo : ITraitInfo
|
public class LeavesHuskInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
[ActorReference]
|
[ActorReference]
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA.Render
|
namespace OpenRA.Mods.RA.Render
|
||||||
{
|
{
|
||||||
|
[Desc("Invisible during games.")]
|
||||||
class RenderEditorOnlyInfo : RenderSimpleInfo
|
class RenderEditorOnlyInfo : RenderSimpleInfo
|
||||||
{
|
{
|
||||||
public override object Create(ActorInitializer init) { return new RenderEditorOnly(init.self); }
|
public override object Create(ActorInitializer init) { return new RenderEditorOnly(init.self); }
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
class RepairsBridgesInfo : TraitInfo<RepairsBridges> {}
|
[Desc("Can enter a BridgeHut to trigger a repair.")]
|
||||||
|
class RepairsBridgesInfo : TraitInfo<RepairsBridges> { }
|
||||||
|
|
||||||
class RepairsBridges : IIssueOrder, IResolveOrder, IOrderVoice
|
class RepairsBridges : IIssueOrder, IResolveOrder, IOrderVoice
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,19 +14,21 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
public class StrategicPointInfo : TraitInfo<StrategicPoint> {}
|
[Desc("Used to mark a place that needs to be in possession for StrategicVictoryConditions.")]
|
||||||
public class StrategicPoint {}
|
public class StrategicPointInfo : TraitInfo<StrategicPoint> { }
|
||||||
|
public class StrategicPoint { }
|
||||||
|
|
||||||
|
[Desc("Allows King of the Hill (KotH) style gameplay.")]
|
||||||
public class StrategicVictoryConditionsInfo : ITraitInfo, Requires<MissionObjectivesInfo>
|
public class StrategicVictoryConditionsInfo : ITraitInfo, Requires<MissionObjectivesInfo>
|
||||||
{
|
{
|
||||||
[Desc("Amount of time (in game ticks) that the player has to hold all the strategic points.")]
|
[Desc("Amount of time (in game ticks) that the player has to hold all the strategic points.", "Defaults to 5 minutes.")]
|
||||||
public readonly int TicksToHold = 25 * 60 * 5; // ~5 minutes
|
public readonly int TicksToHold = 25 * 60 * 5;
|
||||||
|
|
||||||
[Desc("Should the timer reset when the player loses hold of a strategic point.")]
|
[Desc("Should the timer reset when the player loses hold of a strategic point.")]
|
||||||
public readonly bool ResetOnHoldLost = true;
|
public readonly bool ResetOnHoldLost = true;
|
||||||
|
|
||||||
[Desc("Percentage of strategic points the player has to hold to win.")]
|
[Desc("Percentage of all strategic points the player has to hold to win.")]
|
||||||
public readonly float RatioRequired = 0.5f; // 50% required of all koth locations
|
public readonly float RatioRequired = 0.5f;
|
||||||
|
|
||||||
[Desc("Delay for the end game notification in milliseconds.")]
|
[Desc("Delay for the end game notification in milliseconds.")]
|
||||||
public int NotificationDelay = 1500;
|
public int NotificationDelay = 1500;
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA.Traits
|
namespace OpenRA.Mods.RA.Traits
|
||||||
{
|
{
|
||||||
|
[Desc("Causes aircraft husks that are spawned in the air to crash to the ground.")]
|
||||||
public class FallsToEarthInfo : ITraitInfo
|
public class FallsToEarthInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
[WeaponReference]
|
[WeaponReference]
|
||||||
|
|||||||
Reference in New Issue
Block a user