Merge pull request #7106 from penev92/bleed_moveFiles

Move Upgrades and Prerequisites from Mods.RA to Mods.Common
This commit is contained in:
reaperrr
2014-12-11 22:34:58 +01:00
24 changed files with 40 additions and 32 deletions

View File

@@ -37,4 +37,17 @@ namespace OpenRA.Mods.Common
void MovementCancelled(Actor self); void MovementCancelled(Actor self);
void Harvested(Actor self, ResourceType resource); void Harvested(Actor self, ResourceType resource);
} }
public interface ITechTreePrerequisite
{
IEnumerable<string> ProvidesPrerequisites { get; }
}
public interface ITechTreeElement
{
void PrerequisitesAvailable (string key);
void PrerequisitesUnavailable (string key);
void PrerequisitesItemHidden (string key);
void PrerequisitesItemVisible (string key);
}
} }

View File

@@ -108,11 +108,13 @@
<Compile Include="Scripting\Properties\ResourceProperties.cs" /> <Compile Include="Scripting\Properties\ResourceProperties.cs" />
<Compile Include="Scripting\Properties\UpgradeProperties.cs" /> <Compile Include="Scripting\Properties\UpgradeProperties.cs" />
<Compile Include="Traits\BlocksBullets.cs" /> <Compile Include="Traits\BlocksBullets.cs" />
<Compile Include="Traits\Buildable.cs" />
<Compile Include="Traits\Buildings\DeadBuildingState.cs" /> <Compile Include="Traits\Buildings\DeadBuildingState.cs" />
<Compile Include="Traits\Burns.cs" /> <Compile Include="Traits\Burns.cs" />
<Compile Include="Traits\CustomBuildTimeValue.cs" /> <Compile Include="Traits\CustomBuildTimeValue.cs" />
<Compile Include="Traits\CustomSellValue.cs" /> <Compile Include="Traits\CustomSellValue.cs" />
<Compile Include="Traits\Demolishable.cs" /> <Compile Include="Traits\Demolishable.cs" />
<Compile Include="Traits\GlobalUpgradable.cs" />
<Compile Include="Traits\Immobile.cs" /> <Compile Include="Traits\Immobile.cs" />
<Compile Include="Traits\JamsMissiles.cs" /> <Compile Include="Traits\JamsMissiles.cs" />
<Compile Include="Traits\Modifiers\DisabledOverlay.cs" /> <Compile Include="Traits\Modifiers\DisabledOverlay.cs" />
@@ -123,6 +125,10 @@
<Compile Include="Traits\PaletteEffects\MenuPaletteEffect.cs" /> <Compile Include="Traits\PaletteEffects\MenuPaletteEffect.cs" />
<Compile Include="Traits\PaletteEffects\NukePaletteEffect.cs" /> <Compile Include="Traits\PaletteEffects\NukePaletteEffect.cs" />
<Compile Include="Traits\PaletteEffects\WaterPaletteRotation.cs" /> <Compile Include="Traits\PaletteEffects\WaterPaletteRotation.cs" />
<Compile Include="Traits\Player\GlobalUpgradeManager.cs" />
<Compile Include="Traits\Player\ProvidesCustomPrerequisite.cs" />
<Compile Include="Traits\Player\ProvidesTechPrerequisite.cs" />
<Compile Include="Traits\Player\TechTree.cs" />
<Compile Include="Traits\Power\AffectedByPowerOutage.cs" /> <Compile Include="Traits\Power\AffectedByPowerOutage.cs" />
<Compile Include="Traits\Power\CanPowerDown.cs" /> <Compile Include="Traits\Power\CanPowerDown.cs" />
<Compile Include="Traits\Power\Player\PowerManager.cs" /> <Compile Include="Traits\Power\Player\PowerManager.cs" />

View File

@@ -10,7 +10,7 @@
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.Common.Traits
{ {
public class BuildableInfo : TraitInfo<Buildable> public class BuildableInfo : TraitInfo<Buildable>
{ {

View File

@@ -8,14 +8,10 @@
*/ */
#endregion #endregion
using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using OpenRA.Mods.Common;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.Common.Traits
{ {
public class GlobalUpgradableInfo : ITraitInfo, Requires<UpgradeManagerInfo> public class GlobalUpgradableInfo : ITraitInfo, Requires<UpgradeManagerInfo>
{ {

View File

@@ -8,14 +8,12 @@
*/ */
#endregion #endregion
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Graphics;
using OpenRA.Primitives; using OpenRA.Primitives;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.Common.Traits
{ {
[Desc("Attach this to the player actor.")] [Desc("Attach this to the player actor.")]
public class GlobalUpgradeManagerInfo : ITraitInfo, Requires<TechTreeInfo> public class GlobalUpgradeManagerInfo : ITraitInfo, Requires<TechTreeInfo>

View File

@@ -13,7 +13,7 @@ using System.Linq;
using OpenRA.Primitives; using OpenRA.Primitives;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.Common.Traits
{ {
public class ProvidesCustomPrerequisiteInfo : ITraitInfo public class ProvidesCustomPrerequisiteInfo : ITraitInfo
{ {

View File

@@ -11,7 +11,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.Common.Traits
{ {
public class ProvidesTechPrerequisiteInfo : ITraitInfo public class ProvidesTechPrerequisiteInfo : ITraitInfo
{ {

View File

@@ -13,7 +13,7 @@ using System.Linq;
using OpenRA.Primitives; using OpenRA.Primitives;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.Common.Traits
{ {
[Desc("Manages build limits and pre-requisites.", " Attach this to the player actor.")] [Desc("Manages build limits and pre-requisites.", " Attach this to the player actor.")]
public class TechTreeInfo : ITraitInfo public class TechTreeInfo : ITraitInfo

View File

@@ -10,6 +10,7 @@
using System.Linq; using System.Linq;
using OpenRA.Mods.Common; using OpenRA.Mods.Common;
using OpenRA.Mods.Common.Traits;
using OpenRA.Primitives; using OpenRA.Primitives;
using OpenRA.Traits; using OpenRA.Traits;

View File

@@ -10,6 +10,7 @@
using System.Linq; using System.Linq;
using OpenRA.Mods.Common.Effects; using OpenRA.Mods.Common.Effects;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA

View File

@@ -10,6 +10,7 @@
using System; using System;
using System.Linq; using System.Linq;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Buildings; using OpenRA.Mods.RA.Buildings;
using OpenRA.Traits; using OpenRA.Traits;

View File

@@ -154,7 +154,6 @@
<Compile Include="Attack\AttackWander.cs" /> <Compile Include="Attack\AttackWander.cs" />
<Compile Include="AutoHeal.cs" /> <Compile Include="AutoHeal.cs" />
<Compile Include="AutoTarget.cs" /> <Compile Include="AutoTarget.cs" />
<Compile Include="Buildable.cs" />
<Compile Include="CaptureNotification.cs" /> <Compile Include="CaptureNotification.cs" />
<Compile Include="Buildings\Building.cs" /> <Compile Include="Buildings\Building.cs" />
<Compile Include="Buildings\BuildingInfluence.cs" /> <Compile Include="Buildings\BuildingInfluence.cs" />
@@ -223,12 +222,10 @@
<Compile Include="Player\ClassicProductionQueue.cs" /> <Compile Include="Player\ClassicProductionQueue.cs" />
<Compile Include="Player\PlaceBuilding.cs" /> <Compile Include="Player\PlaceBuilding.cs" />
<Compile Include="Player\ProductionQueue.cs" /> <Compile Include="Player\ProductionQueue.cs" />
<Compile Include="Player\ProvidesTechPrerequisite.cs" />
<Compile Include="Player\MissionObjectives.cs" /> <Compile Include="Player\MissionObjectives.cs" />
<Compile Include="PortableChrono.cs" /> <Compile Include="PortableChrono.cs" />
<Compile Include="Scripting\Properties\GuardProperties.cs" /> <Compile Include="Scripting\Properties\GuardProperties.cs" />
<Compile Include="Widgets\Logic\TabCompletionLogic.cs" /> <Compile Include="Widgets\Logic\TabCompletionLogic.cs" />
<Compile Include="Player\TechTree.cs" />
<Compile Include="Production.cs" /> <Compile Include="Production.cs" />
<Compile Include="ProductionBar.cs" /> <Compile Include="ProductionBar.cs" />
<Compile Include="ProximityCaptor.cs" /> <Compile Include="ProximityCaptor.cs" />
@@ -402,7 +399,6 @@
<Compile Include="Render\WithRepairOverlay.cs" /> <Compile Include="Render\WithRepairOverlay.cs" />
<Compile Include="Activities\MoveWithinRange.cs" /> <Compile Include="Activities\MoveWithinRange.cs" />
<Compile Include="Lint\CheckPlayers.cs" /> <Compile Include="Lint\CheckPlayers.cs" />
<Compile Include="Player\ProvidesCustomPrerequisite.cs" />
<Compile Include="Lint\CheckActors.cs" /> <Compile Include="Lint\CheckActors.cs" />
<Compile Include="Lint\CheckMapCordon.cs" /> <Compile Include="Lint\CheckMapCordon.cs" />
<Compile Include="Parachutable.cs" /> <Compile Include="Parachutable.cs" />
@@ -428,8 +424,6 @@
<Compile Include="Widgets\Logic\SupportPowerBinLogic.cs" /> <Compile Include="Widgets\Logic\SupportPowerBinLogic.cs" />
<Compile Include="Widgets\Logic\DebugMenuLogic.cs" /> <Compile Include="Widgets\Logic\DebugMenuLogic.cs" />
<Compile Include="ProductionQueueFromSelection.cs" /> <Compile Include="ProductionQueueFromSelection.cs" />
<Compile Include="GlobalUpgradable.cs" />
<Compile Include="Player\GlobalUpgradeManager.cs" />
<Compile Include="GainsStatUpgrades.cs" /> <Compile Include="GainsStatUpgrades.cs" />
<Compile Include="Player\Extensions.cs" /> <Compile Include="Player\Extensions.cs" />
<Compile Include="Warheads\CreateResourceWarhead.cs" /> <Compile Include="Warheads\CreateResourceWarhead.cs" />

View File

@@ -12,6 +12,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Mods.Common; using OpenRA.Mods.Common;
using OpenRA.Mods.Common.Power; using OpenRA.Mods.Common.Power;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Buildings; using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.RA.Traits; using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;

View File

@@ -10,6 +10,7 @@
using System.Linq; using System.Linq;
using OpenRA.Effects; using OpenRA.Effects;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Buildings; using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.RA.Traits; using OpenRA.Mods.RA.Traits;
using OpenRA.Primitives; using OpenRA.Primitives;

View File

@@ -13,6 +13,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Mods.Common; using OpenRA.Mods.Common;
using OpenRA.Mods.Common.Power; using OpenRA.Mods.Common.Power;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Buildings; using OpenRA.Mods.RA.Buildings;
using OpenRA.Traits; using OpenRA.Traits;

View File

@@ -12,6 +12,7 @@ using System;
using System.Drawing; using System.Drawing;
using System.Linq; using System.Linq;
using OpenRA.Mods.Common; using OpenRA.Mods.Common;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Move; using OpenRA.Mods.RA.Move;
using OpenRA.Mods.RA.Traits; using OpenRA.Mods.RA.Traits;
using OpenRA.Primitives; using OpenRA.Primitives;

View File

@@ -14,6 +14,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Mods.Common; using OpenRA.Mods.Common;
using OpenRA.Mods.Common.Scripting; using OpenRA.Mods.Common.Scripting;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Activities;
using OpenRA.Mods.RA.Traits; using OpenRA.Mods.RA.Traits;
using OpenRA.Scripting; using OpenRA.Scripting;

View File

@@ -13,6 +13,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.Common; using OpenRA.Mods.Common;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA

View File

@@ -10,6 +10,7 @@
using System.Linq; using System.Linq;
using OpenRA.Mods.Common; using OpenRA.Mods.Common;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Move; using OpenRA.Mods.RA.Move;
using OpenRA.Primitives; using OpenRA.Primitives;
using OpenRA.Traits; using OpenRA.Traits;

View File

@@ -29,19 +29,6 @@ namespace OpenRA.Mods.RA
void OnDock(Actor self, Actor harv, DeliverResources dockOrder); void OnDock(Actor self, Actor harv, DeliverResources dockOrder);
} }
public interface ITechTreeElement
{
void PrerequisitesAvailable(string key);
void PrerequisitesUnavailable(string key);
void PrerequisitesItemHidden(string key);
void PrerequisitesItemVisible(string key);
}
public interface ITechTreePrerequisite
{
IEnumerable<string> ProvidesPrerequisites {get;}
}
public interface INotifyParachuteLanded { void OnLanded(); } public interface INotifyParachuteLanded { void OnLanded(); }
public interface INotifyTransform { void BeforeTransform(Actor self); void OnTransform(Actor self); void AfterTransform(Actor toActor); } public interface INotifyTransform { void BeforeTransform(Actor self); void OnTransform(Actor self); void AfterTransform(Actor toActor); }
public interface INotifyAttack { void Attacking(Actor self, Target target, Armament a, Barrel barrel); } public interface INotifyAttack { void Attacking(Actor self, Target target, Armament a, Barrel barrel); }

View File

@@ -9,6 +9,7 @@
#endregion #endregion
using System.Collections.Generic; using System.Collections.Generic;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits; using OpenRA.Traits;
using OpenRA.Mods.RA.Render; using OpenRA.Mods.RA.Render;
using OpenRA.Mods.RA.Buildings; using OpenRA.Mods.RA.Buildings;

View File

@@ -14,6 +14,7 @@ using System.Data;
using System.Linq; using System.Linq;
using OpenRA.GameRules; using OpenRA.GameRules;
using OpenRA.Mods.Common; using OpenRA.Mods.Common;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.UtilityCommands namespace OpenRA.Mods.RA.UtilityCommands

View File

@@ -15,6 +15,7 @@ using System.Linq;
using System.Threading; using System.Threading;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.Common; using OpenRA.Mods.Common;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.Common.Widgets; using OpenRA.Mods.Common.Widgets;
using OpenRA.Network; using OpenRA.Network;
using OpenRA.Traits; using OpenRA.Traits;

View File

@@ -13,6 +13,7 @@ using System.Drawing;
using System.Linq; using System.Linq;
using OpenRA.Mods.Common; using OpenRA.Mods.Common;
using OpenRA.Mods.Common.Power; using OpenRA.Mods.Common.Power;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits; using OpenRA.Traits;
using OpenRA.Widgets; using OpenRA.Widgets;