Don't enforce beacons to be player palettes.

This commit is contained in:
Matthias Mailänder
2016-04-24 23:44:15 +02:00
parent 9f4cdb9843
commit 59fbfbc851
7 changed files with 25 additions and 15 deletions

View File

@@ -20,8 +20,8 @@ namespace OpenRA.Mods.Common.Traits
public readonly string NotificationType = "Sounds";
public readonly string Notification = "Beacon";
[PaletteReference(true)]
public readonly string PalettePrefix = "player";
public readonly bool IsPlayerPalette = true;
[PaletteReference("IsPlayerPalette")] public readonly string Palette = "player";
public readonly string BeaconImage = "beacon";
[SequenceReference("BeaconImage")] public readonly string ArrowSequence = "arrow";
@@ -56,7 +56,8 @@ namespace OpenRA.Mods.Common.Traits
if (playerBeacon != null)
self.World.Remove(playerBeacon);
playerBeacon = new Beacon(self.Owner, pos, info.Duration, info.PalettePrefix, info.BeaconImage, info.ArrowSequence, info.CircleSequence);
playerBeacon = new Beacon(self.Owner, pos, info.Duration, info.Palette, info.IsPlayerPalette, info.BeaconImage, info.ArrowSequence, info.CircleSequence);
self.World.Add(playerBeacon);
if (self.Owner.IsAlliedWith(self.World.RenderPlayer))

View File

@@ -169,7 +169,8 @@ namespace OpenRA.Mods.Common.Traits
beacon = new Beacon(
self.Owner,
target - new WVec(0, 0, altitude),
Info.BeaconPalettePrefix,
Info.BeaconPaletteIsPlayerPalette,
Info.BeaconPalette,
Info.BeaconImage,
Info.BeaconPoster,
Info.BeaconPosterPalette,

View File

@@ -134,7 +134,8 @@ namespace OpenRA.Mods.Common.Traits
var beacon = new Beacon(
order.Player,
targetPosition,
Info.BeaconPalettePrefix,
Info.BeaconPaletteIsPlayerPalette,
Info.BeaconPalette,
Info.BeaconImage,
Info.BeaconPoster,
Info.BeaconPosterPalette,

View File

@@ -45,7 +45,10 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Beacons are only supported on the Airstrike and Nuke powers")]
public readonly bool DisplayBeacon = false;
[PaletteReference(true)] public readonly string BeaconPalettePrefix = "player";
public readonly bool BeaconPaletteIsPlayerPalette = true;
[PaletteReference("BeaconPaletteIsPlayerPalette")] public readonly string BeaconPalette = "player";
public readonly string BeaconImage = "beacon";
[SequenceReference("BeaconImage")] public readonly string BeaconPoster = null;
[PaletteReference] public readonly string BeaconPosterPalette = "chrome";