LayMine activity
This commit is contained in:
24
OpenRa.Mods.RA/Activities/LayMine.cs
Executable file
24
OpenRa.Mods.RA/Activities/LayMine.cs
Executable file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using OpenRa.Traits.Activities;
|
||||
|
||||
namespace OpenRa.Mods.RA.Activities
|
||||
{
|
||||
class LayMine : IActivity
|
||||
{
|
||||
public IActivity NextActivity { get; set; }
|
||||
|
||||
public IActivity Tick( Actor self )
|
||||
{
|
||||
self.World.AddFrameEndTask(
|
||||
w => w.CreateActor(self.Info.Traits.Get<MinelayerInfo>().Mine, self.Location, self.Owner));
|
||||
return NextActivity;
|
||||
}
|
||||
|
||||
public void Cancel( Actor self )
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Linq;
|
||||
using OpenRa.Traits;
|
||||
using OpenRa.Mods.RA.Activities;
|
||||
|
||||
namespace OpenRa.Mods.RA
|
||||
{
|
||||
@@ -34,10 +35,7 @@ namespace OpenRa.Mods.RA
|
||||
if (limitedAmmo != null)
|
||||
limitedAmmo.Attacking(self);
|
||||
|
||||
// todo: delay a bit? (req making deploy-mine an activity)
|
||||
|
||||
self.World.AddFrameEndTask(
|
||||
w => w.CreateActor(self.Info.Traits.Get<MinelayerInfo>().Mine, self.Location, self.Owner));
|
||||
self.QueueActivity( new LayMine() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
<Compile Include="Activities\CaptureBuilding.cs" />
|
||||
<Compile Include="Activities\Demolish.cs" />
|
||||
<Compile Include="Activities\Infiltrate.cs" />
|
||||
<Compile Include="Activities\LayMine.cs" />
|
||||
<Compile Include="Activities\Steal.cs" />
|
||||
<Compile Include="C4Demolition.cs" />
|
||||
<Compile Include="EngineerCapture.cs" />
|
||||
@@ -73,9 +74,6 @@
|
||||
<Name>OpenRa.Game</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Orders\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
@@ -763,11 +763,13 @@ ImpactSound=squishy2
|
||||
[ATMine]
|
||||
Verses=0%,0%,100%,100%,0%
|
||||
ImpactSound=mineblo1
|
||||
Explosion=5
|
||||
|
||||
[APMine]
|
||||
Verses=100%,0%,0%,0%,0%
|
||||
ImpactSound=mine1
|
||||
InfDeath=2
|
||||
Explosion=3
|
||||
|
||||
[DemolishWarhead]
|
||||
Verses=100%,100%,100%,100%,100%
|
||||
@@ -870,4 +872,4 @@ Powered=no
|
||||
Image=pbmbicon
|
||||
TechLevel=8
|
||||
GivenAuto=no
|
||||
Impl=NullPower
|
||||
Impl=NullPower
|
||||
|
||||
Reference in New Issue
Block a user