diff --git a/OpenRA.Game/Effects/Bullet.cs b/OpenRA.Game/Effects/Bullet.cs index ef49c56027..db5ae585c0 100755 --- a/OpenRA.Game/Effects/Bullet.cs +++ b/OpenRA.Game/Effects/Bullet.cs @@ -101,7 +101,7 @@ namespace OpenRA.Effects var cell = ((1f/Game.CellSize) * pos).ToInt2(); if (world.WorldActor.traits.Get().GetUnitsAt(cell).Any( - a => a.traits.Contains())) + a => a.traits.Contains())) { Args.dest = pos.ToInt2(); Explode(world); diff --git a/OpenRA.Game/Effects/Missile.cs b/OpenRA.Game/Effects/Missile.cs index a37bd5ffe9..33612daa60 100755 --- a/OpenRA.Game/Effects/Missile.cs +++ b/OpenRA.Game/Effects/Missile.cs @@ -116,7 +116,7 @@ namespace OpenRA.Effects var cell = ((1f / Game.CellSize) * Pos).ToInt2(); if (world.WorldActor.traits.Get().GetUnitsAt(cell).Any( - a => a.traits.Contains())) + a => a.traits.Contains())) Explode(world); } } diff --git a/OpenRA.Game/OpenRA.Game.csproj b/OpenRA.Game/OpenRA.Game.csproj index ca559b5380..b3f9c19ee4 100755 --- a/OpenRA.Game/OpenRA.Game.csproj +++ b/OpenRA.Game/OpenRA.Game.csproj @@ -215,7 +215,6 @@ - diff --git a/OpenRA.Game/Traits/Player/ProductionQueue.cs b/OpenRA.Game/Traits/Player/ProductionQueue.cs index b6e5921504..c45bd71ccb 100644 --- a/OpenRA.Game/Traits/Player/ProductionQueue.cs +++ b/OpenRA.Game/Traits/Player/ProductionQueue.cs @@ -193,7 +193,7 @@ namespace OpenRA.Traits return; } - if( producer.traits.WithInterface().Any( p => p.Produce( producer, newUnitType ) ) ) + if( producer.traits.WithInterface().Any( p => p.Produce( producer, newUnitType ) ) ) FinishProduction( newUnitType.Category ); } } diff --git a/OpenRA.Game/Traits/Production.cs b/OpenRA.Game/Traits/Production.cs index 5a2a7b89d8..848f5ff292 100755 --- a/OpenRA.Game/Traits/Production.cs +++ b/OpenRA.Game/Traits/Production.cs @@ -34,7 +34,7 @@ namespace OpenRA.Traits public virtual object Create(Actor self) { return new Production(self); } } - public class Production : IIssueOrder, IResolveOrder, IProducer, ITags + public class Production : IIssueOrder, IResolveOrder, ITags { bool isPrimary = false; public bool IsPrimary { get { return isPrimary; } } diff --git a/OpenRA.Game/Traits/TraitsInterfaces.cs b/OpenRA.Game/Traits/TraitsInterfaces.cs index 4fdf2a6bcc..0a919ff4d2 100644 --- a/OpenRA.Game/Traits/TraitsInterfaces.cs +++ b/OpenRA.Game/Traits/TraitsInterfaces.cs @@ -62,11 +62,6 @@ namespace OpenRA.Traits public interface IDisable { bool Disabled { get; } } - interface IProducer - { - bool Produce( Actor self, ActorInfo producee ); - void SetPrimaryProducer(Actor self, bool isPrimary); - } public interface IOccupySpace { IEnumerable OccupiedCells(); } public interface INotifyAttack { void Attacking(Actor self); } public interface IRenderModifier { IEnumerable ModifyRender(Actor self, IEnumerable r); } @@ -144,4 +139,5 @@ namespace OpenRA.Traits public interface INotifyIdle { void Idle(Actor self); } public interface IVictoryConditions { bool HasLost { get; } bool HasWon { get; } } + public interface IBlocksBullets { } } diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index 8d1b34d97c..7d470643bf 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -173,6 +173,7 @@ + diff --git a/OpenRA.Game/Traits/Wall.cs b/OpenRA.Mods.RA/Wall.cs similarity index 90% rename from OpenRA.Game/Traits/Wall.cs rename to OpenRA.Mods.RA/Wall.cs index 284de0f469..2be644b5e3 100644 --- a/OpenRA.Game/Traits/Wall.cs +++ b/OpenRA.Mods.RA/Wall.cs @@ -21,8 +21,9 @@ using System.Collections.Generic; using System.Linq; using OpenRA.GameRules; +using OpenRA.Traits; -namespace OpenRA.Traits +namespace OpenRA.Mods.RA { public class WallInfo : ITraitInfo { @@ -31,7 +32,7 @@ namespace OpenRA.Traits public object Create(Actor self) { return new Wall(self); } } - public class Wall : ICrushable, IOccupySpace + public class Wall : ICrushable, IOccupySpace, IBlocksBullets { readonly Actor self; public Wall(Actor self)