Expose targetline colors to yaml.
All targetlines can now be set to a custom color in yaml or set to be invisible. All automated behaviours including scripted activities now have no visible target lines.
This commit is contained in:
@@ -35,7 +35,8 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
if (targetManager == null || !targetManager.CanBeTargetedBy(target, Self, captureManager))
|
||||
throw new LuaException("Actor '{0}' cannot capture actor '{1}'!".F(Self, target));
|
||||
|
||||
Self.QueueActivity(new CaptureActor(Self, Target.FromActor(target)));
|
||||
// NB: Scripted actions get no visible targetlines.
|
||||
Self.QueueActivity(new CaptureActor(Self, Target.FromActor(target), null));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,9 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
public void DeliverCash(Actor target)
|
||||
{
|
||||
var t = Target.FromActor(target);
|
||||
Self.QueueActivity(new DonateCash(Self, t, info.Payload, info.PlayerExperience));
|
||||
|
||||
// NB: Scripted actions get no visible targetlines.
|
||||
Self.QueueActivity(new DonateCash(Self, t, info.Payload, info.PlayerExperience, null));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,9 +64,10 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
return;
|
||||
|
||||
var level = gainsExperience.Level;
|
||||
|
||||
var t = Target.FromActor(target);
|
||||
Self.QueueActivity(new DonateExperience(Self, t, level, deliversExperience.PlayerExperience));
|
||||
|
||||
// NB: Scripted actions get no visible targetlines.
|
||||
Self.QueueActivity(new DonateExperience(Self, t, level, deliversExperience.PlayerExperience, null));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,8 +31,9 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
[Desc("Demolish the target actor.")]
|
||||
public void Demolish(Actor target)
|
||||
{
|
||||
// NB: Scripted actions get no visible targetlines.
|
||||
Self.QueueActivity(new Demolish(Self, Target.FromActor(target), info.EnterBehaviour, info.DetonationDelay,
|
||||
info.Flashes, info.FlashesDelay, info.FlashInterval, info.DamageTypes));
|
||||
info.Flashes, info.FlashesDelay, info.FlashInterval, info.DamageTypes, null));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
[Desc("Move to and enter the transport.")]
|
||||
public void EnterTransport(Actor transport)
|
||||
{
|
||||
Self.QueueActivity(new RideTransport(Self, Target.FromActor(transport)));
|
||||
Self.QueueActivity(new RideTransport(Self, Target.FromActor(transport), null));
|
||||
}
|
||||
|
||||
[Desc("Whether the actor can move (false if immobilized).")]
|
||||
|
||||
Reference in New Issue
Block a user