Added some trait [Desc()]s.
This commit is contained in:
@@ -14,15 +14,20 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
[Desc("Charges up before being able to attack.")]
|
||||
class AttackChargeInfo : AttackOmniInfo
|
||||
{
|
||||
public readonly int MaxCharges = 1;
|
||||
|
||||
[Desc("Reload time (for all charges).")]
|
||||
public readonly int ReloadTime = 120;
|
||||
|
||||
[Desc("Delay for first charge. Needs to match FireDelay for Obelisk.")]
|
||||
public readonly int InitialChargeDelay = 22;
|
||||
|
||||
[Desc("Delay for additional charges if MaxCharge is larger than 1.")]
|
||||
public readonly int ChargeDelay = 3;
|
||||
|
||||
public override object Create(ActorInitializer init) { return new AttackCharge(init.self, this); }
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
[Desc("Actor will follow units until in range to attack them.")]
|
||||
public class AttackFollowInfo : AttackBaseInfo
|
||||
{
|
||||
public override object Create(ActorInitializer init) { return new AttackFollow(init.self, this); }
|
||||
|
||||
@@ -24,15 +24,16 @@ namespace OpenRA.Mods.RA
|
||||
public WAngle Cone;
|
||||
}
|
||||
|
||||
[Desc("Cargo can fire their weapons out of fire ports.")]
|
||||
public class AttackGarrisonedInfo : AttackFollowInfo, Requires<CargoInfo>
|
||||
{
|
||||
[Desc("Fire port offsets in local coordinates")]
|
||||
[Desc("Fire port offsets in local coordinates.")]
|
||||
public readonly WRange[] PortOffsets = {};
|
||||
|
||||
[Desc("Fire port yaw angles")]
|
||||
[Desc("Fire port yaw angles.")]
|
||||
public readonly WAngle[] PortYaws = {};
|
||||
|
||||
[Desc("Fire port yaw cone angle")]
|
||||
[Desc("Fire port yaw cone angle.")]
|
||||
public readonly WAngle[] PortCones = {};
|
||||
|
||||
public readonly string MuzzlePalette = "effect";
|
||||
@@ -68,13 +69,13 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
|
||||
if (info.PortOffsets.Length % 3 != 0 || info.PortOffsets.Length == 0)
|
||||
throw new InvalidOperationException("PortOffsets array length must be a multiple of three");
|
||||
throw new InvalidOperationException("PortOffsets array length must be a multiple of three.");
|
||||
|
||||
if (info.PortYaws.Length * 3 != info.PortOffsets.Length)
|
||||
throw new InvalidOperationException("PortYaws must define an angle for each port");
|
||||
throw new InvalidOperationException("PortYaws must define an angle for each port.");
|
||||
|
||||
if (info.PortCones.Length * 3 != info.PortOffsets.Length)
|
||||
throw new InvalidOperationException("PortCones must define an angle for each port");
|
||||
throw new InvalidOperationException("PortCones must define an angle for each port.");
|
||||
|
||||
var p = new List<FirePort>();
|
||||
for (var i = 0; i < info.PortOffsets.Length / 3; i++)
|
||||
|
||||
@@ -13,6 +13,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
[Desc("Dogs use this attack model.")]
|
||||
class AttackLeapInfo : AttackFrontalInfo
|
||||
{
|
||||
[Desc("Leap speed (in units/tick).")]
|
||||
|
||||
@@ -16,8 +16,10 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
[Desc("Actor's turret rises from the ground before attacking.")]
|
||||
class AttackPopupTurretedInfo : AttackTurretedInfo, Requires<BuildingInfo>, Requires<RenderBuildingInfo>
|
||||
{
|
||||
[Desc("How many game ticks should pass before closing the actor's turret.")]
|
||||
public int CloseDelay = 125;
|
||||
public int DefaultFacing = 0;
|
||||
public float ClosedDamageMultiplier = 0.5f;
|
||||
|
||||
@@ -13,6 +13,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
[Desc("Actor has a visual turret used to attack.")]
|
||||
class AttackTurretedInfo : AttackFollowInfo, Requires<TurretedInfo>
|
||||
{
|
||||
public override object Create(ActorInitializer init) { return new AttackTurreted(init.self, this); }
|
||||
|
||||
Reference in New Issue
Block a user