Move Gives/Gains Experience and Bounty to Mods.Common

This commit is contained in:
penev92
2015-01-02 22:58:01 +02:00
parent 9dd607c846
commit 5e1af58bbe
7 changed files with 13 additions and 14 deletions

View File

@@ -11,8 +11,9 @@
using System.Collections.Generic;
using OpenRA.Effects;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
namespace OpenRA.Mods.RA.Effects
namespace OpenRA.Mods.Common.Effects
{
class Rank : IEffect
{

View File

@@ -75,6 +75,7 @@
<Compile Include="Effects\NukeLaunch.cs" />
<Compile Include="Effects\PowerdownIndicator.cs" />
<Compile Include="Effects\RallyPointIndicator.cs" />
<Compile Include="Effects\Rank.cs" />
<Compile Include="Effects\Smoke.cs" />
<Compile Include="Commands\ChatCommands.cs" />
<Compile Include="Commands\DevCommands.cs" />
@@ -134,6 +135,9 @@
<Compile Include="Traits\Buildings\RepairsUnits.cs" />
<Compile Include="Traits\Buildings\FootprintUtils.cs" />
<Compile Include="Traits\Burns.cs" />
<Compile Include="Traits\GainsExperience.cs" />
<Compile Include="Traits\GivesBounty.cs" />
<Compile Include="Traits\GivesExperience.cs" />
<Compile Include="Traits\Huntable.cs" />
<Compile Include="Traits\CustomBuildTimeValue.cs" />
<Compile Include="Traits\CustomSellValue.cs" />
@@ -284,4 +288,4 @@ cd "$(SolutionDir)"</PostBuildEvent>
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

View File

@@ -12,12 +12,10 @@ using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.Mods.Common.Effects;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Effects;
using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
namespace OpenRA.Mods.Common.Traits
{
[Desc("This actor's experience increases when it has killed a GivesExperience actor.")]
public class GainsExperienceInfo : ITraitInfo, Requires<ValuedInfo>
@@ -125,7 +123,7 @@ namespace OpenRA.Mods.RA
class ExperienceInit : IActorInit<int>
{
[FieldFromYamlKey] public readonly int value = 0;
[FieldFromYamlKey] readonly int value;
public ExperienceInit() { }
public ExperienceInit(int init) { value = init; }
public int Value(World world) { return value; }

View File

@@ -13,7 +13,7 @@ using OpenRA.Mods.Common.Effects;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
namespace OpenRA.Mods.Common.Traits
{
[Desc("You get money for playing this actor.")]
class GivesBountyInfo : TraitInfo<GivesBounty>

View File

@@ -8,10 +8,9 @@
*/
#endregion
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
namespace OpenRA.Mods.Common.Traits
{
[Desc("This actor gives experience to a GainsExperience actor when they are killed.")]
class GivesExperienceInfo : ITraitInfo

View File

@@ -127,12 +127,10 @@
<Compile Include="Attack\AttackTurreted.cs" />
<Compile Include="Crushable.cs" />
<Compile Include="Effects\GpsSatellite.cs" />
<Compile Include="Effects\Rank.cs" />
<Compile Include="Effects\SatelliteLaunch.cs" />
<Compile Include="Effects\TeslaZap.cs" />
<Compile Include="Render\RenderUnitReload.cs" />
<Compile Include="Graphics\TeslaZapRenderable.cs" />
<Compile Include="GainsExperience.cs" />
<Compile Include="EjectOnDeath.cs" />
<Compile Include="AI\RushFuzzy.cs" />
<Compile Include="AI\StateMachine.cs" />
@@ -179,8 +177,6 @@
<Compile Include="EmitInfantryOnSell.cs" />
<Compile Include="EngineerRepair.cs" />
<Compile Include="Explodes.cs" />
<Compile Include="GivesBounty.cs" />
<Compile Include="GivesExperience.cs" />
<Compile Include="Guard.cs" />
<Compile Include="Invulnerable.cs" />
<Compile Include="Captures.cs" />
@@ -444,4 +440,4 @@ copy "FuzzyLogicLibrary.dll" "$(SolutionDir)"
cd "$(SolutionDir)"</PostBuildEvent>
</PropertyGroup>
<ItemGroup />
</Project>
</Project>

View File

@@ -9,6 +9,7 @@
#endregion
using System.Linq;
using OpenRA.Mods.Common.Traits;
namespace OpenRA.Mods.RA.Traits
{