Add a camera to the nuke.
This commit is contained in:
@@ -32,6 +32,16 @@ namespace OpenRA.Mods.RA
|
|||||||
[Desc("Descend immediately on the target, with half the FlightDelay")]
|
[Desc("Descend immediately on the target, with half the FlightDelay")]
|
||||||
public readonly bool SkipAscent = false;
|
public readonly bool SkipAscent = false;
|
||||||
|
|
||||||
|
[ActorReference]
|
||||||
|
[Desc("Actor to spawn before detonation")]
|
||||||
|
public readonly string CameraActor = null;
|
||||||
|
|
||||||
|
[Desc("Amount of time before detonation to spawn the camera")]
|
||||||
|
public readonly int CameraSpawnAdvance = 25;
|
||||||
|
|
||||||
|
[Desc("Amount of time after detonation to remove the camera")]
|
||||||
|
public readonly int CameraRemoveDelay = 25;
|
||||||
|
|
||||||
public override object Create(ActorInitializer init) { return new NukePower(init.self, this); }
|
public override object Create(ActorInitializer init) { return new NukePower(init.self, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,6 +78,21 @@ namespace OpenRA.Mods.RA
|
|||||||
self.CenterPosition + body.LocalToWorld(npi.SpawnOffset),
|
self.CenterPosition + body.LocalToWorld(npi.SpawnOffset),
|
||||||
order.TargetLocation.CenterPosition,
|
order.TargetLocation.CenterPosition,
|
||||||
npi.FlightVelocity, npi.FlightDelay, npi.SkipAscent)));
|
npi.FlightVelocity, npi.FlightDelay, npi.SkipAscent)));
|
||||||
|
|
||||||
|
if (npi.CameraActor != null)
|
||||||
|
{
|
||||||
|
var camera = self.World.CreateActor(false, npi.CameraActor, new TypeDictionary
|
||||||
|
{
|
||||||
|
new LocationInit(order.TargetLocation),
|
||||||
|
new OwnerInit(self.Owner),
|
||||||
|
});
|
||||||
|
|
||||||
|
camera.QueueActivity(new Wait(npi.CameraSpawnAdvance + npi.CameraRemoveDelay));
|
||||||
|
camera.QueueActivity(new RemoveSelf());
|
||||||
|
|
||||||
|
Action addCamera = () => self.World.AddFrameEndTask(w => w.Add(camera));
|
||||||
|
self.World.AddFrameEndTask(w => w.Add(new DelayedAction(npi.FlightDelay - npi.CameraSpawnAdvance, addCamera)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -499,6 +499,7 @@ TMPL:
|
|||||||
DisplayBeacon: True
|
DisplayBeacon: True
|
||||||
BeaconPoster: atomic
|
BeaconPoster: atomic
|
||||||
DisplayRadarPing: True
|
DisplayRadarPing: True
|
||||||
|
CameraActor: camera
|
||||||
SupportPowerChargeBar:
|
SupportPowerChargeBar:
|
||||||
|
|
||||||
GUN:
|
GUN:
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ PALACEH:
|
|||||||
SpawnOffset: -512,1c171,0
|
SpawnOffset: -512,1c171,0
|
||||||
DisplayBeacon: True
|
DisplayBeacon: True
|
||||||
DisplayRadarPing: True
|
DisplayRadarPing: True
|
||||||
|
CameraActor: camera
|
||||||
CanPowerDown:
|
CanPowerDown:
|
||||||
DisabledOverlay:
|
DisabledOverlay:
|
||||||
RequiresPower:
|
RequiresPower:
|
||||||
|
|||||||
@@ -115,3 +115,11 @@ SPICEBLOOM:
|
|||||||
Terrain: Spice
|
Terrain: Spice
|
||||||
BodyOrientation:
|
BodyOrientation:
|
||||||
|
|
||||||
|
CAMERA:
|
||||||
|
Immobile:
|
||||||
|
OccupiesSpace: false
|
||||||
|
Health:
|
||||||
|
HP: 1000
|
||||||
|
RevealsShroud:
|
||||||
|
Range: 8c0
|
||||||
|
BodyOrientation:
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ MSLO:
|
|||||||
DisplayBeacon: True
|
DisplayBeacon: True
|
||||||
DisplayRadarPing: True
|
DisplayRadarPing: True
|
||||||
BeaconPoster: atomicon
|
BeaconPoster: atomicon
|
||||||
|
CameraActor: camera
|
||||||
CanPowerDown:
|
CanPowerDown:
|
||||||
RequiresPower:
|
RequiresPower:
|
||||||
DisabledOverlay:
|
DisabledOverlay:
|
||||||
|
|||||||
Reference in New Issue
Block a user