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