moved infantry traits to ra

This commit is contained in:
Chris Forbes
2010-05-20 18:41:24 +12:00
parent be974f7970
commit f75a2d2fe6
7 changed files with 54 additions and 30 deletions

View File

@@ -88,7 +88,6 @@
<Compile Include="Traits\RevealsShroud.cs" />
<Compile Include="Traits\Player\ConquestVictoryConditions.cs" />
<Compile Include="Traits\Modifiers\HiddenUnderFog.cs" />
<Compile Include="Traits\Render\RenderFlare.cs" />
<Compile Include="Traits\World\Shroud.cs" />
<Compile Include="Widgets\Delegates\ConnectionDialogsDelegate.cs" />
<Compile Include="Widgets\Delegates\CreateServerMenuDelegate.cs" />
@@ -102,7 +101,6 @@
<Compile Include="Widgets\PostGameWidget.cs" />
<Compile Include="Widgets\WidgetUtils.cs" />
<Compile Include="Combat.cs" />
<Compile Include="Effects\Corpse.cs" />
<Compile Include="Effects\DelayedAction.cs" />
<Compile Include="Effects\FlashTarget.cs" />
<Compile Include="Effects\LaserZap.cs" />
@@ -227,7 +225,6 @@
<Compile Include="Traits\Player\ProductionQueue.cs" />
<Compile Include="Traits\ProductionSurround.cs" />
<Compile Include="Traits\Render\RenderBuildingCharge.cs" />
<Compile Include="Traits\Render\RenderInfantry.cs" />
<Compile Include="Traits\TransformsOnDeploy.cs" />
<Compile Include="Traits\Mobile.cs" />
<Compile Include="Traits\Production.cs" />
@@ -246,7 +243,6 @@
<Compile Include="Traits\SeedsResource.cs" />
<Compile Include="Traits\StoresOre.cs" />
<Compile Include="Traits\Cloak.cs" />
<Compile Include="Traits\AI\TakeCover.cs" />
<Compile Include="Traits\TraitsInterfaces.cs" />
<Compile Include="Traits\Turreted.cs" />
<Compile Include="Traits\Unit.cs" />
@@ -315,6 +311,9 @@
<ItemGroup>
<Content Include="OpenRA.ico" />
</ItemGroup>
<ItemGroup>
<Folder Include="Traits\AI\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\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.

View File

@@ -1,21 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace OpenRA.Traits.Render
{
class RenderFlareInfo : RenderSimpleInfo
{
public override object Create(Actor self) { return new RenderFlare(self); }
}
class RenderFlare : RenderSimple
{
public RenderFlare(Actor self)
: base(self, () => 0)
{
anim.PlayThen("open", () => anim.PlayRepeating("idle"));
}
}
}

View File

@@ -19,10 +19,11 @@
#endregion
using System.Collections.Generic;
using OpenRA.Effects;
using OpenRA.Graphics;
using OpenRA.Traits;
namespace OpenRA.Effects
namespace OpenRA.Mods.RA.Effects
{
class Corpse : IEffect
{

View File

@@ -78,6 +78,7 @@
<Compile Include="CrateDrop.cs" />
<Compile Include="CrateSpawner.cs" />
<Compile Include="Crates\SupportPowerCrateAction.cs" />
<Compile Include="Effects\Corpse.cs" />
<Compile Include="Effects\CrateEffect.cs" />
<Compile Include="Effects\NukeLaunch.cs" />
<Compile Include="Activities\Harvest.cs" />
@@ -107,6 +108,8 @@
<Compile Include="ParaDrop.cs" />
<Compile Include="ParatroopersPower.cs" />
<Compile Include="Passenger.cs" />
<Compile Include="RenderFlare.cs" />
<Compile Include="RenderInfantry.cs" />
<Compile Include="RequiresPower.cs" />
<Compile Include="Mine.cs" />
<Compile Include="Minelayer.cs" />
@@ -120,6 +123,7 @@
<Compile Include="Spy.cs" />
<Compile Include="SpyPlanePower.cs" />
<Compile Include="NukePower.cs" />
<Compile Include="TakeCover.cs" />
<Compile Include="TeslaInstantKills.cs" />
<Compile Include="Thief.cs" />
<Compile Include="Crates\ResetRadarCrateAction.cs" />

View File

@@ -0,0 +1,38 @@
#region Copyright & License Information
/*
* Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford.
* This file is part of OpenRA.
*
* OpenRA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* OpenRA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with OpenRA. If not, see <http://www.gnu.org/licenses/>.
*/
#endregion
using OpenRA.Traits;
namespace OpenRA.Mods.RA
{
class RenderFlareInfo : RenderSimpleInfo
{
public override object Create(Actor self) { return new RenderFlare(self); }
}
class RenderFlare : RenderSimple
{
public RenderFlare(Actor self)
: base(self, () => 0)
{
anim.PlayThen("open", () => anim.PlayRepeating("idle"));
}
}
}

View File

@@ -18,9 +18,11 @@
*/
#endregion
using OpenRA.Effects;
using OpenRA.Traits;
using OpenRA.Traits.Activities;
using OpenRA.Mods.RA.Effects;
namespace OpenRA.Traits
namespace OpenRA.Mods.RA
{
public class RenderInfantryInfo : RenderSimpleInfo
{
@@ -37,7 +39,7 @@ namespace OpenRA.Traits
bool ChooseMoveAnim(Actor self)
{
if (!(self.GetCurrentActivity() is Activities.Move))
if (!(self.GetCurrentActivity() is Move))
return false;
var mobile = self.traits.Get<Mobile>();

View File

@@ -19,8 +19,9 @@
#endregion
using OpenRA.GameRules;
using OpenRA.Traits;
namespace OpenRA.Traits
namespace OpenRA.Mods.RA
{
class TakeCoverInfo : ITraitInfo
{