Created FlashPaletteEffectWarhead and removed the hardcoded flashing from NukeLaunch

Not actually hardcoded, but there was a hard dependency in NukeLaunch on FlashPaletteEffect and explicit flashing checks.
This commit is contained in:
Pavel Penev
2020-07-09 02:58:58 +03:00
committed by abcdefg30
parent 2e7bd4de4b
commit 8c394a4cb5
9 changed files with 105 additions and 12 deletions

View File

@@ -99,9 +99,6 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Amount of time after detonation to remove the camera.")]
public readonly int CameraRemoveDelay = 25;
[Desc("Corresponds to `Type` from `FlashPaletteEffect` on the world actor.")]
public readonly string FlashType = null;
public WeaponInfo WeaponInfo { get; private set; }
public override object Create(ActorInitializer init) { return new NukePower(init.Self, this); }
@@ -156,7 +153,6 @@ namespace OpenRA.Mods.Common.Traits
launchPos,
targetPosition, info.DetonationAltitude, info.RemoveMissileOnDetonation,
info.FlightVelocity, info.MissileDelay, info.FlightDelay, skipAscent,
info.FlashType,
info.TrailImage, info.TrailSequences, info.TrailPalette, info.TrailUsePlayerPalette, info.TrailDelay, info.TrailInterval);
self.World.AddFrameEndTask(w => w.Add(missile));