Expose TransformsInto* targetline colors to yaml.
This commit is contained in:
@@ -40,6 +40,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Cursor to display when unable to land at target building.")]
|
||||
public readonly string EnterBlockedCursor = "enter-blocked";
|
||||
|
||||
[Desc("Color to use for the target line for regular move orders.")]
|
||||
public readonly Color TargetLineColor = Color.Green;
|
||||
|
||||
public override object Create(ActorInitializer init) { return new TransformsIntoAircraft(init, this); }
|
||||
}
|
||||
|
||||
@@ -135,7 +138,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (!order.Queued)
|
||||
activity.NextActivity?.Cancel(self);
|
||||
|
||||
activity.Queue(new IssueOrderAfterTransform(order.OrderString, order.Target, Color.Green));
|
||||
activity.Queue(new IssueOrderAfterTransform(order.OrderString, order.Target, Info.TargetLineColor));
|
||||
|
||||
if (currentTransform == null)
|
||||
self.QueueActivity(order.Queued, activity);
|
||||
|
||||
@@ -26,6 +26,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Cursor to display when unable to enter target tunnel.")]
|
||||
public readonly string EnterBlockedCursor = "enter-blocked";
|
||||
|
||||
[Desc("Color to use for the target line while in tunnels.")]
|
||||
public readonly Color TargetLineColor = Color.Green;
|
||||
|
||||
[VoiceReference]
|
||||
public readonly string Voice = "Action";
|
||||
|
||||
@@ -98,7 +101,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (!order.Queued)
|
||||
activity.NextActivity?.Cancel(self);
|
||||
|
||||
activity.Queue(new IssueOrderAfterTransform(order.OrderString, order.Target, Color.Green));
|
||||
activity.Queue(new IssueOrderAfterTransform(order.OrderString, order.Target, Info.TargetLineColor));
|
||||
|
||||
if (currentTransform == null)
|
||||
self.QueueActivity(order.Queued, activity);
|
||||
|
||||
@@ -27,6 +27,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[VoiceReference]
|
||||
public readonly string Voice = "Action";
|
||||
|
||||
[Desc("Color to use for the target line.")]
|
||||
public readonly Color TargetLineColor = Color.Green;
|
||||
|
||||
[Desc("Require the force-move modifier to display the enter cursor.")]
|
||||
public readonly bool RequiresForceMove = false;
|
||||
|
||||
@@ -132,7 +135,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (!order.Queued)
|
||||
activity.NextActivity?.Cancel(self);
|
||||
|
||||
activity.Queue(new IssueOrderAfterTransform(order.OrderString, order.Target, Color.Green));
|
||||
activity.Queue(new IssueOrderAfterTransform(order.OrderString, order.Target, Info.TargetLineColor));
|
||||
|
||||
if (currentTransform == null)
|
||||
self.QueueActivity(order.Queued, activity);
|
||||
|
||||
@@ -28,6 +28,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[VoiceReference]
|
||||
public readonly string Voice = "Action";
|
||||
|
||||
[Desc("Color to use for the target line.")]
|
||||
public readonly Color TargetLineColor = Color.Green;
|
||||
|
||||
[Desc("Require the force-move modifier to display the enter cursor.")]
|
||||
public readonly bool RequiresForceMove = false;
|
||||
|
||||
@@ -126,7 +129,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (!order.Queued)
|
||||
activity.NextActivity?.Cancel(self);
|
||||
|
||||
activity.Queue(new IssueOrderAfterTransform(order.OrderString, order.Target, Color.Green));
|
||||
activity.Queue(new IssueOrderAfterTransform(order.OrderString, order.Target, Info.TargetLineColor));
|
||||
|
||||
if (currentTransform == null)
|
||||
self.QueueActivity(order.Queued, activity);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#endregion
|
||||
|
||||
using OpenRA.Mods.Common.Activities;
|
||||
using OpenRA.Primitives;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
@@ -44,7 +43,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (!order.Queued)
|
||||
currentTransform.NextActivity?.Cancel(self);
|
||||
|
||||
currentTransform.Queue(new IssueOrderAfterTransform("DeployTransform", order.Target, Color.Green));
|
||||
currentTransform.Queue(new IssueOrderAfterTransform("DeployTransform", order.Target));
|
||||
|
||||
self.ShowTargetLines();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user