Reimplement Ion Cannon and cnc nuke. Disable ra shellmap nukes.
This commit is contained in:
@@ -23,31 +23,13 @@ namespace OpenRA.Mods.Cnc
|
|||||||
class IonCannonPower : SupportPower
|
class IonCannonPower : SupportPower
|
||||||
{
|
{
|
||||||
public IonCannonPower(Actor self, IonCannonPowerInfo info) : base(self, info) { }
|
public IonCannonPower(Actor self, IonCannonPowerInfo info) : base(self, info) { }
|
||||||
/*
|
public override void Activate(Actor self, Order order)
|
||||||
public void ResolveOrder(Actor self, Order order)
|
|
||||||
{
|
{
|
||||||
if (!IsReady) return;
|
self.World.AddFrameEndTask(w =>
|
||||||
|
|
||||||
if (order.OrderString == "IonCannon")
|
|
||||||
{
|
{
|
||||||
Owner.World.AddFrameEndTask(w =>
|
Sound.Play(Info.LaunchSound, Game.CellSize * order.TargetLocation.ToFloat2());
|
||||||
{
|
w.Add(new IonCannon(self, w, order.TargetLocation));
|
||||||
Sound.Play(Info.LaunchSound, Game.CellSize * order.TargetLocation.ToFloat2());
|
});
|
||||||
w.Add(new IonCannon(self, w, order.TargetLocation));
|
|
||||||
});
|
|
||||||
|
|
||||||
FinishActivate();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnActivate()
|
|
||||||
{
|
|
||||||
Self.World.OrderGenerator =
|
|
||||||
new GenericSelectTargetWithBuilding<IonControl>(Owner.PlayerActor, "IonCannon", "ability");
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class IonControlInfo : TraitInfo<IonControl> { }
|
|
||||||
class IonControl { }
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,14 +51,15 @@ namespace OpenRA.Mods.RA
|
|||||||
Pair.New(Actors["ca2"], new int2(92, 71))
|
Pair.New(Actors["ca2"], new int2(92, 71))
|
||||||
}, Actors["pdox"], -1, false);
|
}, Actors["pdox"], -1, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
if (ticks == 100)
|
if (ticks == 100)
|
||||||
Actors["mslo1"].Trait<NukeSilo>().Attack(new int2(98, 52));
|
Actors["mslo1"].Trait<NukeSilo>().Attack(new int2(98, 52));
|
||||||
if (ticks == 140)
|
if (ticks == 140)
|
||||||
Actors["mslo2"].Trait<NukeSilo>().Attack(new int2(95, 54));
|
Actors["mslo2"].Trait<NukeSilo>().Attack(new int2(95, 54));
|
||||||
if (ticks == 180)
|
if (ticks == 180)
|
||||||
Actors["mslo3"].Trait<NukeSilo>().Attack(new int2(95, 49));
|
Actors["mslo3"].Trait<NukeSilo>().Attack(new int2(95, 49));
|
||||||
|
*/
|
||||||
if (ticks == 430)
|
if (ticks == 430)
|
||||||
{
|
{
|
||||||
Actors["mig1"].Trait<AttackPlane>().AttackTarget(Target.FromActor(Actors["greeceweap"]), false, true);
|
Actors["mig1"].Trait<AttackPlane>().AttackTarget(Target.FromActor(Actors["greeceweap"]), false, true);
|
||||||
|
|||||||
@@ -18,72 +18,32 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
class NukePowerInfo : SupportPowerInfo
|
class NukePowerInfo : SupportPowerInfo
|
||||||
{
|
{
|
||||||
|
[WeaponReference]
|
||||||
|
public readonly string MissileWeapon = "";
|
||||||
|
public readonly int2 SpawnOffset = int2.Zero;
|
||||||
|
|
||||||
public override object Create(ActorInitializer init) { return new NukePower(init.self, this); }
|
public override object Create(ActorInitializer init) { return new NukePower(init.self, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class NukePower : SupportPower
|
class NukePower : SupportPower
|
||||||
{
|
{
|
||||||
public NukePower(Actor self, NukePowerInfo info) : base(self, info) { }
|
public NukePower(Actor self, NukePowerInfo info) : base(self, info) { }
|
||||||
/*
|
public override IOrderGenerator OrderGenerator(string order, SupportPowerManager manager)
|
||||||
protected override void OnActivate()
|
|
||||||
{
|
{
|
||||||
Self.World.OrderGenerator =
|
Sound.PlayToPlayer(manager.self.Owner, Info.SelectTargetSound);
|
||||||
new GenericSelectTargetWithBuilding<NukeSilo>(Owner.PlayerActor, "NuclearMissile", "nuke");
|
return new SelectGenericPowerTarget(order, manager, "nuke", MouseButton.Left);
|
||||||
}
|
|
||||||
|
|
||||||
public void ResolveOrder(Actor self, Order order)
|
|
||||||
{
|
|
||||||
if (!IsReady) return;
|
|
||||||
|
|
||||||
if (order.OrderString == "NuclearMissile")
|
|
||||||
{
|
|
||||||
var silo = self.World.Queries.OwnedBy[self.Owner]
|
|
||||||
.Where(a => a.HasTrait<NukeSilo>())
|
|
||||||
.FirstOrDefault();
|
|
||||||
if (silo != null)
|
|
||||||
silo.Trait<RenderBuilding>().PlayCustomAnim(silo, "active");
|
|
||||||
|
|
||||||
// Play to everyone but the current player
|
|
||||||
if (Owner != Owner.World.LocalPlayer)
|
|
||||||
Sound.Play(Info.LaunchSound);
|
|
||||||
|
|
||||||
silo.Trait<NukeSilo>().Attack(order.TargetLocation);
|
|
||||||
|
|
||||||
FinishActivate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
// tag trait for the building
|
|
||||||
class NukeSiloInfo : ITraitInfo
|
|
||||||
{
|
|
||||||
[WeaponReference]
|
|
||||||
public readonly string MissileWeapon = "";
|
|
||||||
public readonly int2 SpawnOffset = int2.Zero;
|
|
||||||
|
|
||||||
public object Create(ActorInitializer init) { return new NukeSilo(init.self, this); }
|
|
||||||
}
|
|
||||||
|
|
||||||
class NukeSilo
|
|
||||||
{
|
|
||||||
Actor self;
|
|
||||||
NukeSiloInfo info;
|
|
||||||
|
|
||||||
public NukeSilo(Actor self, NukeSiloInfo info)
|
|
||||||
{
|
|
||||||
this.self = self;
|
|
||||||
this.info = info;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Attack(int2 targetLocation)
|
public override void Activate(Actor self, Order order)
|
||||||
{
|
{
|
||||||
self.Trait<RenderBuilding>().PlayCustomAnim(self, "active");
|
// Play to everyone but the current player
|
||||||
|
if (self.Owner != self.World.LocalPlayer)
|
||||||
|
Sound.Play(Info.LaunchSound);
|
||||||
|
|
||||||
|
self.Trait<RenderBuilding>().PlayCustomAnim(self, "active");
|
||||||
self.World.AddFrameEndTask(w =>
|
self.World.AddFrameEndTask(w =>
|
||||||
{
|
{
|
||||||
//FIRE ZE MISSILES
|
w.Add(new NukeLaunch(self, (Info as NukePowerInfo).MissileWeapon, (Info as NukePowerInfo).SpawnOffset, order.TargetLocation));
|
||||||
w.Add(new NukeLaunch(self, info.MissileWeapon, info.SpawnOffset, targetLocation));
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,15 +33,6 @@ FACT:
|
|||||||
BuildSpeed: .4
|
BuildSpeed: .4
|
||||||
LowPowerSlowdown: 3
|
LowPowerSlowdown: 3
|
||||||
BaseBuilding:
|
BaseBuilding:
|
||||||
AirstrikePower:
|
|
||||||
Image: bombicnh
|
|
||||||
ChargeTime: 10
|
|
||||||
Description: Airstrike
|
|
||||||
LongDesc: Delivers a load of napalm on your target.
|
|
||||||
EndChargeSound: airredy1.aud
|
|
||||||
SelectTargetSound: select1.aud
|
|
||||||
UnitType: a10
|
|
||||||
# AllowMultiple: true
|
|
||||||
|
|
||||||
NUKE:
|
NUKE:
|
||||||
Inherits: ^Building
|
Inherits: ^Building
|
||||||
@@ -174,6 +165,7 @@ PYLE:
|
|||||||
Type: Infantry
|
Type: Infantry
|
||||||
BuildSpeed: .4
|
BuildSpeed: .4
|
||||||
LowPowerSlowdown: 3
|
LowPowerSlowdown: 3
|
||||||
|
|
||||||
HAND:
|
HAND:
|
||||||
Inherits: ^Building
|
Inherits: ^Building
|
||||||
Valued:
|
Valued:
|
||||||
@@ -207,6 +199,7 @@ HAND:
|
|||||||
Type: Infantry
|
Type: Infantry
|
||||||
BuildSpeed: .4
|
BuildSpeed: .4
|
||||||
LowPowerSlowdown: 3
|
LowPowerSlowdown: 3
|
||||||
|
|
||||||
AFLD:
|
AFLD:
|
||||||
Inherits: ^Building
|
Inherits: ^Building
|
||||||
Valued:
|
Valued:
|
||||||
@@ -312,6 +305,16 @@ HQ:
|
|||||||
RenderDetectionCircle:
|
RenderDetectionCircle:
|
||||||
DetectCloaked:
|
DetectCloaked:
|
||||||
Range: 8
|
Range: 8
|
||||||
|
AirstrikePower:
|
||||||
|
Image: bombicnh
|
||||||
|
# ChargeTime: 240
|
||||||
|
ChargeTime: 10
|
||||||
|
Description: Airstrike
|
||||||
|
LongDesc: Delivers a load of napalm on your target.
|
||||||
|
EndChargeSound: airredy1.aud
|
||||||
|
SelectTargetSound: select1.aud
|
||||||
|
UnitType: a10
|
||||||
|
# AllowMultiple: true
|
||||||
|
|
||||||
NUK2:
|
NUK2:
|
||||||
Inherits: ^Building
|
Inherits: ^Building
|
||||||
@@ -427,7 +430,16 @@ EYE:
|
|||||||
RenderDetectionCircle:
|
RenderDetectionCircle:
|
||||||
DetectCloaked:
|
DetectCloaked:
|
||||||
Range: 8
|
Range: 8
|
||||||
IonControl:
|
IonCannonPower:
|
||||||
|
Image: ionicnh
|
||||||
|
# ChargeTime: 180
|
||||||
|
ChargeTime: 10
|
||||||
|
Description: Ion Cannon
|
||||||
|
LongDesc: Discharges the orbital Ion Cannon at your target.
|
||||||
|
BeginChargeSound: ionchrg1.aud
|
||||||
|
EndChargeSound: ionredy1.aud
|
||||||
|
LaunchSound: ion1.aud
|
||||||
|
SelectTargetSound: select1.aud
|
||||||
|
|
||||||
TMPL:
|
TMPL:
|
||||||
RequiresPower:
|
RequiresPower:
|
||||||
@@ -456,7 +468,16 @@ TMPL:
|
|||||||
RevealsShroud:
|
RevealsShroud:
|
||||||
Range: 6
|
Range: 6
|
||||||
Bib:
|
Bib:
|
||||||
NukeSilo:
|
NukePower:
|
||||||
|
Image: atomicnh
|
||||||
|
# ChargeTime: 300
|
||||||
|
ChargeTime: 10
|
||||||
|
Description: Atom Bomb
|
||||||
|
LongDesc: Launches a nuclear missile at a target location.
|
||||||
|
BeginChargeSound:
|
||||||
|
EndChargeSound: nukavail.aud
|
||||||
|
SelectTargetSound: select1.aud
|
||||||
|
LaunchSound: nukemisl.aud
|
||||||
MissileWeapon: atomic
|
MissileWeapon: atomic
|
||||||
|
|
||||||
OBLI:
|
OBLI:
|
||||||
|
|||||||
@@ -1,35 +1,6 @@
|
|||||||
Player:
|
Player:
|
||||||
PlaceBuilding:
|
PlaceBuilding:
|
||||||
TechTree:
|
TechTree:
|
||||||
# NukePower:
|
|
||||||
# Image: atomicnh
|
|
||||||
# ChargeTime: 5
|
|
||||||
# Description: Atom Bomb
|
|
||||||
# LongDesc: Launches a nuclear missile at a target location.
|
|
||||||
# Prerequisites: TMPL
|
|
||||||
# BeginChargeSound:
|
|
||||||
# EndChargeSound: nukavail.aud
|
|
||||||
# SelectTargetSound: select1.aud
|
|
||||||
# LaunchSound: nukemisl.aud
|
|
||||||
# IonCannonPower:
|
|
||||||
# Image: ionicnh
|
|
||||||
# ChargeTime: 3
|
|
||||||
# Description: Ion Cannon
|
|
||||||
# LongDesc: Discharges the orbital Ion Cannon at your target.
|
|
||||||
# Prerequisites: EYE
|
|
||||||
# BeginChargeSound: ionchrg1.aud
|
|
||||||
# EndChargeSound: ionredy1.aud
|
|
||||||
# LaunchSound: ion1.aud
|
|
||||||
# SelectTargetSound: select1.aud
|
|
||||||
# AirstrikePower:
|
|
||||||
# Image: bombicnh
|
|
||||||
# ChargeTime: 4
|
|
||||||
# Description: Airstrike
|
|
||||||
# LongDesc: Delivers a load of napalm on your target.
|
|
||||||
# Prerequisites: hq
|
|
||||||
# EndChargeSound: airredy1.aud
|
|
||||||
# SelectTargetSound: select1.aud
|
|
||||||
# UnitType: a10
|
|
||||||
SupportPowerManager:
|
SupportPowerManager:
|
||||||
ConquestVictoryConditions:
|
ConquestVictoryConditions:
|
||||||
PowerManager:
|
PowerManager:
|
||||||
|
|||||||
Reference in New Issue
Block a user