tidy up some bizarre namespacing
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Graphics;
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Buildings
|
||||
{
|
||||
|
||||
@@ -19,16 +19,17 @@ namespace OpenRA.Mods.RA.Buildings
|
||||
public readonly int RepairPercent = 20;
|
||||
public readonly int RepairInterval = 24;
|
||||
public readonly int RepairStep = 7;
|
||||
|
||||
public object Create(ActorInitializer init) { return new RepairableBuilding(init.self, this); }
|
||||
}
|
||||
|
||||
public class RepairableBuilding : ITick, ISync
|
||||
{
|
||||
[Sync]
|
||||
public Player Repairer = null;
|
||||
[Sync] public Player Repairer = null;
|
||||
|
||||
Health Health;
|
||||
RepairableBuildingInfo Info;
|
||||
|
||||
public RepairableBuilding(Actor self, RepairableBuildingInfo info)
|
||||
{
|
||||
Health = self.Trait<Health>();
|
||||
@@ -57,6 +58,7 @@ namespace OpenRA.Mods.RA.Buildings
|
||||
}
|
||||
|
||||
int remainingTicks;
|
||||
|
||||
public void Tick(Actor self)
|
||||
{
|
||||
if (Repairer == null) return;
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace OpenRA.Mods.RA.Buildings
|
||||
class RequiresPower : IDisable, INotifyCapture
|
||||
{
|
||||
PowerManager power;
|
||||
|
||||
public RequiresPower( Actor self )
|
||||
{
|
||||
power = self.Owner.PlayerActor.Trait<PowerManager>();
|
||||
|
||||
@@ -8,9 +8,6 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Buildings
|
||||
@@ -24,6 +21,7 @@ namespace OpenRA.Mods.RA.Buildings
|
||||
public class ShakeOnDeath : INotifyKilled
|
||||
{
|
||||
readonly ShakeOnDeathInfo Info;
|
||||
|
||||
public ShakeOnDeath(ShakeOnDeathInfo info)
|
||||
{
|
||||
this.Info = info;
|
||||
|
||||
@@ -8,15 +8,9 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Mods.RA.Buildings;
|
||||
using OpenRA.Mods.RA.Effects;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Render
|
||||
namespace OpenRA.Mods.RA.Buildings
|
||||
{
|
||||
public class SoundOnDamageTransitionInfo : ITraitInfo
|
||||
{
|
||||
@@ -29,6 +23,7 @@ namespace OpenRA.Mods.RA.Render
|
||||
public class SoundOnDamageTransition : INotifyDamageStateChanged
|
||||
{
|
||||
readonly SoundOnDamageTransitionInfo Info;
|
||||
|
||||
public SoundOnDamageTransition( SoundOnDamageTransitionInfo info )
|
||||
{
|
||||
Info = info;
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Traits;
|
||||
|
||||
|
||||
@@ -140,7 +140,6 @@
|
||||
<Compile Include="Buildings\RequiresPower.cs" />
|
||||
<Compile Include="Buildings\ShakeOnDeath.cs" />
|
||||
<Compile Include="Buildings\SoundOnDamageTransition.cs" />
|
||||
<Compile Include="Buildings\TechTree.cs" />
|
||||
<Compile Include="Buildings\Util.cs" />
|
||||
<Compile Include="Buildings\Wall.cs" />
|
||||
<Compile Include="Burns.cs" />
|
||||
@@ -251,6 +250,7 @@
|
||||
<Compile Include="Player\ClassicProductionQueue.cs" />
|
||||
<Compile Include="Player\PlaceBuilding.cs" />
|
||||
<Compile Include="Player\ProductionQueue.cs" />
|
||||
<Compile Include="Player\TechTree.cs" />
|
||||
<Compile Include="Player\SurrenderOnDisconnect.cs" />
|
||||
<Compile Include="PrimaryBuilding.cs" />
|
||||
<Compile Include="Production.cs" />
|
||||
@@ -332,6 +332,7 @@
|
||||
<Compile Include="WaterPaletteRotation.cs" />
|
||||
<Compile Include="Weapon.cs" />
|
||||
<Compile Include="Widgets\BuildPaletteWidget.cs" />
|
||||
<Compile Include="Widgets\Logic\ColorPickerLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\ConnectionDialogsLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\CreateServerMenuLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\DeveloperModeLogic.cs" />
|
||||
@@ -364,7 +365,6 @@
|
||||
<Compile Include="World\ChooseBuildTabOnSelect.cs" />
|
||||
<Compile Include="World\PlayMusicOnMapLoad.cs" />
|
||||
<Compile Include="World\SmudgeLayer.cs" />
|
||||
<Compile Include="Widgets\Logic\ColorPickerLogic.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
|
||||
@@ -391,7 +391,4 @@
|
||||
copy "$(TargetPath)" "$(SolutionDir)mods/ra/"
|
||||
cd "$(SolutionDir)"</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="AI\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -13,7 +13,7 @@ using System.Linq;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Buildings
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
public class TechTreeInfo : ITraitInfo
|
||||
{
|
||||
@@ -24,6 +24,7 @@ namespace OpenRA.Mods.RA.Buildings
|
||||
{
|
||||
readonly List<Watcher> watchers = new List<Watcher>();
|
||||
readonly Player player;
|
||||
|
||||
public TechTree(ActorInitializer init)
|
||||
{
|
||||
player = init.self.Owner;
|
||||
@@ -106,26 +107,17 @@ namespace OpenRA.Mods.RA.Buildings
|
||||
}
|
||||
}
|
||||
|
||||
public interface ITechTreeElement
|
||||
{
|
||||
void PrerequisitesAvailable(string key);
|
||||
void PrerequisitesUnavailable(string key);
|
||||
}
|
||||
|
||||
public interface ITechTreePrerequisite
|
||||
{
|
||||
IEnumerable<string> ProvidesPrerequisites {get;}
|
||||
}
|
||||
|
||||
public class ProvidesCustomPrerequisiteInfo : ITraitInfo
|
||||
{
|
||||
public string Prerequisite;
|
||||
public readonly string Prerequisite;
|
||||
|
||||
public object Create(ActorInitializer init) { return new ProvidesCustomPrerequisite(this);}
|
||||
}
|
||||
|
||||
public class ProvidesCustomPrerequisite : ITechTreePrerequisite
|
||||
{
|
||||
ProvidesCustomPrerequisiteInfo Info;
|
||||
|
||||
public IEnumerable<string> ProvidesPrerequisites { get { yield return Info.Prerequisite; } }
|
||||
|
||||
public ProvidesCustomPrerequisite(ProvidesCustomPrerequisiteInfo info)
|
||||
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using OpenRA.Mods.RA.Activities;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
@@ -25,4 +26,15 @@ namespace OpenRA.Mods.RA
|
||||
{
|
||||
void OnDock(Actor self, Actor harv, DeliverResources dockOrder);
|
||||
}
|
||||
|
||||
public interface ITechTreeElement
|
||||
{
|
||||
void PrerequisitesAvailable(string key);
|
||||
void PrerequisitesUnavailable(string key);
|
||||
}
|
||||
|
||||
public interface ITechTreePrerequisite
|
||||
{
|
||||
IEnumerable<string> ProvidesPrerequisites {get;}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user