Move Gives/Gains Experience and Bounty to Mods.Common
This commit is contained in:
@@ -11,8 +11,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using OpenRA.Effects;
|
using OpenRA.Effects;
|
||||||
using OpenRA.Graphics;
|
using OpenRA.Graphics;
|
||||||
|
using OpenRA.Mods.Common.Traits;
|
||||||
|
|
||||||
namespace OpenRA.Mods.RA.Effects
|
namespace OpenRA.Mods.Common.Effects
|
||||||
{
|
{
|
||||||
class Rank : IEffect
|
class Rank : IEffect
|
||||||
{
|
{
|
||||||
@@ -75,6 +75,7 @@
|
|||||||
<Compile Include="Effects\NukeLaunch.cs" />
|
<Compile Include="Effects\NukeLaunch.cs" />
|
||||||
<Compile Include="Effects\PowerdownIndicator.cs" />
|
<Compile Include="Effects\PowerdownIndicator.cs" />
|
||||||
<Compile Include="Effects\RallyPointIndicator.cs" />
|
<Compile Include="Effects\RallyPointIndicator.cs" />
|
||||||
|
<Compile Include="Effects\Rank.cs" />
|
||||||
<Compile Include="Effects\Smoke.cs" />
|
<Compile Include="Effects\Smoke.cs" />
|
||||||
<Compile Include="Commands\ChatCommands.cs" />
|
<Compile Include="Commands\ChatCommands.cs" />
|
||||||
<Compile Include="Commands\DevCommands.cs" />
|
<Compile Include="Commands\DevCommands.cs" />
|
||||||
@@ -134,6 +135,9 @@
|
|||||||
<Compile Include="Traits\Buildings\RepairsUnits.cs" />
|
<Compile Include="Traits\Buildings\RepairsUnits.cs" />
|
||||||
<Compile Include="Traits\Buildings\FootprintUtils.cs" />
|
<Compile Include="Traits\Buildings\FootprintUtils.cs" />
|
||||||
<Compile Include="Traits\Burns.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\Huntable.cs" />
|
||||||
<Compile Include="Traits\CustomBuildTimeValue.cs" />
|
<Compile Include="Traits\CustomBuildTimeValue.cs" />
|
||||||
<Compile Include="Traits\CustomSellValue.cs" />
|
<Compile Include="Traits\CustomSellValue.cs" />
|
||||||
@@ -284,4 +288,4 @@ cd "$(SolutionDir)"</PostBuildEvent>
|
|||||||
<Target Name="AfterBuild">
|
<Target Name="AfterBuild">
|
||||||
</Target>
|
</Target>
|
||||||
-->
|
-->
|
||||||
</Project>
|
</Project>
|
||||||
@@ -12,12 +12,10 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using OpenRA.Mods.Common.Effects;
|
using OpenRA.Mods.Common.Effects;
|
||||||
using OpenRA.Mods.Common.Traits;
|
|
||||||
using OpenRA.Mods.RA.Effects;
|
|
||||||
using OpenRA.Primitives;
|
using OpenRA.Primitives;
|
||||||
using OpenRA.Traits;
|
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.")]
|
[Desc("This actor's experience increases when it has killed a GivesExperience actor.")]
|
||||||
public class GainsExperienceInfo : ITraitInfo, Requires<ValuedInfo>
|
public class GainsExperienceInfo : ITraitInfo, Requires<ValuedInfo>
|
||||||
@@ -125,7 +123,7 @@ namespace OpenRA.Mods.RA
|
|||||||
|
|
||||||
class ExperienceInit : IActorInit<int>
|
class ExperienceInit : IActorInit<int>
|
||||||
{
|
{
|
||||||
[FieldFromYamlKey] public readonly int value = 0;
|
[FieldFromYamlKey] readonly int value;
|
||||||
public ExperienceInit() { }
|
public ExperienceInit() { }
|
||||||
public ExperienceInit(int init) { value = init; }
|
public ExperienceInit(int init) { value = init; }
|
||||||
public int Value(World world) { return value; }
|
public int Value(World world) { return value; }
|
||||||
@@ -13,7 +13,7 @@ using OpenRA.Mods.Common.Effects;
|
|||||||
using OpenRA.Mods.Common.Traits;
|
using OpenRA.Mods.Common.Traits;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.Common.Traits
|
||||||
{
|
{
|
||||||
[Desc("You get money for playing this actor.")]
|
[Desc("You get money for playing this actor.")]
|
||||||
class GivesBountyInfo : TraitInfo<GivesBounty>
|
class GivesBountyInfo : TraitInfo<GivesBounty>
|
||||||
@@ -8,10 +8,9 @@
|
|||||||
*/
|
*/
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using OpenRA.Mods.Common.Traits;
|
|
||||||
using OpenRA.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.")]
|
[Desc("This actor gives experience to a GainsExperience actor when they are killed.")]
|
||||||
class GivesExperienceInfo : ITraitInfo
|
class GivesExperienceInfo : ITraitInfo
|
||||||
@@ -127,12 +127,10 @@
|
|||||||
<Compile Include="Attack\AttackTurreted.cs" />
|
<Compile Include="Attack\AttackTurreted.cs" />
|
||||||
<Compile Include="Crushable.cs" />
|
<Compile Include="Crushable.cs" />
|
||||||
<Compile Include="Effects\GpsSatellite.cs" />
|
<Compile Include="Effects\GpsSatellite.cs" />
|
||||||
<Compile Include="Effects\Rank.cs" />
|
|
||||||
<Compile Include="Effects\SatelliteLaunch.cs" />
|
<Compile Include="Effects\SatelliteLaunch.cs" />
|
||||||
<Compile Include="Effects\TeslaZap.cs" />
|
<Compile Include="Effects\TeslaZap.cs" />
|
||||||
<Compile Include="Render\RenderUnitReload.cs" />
|
<Compile Include="Render\RenderUnitReload.cs" />
|
||||||
<Compile Include="Graphics\TeslaZapRenderable.cs" />
|
<Compile Include="Graphics\TeslaZapRenderable.cs" />
|
||||||
<Compile Include="GainsExperience.cs" />
|
|
||||||
<Compile Include="EjectOnDeath.cs" />
|
<Compile Include="EjectOnDeath.cs" />
|
||||||
<Compile Include="AI\RushFuzzy.cs" />
|
<Compile Include="AI\RushFuzzy.cs" />
|
||||||
<Compile Include="AI\StateMachine.cs" />
|
<Compile Include="AI\StateMachine.cs" />
|
||||||
@@ -179,8 +177,6 @@
|
|||||||
<Compile Include="EmitInfantryOnSell.cs" />
|
<Compile Include="EmitInfantryOnSell.cs" />
|
||||||
<Compile Include="EngineerRepair.cs" />
|
<Compile Include="EngineerRepair.cs" />
|
||||||
<Compile Include="Explodes.cs" />
|
<Compile Include="Explodes.cs" />
|
||||||
<Compile Include="GivesBounty.cs" />
|
|
||||||
<Compile Include="GivesExperience.cs" />
|
|
||||||
<Compile Include="Guard.cs" />
|
<Compile Include="Guard.cs" />
|
||||||
<Compile Include="Invulnerable.cs" />
|
<Compile Include="Invulnerable.cs" />
|
||||||
<Compile Include="Captures.cs" />
|
<Compile Include="Captures.cs" />
|
||||||
@@ -444,4 +440,4 @@ copy "FuzzyLogicLibrary.dll" "$(SolutionDir)"
|
|||||||
cd "$(SolutionDir)"</PostBuildEvent>
|
cd "$(SolutionDir)"</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup />
|
<ItemGroup />
|
||||||
</Project>
|
</Project>
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using OpenRA.Mods.Common.Traits;
|
||||||
|
|
||||||
namespace OpenRA.Mods.RA.Traits
|
namespace OpenRA.Mods.RA.Traits
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user