diff --git a/OpenRa.Game/OpenRa.Game.csproj b/OpenRa.Game/OpenRa.Game.csproj
index f43e6f6383..c2a351bf94 100644
--- a/OpenRa.Game/OpenRa.Game.csproj
+++ b/OpenRa.Game/OpenRa.Game.csproj
@@ -271,7 +271,6 @@
-
diff --git a/OpenRa.Game/Traits/StoresOre.cs b/OpenRa.Game/Traits/StoresOre.cs
index bdabfca5d2..fad732b83c 100644
--- a/OpenRa.Game/Traits/StoresOre.cs
+++ b/OpenRa.Game/Traits/StoresOre.cs
@@ -3,16 +3,17 @@ using System;
using OpenRa.Game.GameRules;
namespace OpenRa.Game.Traits
{
+ class StoresOreInfo : ITraitInfo
+ {
+ public readonly int Pips = 0;
+ public readonly int Capacity = 0;
+
+ public object Create(Actor self) { return new StoresOre(self); }
+ }
+
class StoresOre : IPips, IAcceptThief
{
- public const int MaxStealAmount = 100; //todo: How is cash stolen determined?
-
- readonly Actor self;
-
- public StoresOre(Actor self)
- {
- this.self = self;
- }
+ public StoresOre(Actor self) {}
public void OnSteal(Actor self, Actor thief)
{
diff --git a/OpenRa.Game/Traits/Submarine.cs b/OpenRa.Game/Traits/Submarine.cs
index 3183072b85..79033ed5b5 100644
--- a/OpenRa.Game/Traits/Submarine.cs
+++ b/OpenRa.Game/Traits/Submarine.cs
@@ -4,6 +4,11 @@ using OpenRa.Game.Graphics;
namespace OpenRa.Game.Traits
{
+ class SubmarineInfo : ITraitInfo
+ {
+ public object Create(Actor self) { return new Submarine(self); }
+ }
+
class Submarine : IRenderModifier, INotifyAttack, ITick, INotifyDamage
{
[Sync]
diff --git a/OpenRa.Game/Traits/TakeCover.cs b/OpenRa.Game/Traits/TakeCover.cs
index 192f2e899b..abd2148592 100644
--- a/OpenRa.Game/Traits/TakeCover.cs
+++ b/OpenRa.Game/Traits/TakeCover.cs
@@ -1,6 +1,11 @@
namespace OpenRa.Game.Traits
{
+ class TakeCoverInfo : ITraitInfo
+ {
+ public object Create(Actor self) { return new TakeCover(self); }
+ }
+
// infantry prone behavior
class TakeCover : ITick, INotifyDamage, IDamageModifier, ISpeedModifier
{
diff --git a/OpenRa.Game/Traits/Thief.cs b/OpenRa.Game/Traits/Thief.cs
index 54b34b5d5c..591391a164 100644
--- a/OpenRa.Game/Traits/Thief.cs
+++ b/OpenRa.Game/Traits/Thief.cs
@@ -3,6 +3,11 @@ using System.Collections.Generic;
using System.Linq;
namespace OpenRa.Game.Traits
{
+ class ThiefInfo : ITraitInfo
+ {
+ public object Create(Actor self) { return new Thief(self); }
+ }
+
class Thief : IIssueOrder, IResolveOrder
{
public Thief(Actor self) { }
diff --git a/OpenRa.Game/Traits/Tree.cs b/OpenRa.Game/Traits/Tree.cs
deleted file mode 100644
index f4c3ebced1..0000000000
--- a/OpenRa.Game/Traits/Tree.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Collections.Generic;
-using OpenRa.Game.Graphics;
-
-namespace OpenRa.Game.Traits
-{
- class Tree : IRender
- {
- Sprite Image;
-
- public Tree(Sprite treeImage)
- {
- Image = treeImage;
- }
-
- public IEnumerable Render(Actor self)
- {
- yield return new Renderable(Image, Game.CellSize * (float2)self.Location, 0);
- }
- }
-}
diff --git a/OpenRa.Game/Traits/WaterPaletteRotation.cs b/OpenRa.Game/Traits/WaterPaletteRotation.cs
index ec31812731..7c5a5eacf9 100644
--- a/OpenRa.Game/Traits/WaterPaletteRotation.cs
+++ b/OpenRa.Game/Traits/WaterPaletteRotation.cs
@@ -2,6 +2,11 @@
namespace OpenRa.Game.Traits
{
+ class WaterPaletteRotationInfo : ITraitInfo
+ {
+ public object Create(Actor self) { return new WaterPaletteRotation(self); }
+ }
+
class WaterPaletteRotation : ITick, IPaletteModifier
{
public WaterPaletteRotation(Actor self) { }
diff --git a/OpenRa.Game/Traits/WithShadow.cs b/OpenRa.Game/Traits/WithShadow.cs
index 7575573781..39153ba058 100644
--- a/OpenRa.Game/Traits/WithShadow.cs
+++ b/OpenRa.Game/Traits/WithShadow.cs
@@ -6,6 +6,11 @@ using OpenRa.Game.Graphics;
namespace OpenRa.Game.Traits
{
+ class WithShadowInfo : ITraitInfo
+ {
+ public object Create(Actor self) { return new WithShadow(self); }
+ }
+
class WithShadow : IRenderModifier
{
public WithShadow(Actor self) {}