made parabombs work
This commit is contained in:
@@ -43,7 +43,10 @@ namespace OpenRA.Effects
|
||||
altitude = args.srcAltitude;
|
||||
|
||||
anim = new Animation(info.Image);
|
||||
anim.PlayRepeating("idle");
|
||||
if (anim.HasSequence("open"))
|
||||
anim.PlayThen("open", () => anim.PlayRepeating("idle"));
|
||||
else
|
||||
anim.PlayRepeating("idle");
|
||||
}
|
||||
|
||||
public void Tick(World world)
|
||||
|
||||
@@ -45,8 +45,6 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AirstrikePower.cs" />
|
||||
<Compile Include="CarpetBomb.cs" />
|
||||
<Compile Include="CriticalBuildingState.cs" />
|
||||
<Compile Include="Effects\IonCannon.cs" />
|
||||
<Compile Include="IonCannonPower.cs" />
|
||||
|
||||
@@ -22,10 +22,11 @@ using OpenRA.Orders;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.Traits.Activities;
|
||||
|
||||
namespace OpenRA.Mods.Cnc
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
class AirstrikePowerInfo : SupportPowerInfo
|
||||
{
|
||||
public readonly string UnitType = "badr.bomber";
|
||||
public override object Create(Actor self) { return new AirstrikePower(self, this); }
|
||||
}
|
||||
|
||||
@@ -46,7 +47,7 @@ namespace OpenRA.Mods.Cnc
|
||||
|
||||
Owner.World.AddFrameEndTask(w =>
|
||||
{
|
||||
var a = w.CreateActor("a10", startPos, Owner);
|
||||
var a = w.CreateActor((Info as AirstrikePowerInfo).UnitType, startPos, Owner);
|
||||
a.traits.Get<Unit>().Facing = Util.GetFacing(order.TargetLocation - startPos, 0);
|
||||
a.traits.Get<Unit>().Altitude = a.Info.Traits.Get<PlaneInfo>().CruiseAltitude;
|
||||
a.traits.Get<CarpetBomb>().SetTarget(order.TargetLocation);
|
||||
@@ -21,7 +21,7 @@
|
||||
using OpenRA.GameRules;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Cnc
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
class CarpetBombInfo : ITraitInfo
|
||||
{
|
||||
@@ -68,6 +68,9 @@ namespace OpenRA.Mods.Cnc
|
||||
};
|
||||
|
||||
self.World.Add(args.weapon.Projectile.Create(args));
|
||||
|
||||
if (!string.IsNullOrEmpty(args.weapon.Report))
|
||||
Sound.Play(args.weapon.Report + ".aud");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -53,7 +53,9 @@
|
||||
<Compile Include="Activities\LayMine.cs" />
|
||||
<Compile Include="Activities\Steal.cs" />
|
||||
<Compile Include="Activities\Teleport.cs" />
|
||||
<Compile Include="AirstrikePower.cs" />
|
||||
<Compile Include="C4Demolition.cs" />
|
||||
<Compile Include="CarpetBomb.cs" />
|
||||
<Compile Include="Chronoshiftable.cs" />
|
||||
<Compile Include="Effects\NukeLaunch.cs" />
|
||||
<Compile Include="Activities\Harvest.cs" />
|
||||
|
||||
@@ -35,6 +35,7 @@ Player:
|
||||
TechLevel: 8
|
||||
EndChargeSound: airredy1.aud
|
||||
SelectTargetSound: select1.aud
|
||||
UnitType: a10
|
||||
|
||||
World:
|
||||
GlobalDefaults:
|
||||
|
||||
@@ -122,11 +122,11 @@
|
||||
</unit>
|
||||
<!-- airfield -->
|
||||
<unit name="afld">
|
||||
<sequence name="idle" start="4" length="4" tick="160"/>
|
||||
<sequence name="damaged-idle" start="12" length="4" tick="160"/>
|
||||
<sequence name="idle" start="4" length="4" tick="160" />
|
||||
<sequence name="damaged-idle" start="12" length="4" tick="160" />
|
||||
<sequence name="make" start="0" length="11" src="afldmake" />
|
||||
<sequence name="active" start="0" length="4" tick="160"/>
|
||||
<sequence name="damaged-active" start="8" length="4" tick="160"/>
|
||||
<sequence name="active" start="0" length="4" tick="160" />
|
||||
<sequence name="damaged-active" start="8" length="4" tick="160" />
|
||||
</unit>
|
||||
<!-- sub pen -->
|
||||
<unit name="spen">
|
||||
@@ -900,15 +900,19 @@
|
||||
<sequence name="die5" start="0" length="14" src="electro" />
|
||||
<sequence name="run" start="56" length="6" facings="8" />
|
||||
</unit>
|
||||
<unit name="c2">
|
||||
<sequence name="stand" start="0" length="1" facings="8" />
|
||||
<sequence name="crawl" start="8" length="6" facings="8" />
|
||||
<sequence name="shoot" start="120" length="4" facings="8" />
|
||||
<sequence name="die1" start="152" length="8" />
|
||||
<sequence name="die2" start="160" length="8" />
|
||||
<sequence name="die3" start="168" length="12" />
|
||||
<sequence name="die4" start="180" length="18" />
|
||||
<sequence name="die5" start="0" length="14" src="electro" />
|
||||
<sequence name="run" start="56" length="6" facings="8" />
|
||||
</unit>
|
||||
<unit name="c2">
|
||||
<sequence name="stand" start="0" length="1" facings="8" />
|
||||
<sequence name="crawl" start="8" length="6" facings="8" />
|
||||
<sequence name="shoot" start="120" length="4" facings="8" />
|
||||
<sequence name="die1" start="152" length="8" />
|
||||
<sequence name="die2" start="160" length="8" />
|
||||
<sequence name="die3" start="168" length="12" />
|
||||
<sequence name="die4" start="180" length="18" />
|
||||
<sequence name="die5" start="0" length="14" src="electro" />
|
||||
<sequence name="run" start="56" length="6" facings="8" />
|
||||
</unit>
|
||||
<unit name="parabomb">
|
||||
<sequence name="open" start="0" length="8" />
|
||||
<sequence name="idle" start="8" length="5" />
|
||||
</unit>
|
||||
</sequences>
|
||||
@@ -66,6 +66,18 @@ Player:
|
||||
TechLevel: 5
|
||||
GivenAuto: no
|
||||
OneShot: yes
|
||||
AirstrikePower:
|
||||
Image: pbmbicon
|
||||
ChargeTime: .2
|
||||
Description: Parabombs
|
||||
LongDesc: A Badger drops a load of parachuted bombs on your target.
|
||||
TechLevel: 5
|
||||
Prerequisites: POWR
|
||||
# GivenAuto: no
|
||||
# OneShot: yes
|
||||
UnitType: badr.bomber
|
||||
SelectTargetSound: slcttgt1.aud
|
||||
|
||||
|
||||
World:
|
||||
GlobalDefaults:
|
||||
|
||||
@@ -62,6 +62,26 @@ BADR:
|
||||
Passengers: 10
|
||||
-Selectable:
|
||||
|
||||
BADR.bomber:
|
||||
CarpetBomb:
|
||||
Range: 3
|
||||
Weapon: ParaBomb
|
||||
Inherits: ^Plane
|
||||
Unit:
|
||||
HP: 60
|
||||
Armor: light
|
||||
ROT: 5
|
||||
Sight: 0
|
||||
Speed: 16
|
||||
Plane:
|
||||
LimitedAmmo:
|
||||
Ammo: 7
|
||||
RenderUnit:
|
||||
Image: badr
|
||||
WithShadow:
|
||||
IronCurtainable:
|
||||
-Selectable:
|
||||
|
||||
V2RL:
|
||||
Inherits: ^Vehicle
|
||||
Buildable:
|
||||
|
||||
@@ -556,24 +556,21 @@ DepthCharge:
|
||||
Damage: 80
|
||||
|
||||
ParaBomb:
|
||||
ROF: 4
|
||||
ROF: 10
|
||||
Range: 4.5
|
||||
Report: CHUTE1
|
||||
Bullet:
|
||||
Arm: 24
|
||||
RangeLimit: 24
|
||||
High: true
|
||||
GravityBomb:
|
||||
Image: PARABOMB
|
||||
Speed: 5
|
||||
Warhead:
|
||||
Spread: 3
|
||||
Wall: true
|
||||
Wood: true
|
||||
Verses: 30%,75%,75%,100%,50%
|
||||
Explosion: 4
|
||||
Explosion: 8
|
||||
InfDeath: 3
|
||||
SmudgeType: Crater
|
||||
Damage: 300
|
||||
Damage: 500
|
||||
ImpactSound: kaboom15
|
||||
|
||||
DogJaw:
|
||||
ROF: 10
|
||||
|
||||
Reference in New Issue
Block a user