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:
tovl
2020-08-02 22:22:39 +02:00
committed by Paul Chote
parent ea3c7a3c34
commit 84eb3c54ef
41 changed files with 139 additions and 58 deletions

View File

@@ -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));
}
}
}