Don't enforce beacons to be player palettes.
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user