Merge pull request #10778 from Mailaender/test-nuke-sprites

Exposed nuke missile sprites to lint testing
This commit is contained in:
Oliver Brakmann
2016-03-05 21:52:20 +01:00
2 changed files with 15 additions and 7 deletions

View File

@@ -21,12 +21,17 @@ namespace OpenRA.Mods.Common.Traits
{
class NukePowerInfo : SupportPowerInfo, IRulesetLoaded, Requires<BodyOrientationInfo>
{
[WeaponReference]
[WeaponReference, FieldLoader.Require]
[Desc("Weapon to use for the impact.",
"But also image to use for the missile.",
"Requires an 'up' and a 'down' sequence on the image.")]
"Also image to use for the missile.")]
public readonly string MissileWeapon = "";
[Desc("Sprite sequence for the ascending missile.")]
[SequenceReference("MissileWeapon")] public readonly string MissileUp = "up";
[Desc("Sprite sequence for the descending missile.")]
[SequenceReference("MissileWeapon")] public readonly string MissileDown = "down";
[Desc("Offset from the actor the missile spawns on.")]
public readonly WVec SpawnOffset = WVec.Zero;
@@ -55,6 +60,7 @@ 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;
[SequenceReference]
@@ -95,7 +101,7 @@ namespace OpenRA.Mods.Common.Traits
}
var targetPosition = self.World.Map.CenterOfCell(order.TargetLocation);
var missile = new NukeLaunch(self.Owner, info.MissileWeapon, info.WeaponInfo, info.MissilePalette,
var missile = new NukeLaunch(self.Owner, info.MissileWeapon, info.WeaponInfo, info.MissilePalette, info.MissileUp, info.MissileDown,
self.CenterPosition + body.LocalToWorld(info.SpawnOffset),
targetPosition,
info.FlightVelocity, info.FlightDelay, info.SkipAscent,