Add ability to use IonCannonPower via lua.
This commit is contained in:
committed by
Matthias Mailänder
parent
2387e49ee7
commit
51c207dd28
@@ -74,11 +74,16 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
{
|
||||
base.Activate(self, order, manager);
|
||||
|
||||
Activate(self, order.TargetLocation);
|
||||
}
|
||||
|
||||
public void Activate(Actor self, CPos targetLocation)
|
||||
{
|
||||
self.World.AddFrameEndTask(w =>
|
||||
{
|
||||
PlayLaunchSounds();
|
||||
Game.Sound.Play(SoundType.World, info.OnFireSound, self.World.Map.CenterOfCell(order.TargetLocation));
|
||||
w.Add(new IonCannon(self.Owner, info.WeaponInfo, w, self.CenterPosition, order.TargetLocation,
|
||||
Game.Sound.Play(SoundType.World, info.OnFireSound, self.World.Map.CenterOfCell(targetLocation));
|
||||
w.Add(new IonCannon(self.Owner, info.WeaponInfo, w, self.CenterPosition, targetLocation,
|
||||
info.Effect, info.EffectSequence, info.EffectPalette, info.WeaponDelay));
|
||||
|
||||
if (info.CameraActor == null)
|
||||
@@ -86,7 +91,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
|
||||
var camera = w.CreateActor(info.CameraActor, new TypeDictionary
|
||||
{
|
||||
new LocationInit(order.TargetLocation),
|
||||
new LocationInit(targetLocation),
|
||||
new OwnerInit(self.Owner),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user