Don't expose palettes and sprites to Lua.

This commit is contained in:
Matthias Mailänder
2016-04-24 23:37:56 +02:00
parent 4e9a48d253
commit 6a9b8e81f4

View File

@@ -27,10 +27,10 @@ namespace OpenRA.Mods.Common.Scripting
[Desc("Creates a new beacon that stays for the specified time at the specified WPos. " +
"Does not remove player set beacons, nor gets removed by placing them.")]
public Beacon New(Player owner, WPos position, int duration = 30 * 25, bool showRadarPings = true,
string palette = "player", bool isPlayerPalette = true, string beaconCollection = "beacon", string arrowSequence = "arrow", string circleSequence = "circle")
public Beacon New(Player owner, WPos position, int duration = 30 * 25, bool showRadarPings = true)
{
var playerBeacon = new Beacon(owner, position, duration, palette, isPlayerPalette, beaconCollection, arrowSequence, circleSequence);
var beacon = owner.PlayerActor.Info.TraitInfo<PlaceBeaconInfo>();
var playerBeacon = new Beacon(owner, position, duration, beacon.Palette, beacon.IsPlayerPalette, beacon.BeaconImage, beacon.ArrowSequence, beacon.CircleSequence);
owner.PlayerActor.World.AddFrameEndTask(w => w.Add(playerBeacon));
if (showRadarPings && radarPings != null)