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 System.Linq;
|
||||||
using OpenRa.Traits;
|
using OpenRa.Traits;
|
||||||
|
using OpenRa.Mods.RA.Activities;
|
||||||
|
|
||||||
namespace OpenRa.Mods.RA
|
namespace OpenRa.Mods.RA
|
||||||
{
|
{
|
||||||
@@ -34,10 +35,7 @@ namespace OpenRa.Mods.RA
|
|||||||
if (limitedAmmo != null)
|
if (limitedAmmo != null)
|
||||||
limitedAmmo.Attacking(self);
|
limitedAmmo.Attacking(self);
|
||||||
|
|
||||||
// todo: delay a bit? (req making deploy-mine an activity)
|
self.QueueActivity( new LayMine() );
|
||||||
|
|
||||||
self.World.AddFrameEndTask(
|
|
||||||
w => w.CreateActor(self.Info.Traits.Get<MinelayerInfo>().Mine, self.Location, self.Owner));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,7 @@
|
|||||||
<Compile Include="Activities\CaptureBuilding.cs" />
|
<Compile Include="Activities\CaptureBuilding.cs" />
|
||||||
<Compile Include="Activities\Demolish.cs" />
|
<Compile Include="Activities\Demolish.cs" />
|
||||||
<Compile Include="Activities\Infiltrate.cs" />
|
<Compile Include="Activities\Infiltrate.cs" />
|
||||||
|
<Compile Include="Activities\LayMine.cs" />
|
||||||
<Compile Include="Activities\Steal.cs" />
|
<Compile Include="Activities\Steal.cs" />
|
||||||
<Compile Include="C4Demolition.cs" />
|
<Compile Include="C4Demolition.cs" />
|
||||||
<Compile Include="EngineerCapture.cs" />
|
<Compile Include="EngineerCapture.cs" />
|
||||||
@@ -73,9 +74,6 @@
|
|||||||
<Name>OpenRa.Game</Name>
|
<Name>OpenRa.Game</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="Orders\" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- 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.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
|||||||
@@ -763,11 +763,13 @@ ImpactSound=squishy2
|
|||||||
[ATMine]
|
[ATMine]
|
||||||
Verses=0%,0%,100%,100%,0%
|
Verses=0%,0%,100%,100%,0%
|
||||||
ImpactSound=mineblo1
|
ImpactSound=mineblo1
|
||||||
|
Explosion=5
|
||||||
|
|
||||||
[APMine]
|
[APMine]
|
||||||
Verses=100%,0%,0%,0%,0%
|
Verses=100%,0%,0%,0%,0%
|
||||||
ImpactSound=mine1
|
ImpactSound=mine1
|
||||||
InfDeath=2
|
InfDeath=2
|
||||||
|
Explosion=3
|
||||||
|
|
||||||
[DemolishWarhead]
|
[DemolishWarhead]
|
||||||
Verses=100%,100%,100%,100%,100%
|
Verses=100%,100%,100%,100%,100%
|
||||||
|
|||||||
Reference in New Issue
Block a user