Unhardcode beacon sprites for documentation and lint testing.
This commit is contained in:
@@ -170,8 +170,10 @@ namespace OpenRA.Mods.Common.Traits
|
||||
self.Owner,
|
||||
target - new WVec(0, 0, altitude),
|
||||
Info.BeaconPalettePrefix,
|
||||
Info.BeaconImage,
|
||||
Info.BeaconPoster,
|
||||
Info.BeaconPosterPalette,
|
||||
Info.ClockSequence,
|
||||
() => 1 - ((distanceTestActor.CenterPosition - target).HorizontalLength - info.BeaconDistanceOffset.Length) * 1f / distance);
|
||||
|
||||
w.Add(beacon);
|
||||
|
||||
@@ -135,8 +135,10 @@ namespace OpenRA.Mods.Common.Traits
|
||||
order.Player,
|
||||
targetPosition,
|
||||
Info.BeaconPalettePrefix,
|
||||
Info.BeaconImage,
|
||||
Info.BeaconPoster,
|
||||
Info.BeaconPosterPalette,
|
||||
Info.ClockSequence,
|
||||
() => missile.FractionComplete);
|
||||
|
||||
Action removeBeacon = () => self.World.AddFrameEndTask(w =>
|
||||
|
||||
@@ -45,9 +45,11 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
[Desc("Beacons are only supported on the Airstrike and Nuke powers")]
|
||||
public readonly bool DisplayBeacon = false;
|
||||
public readonly string BeaconPalettePrefix = "player";
|
||||
public readonly string BeaconPoster = null;
|
||||
[PaletteReference(true)] public readonly string BeaconPalettePrefix = "player";
|
||||
public readonly string BeaconImage = "beacon";
|
||||
[SequenceReference("BeaconImage")] public readonly string BeaconPoster = null;
|
||||
[PaletteReference] public readonly string BeaconPosterPalette = "chrome";
|
||||
[SequenceReference("BeaconImage")] public readonly string ClockSequence = "clock";
|
||||
|
||||
public readonly bool DisplayRadarPing = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user