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