diff --git a/OpenRA.Game/OpenRA.Game.csproj b/OpenRA.Game/OpenRA.Game.csproj
index c1d84706e6..07213c2946 100755
--- a/OpenRA.Game/OpenRA.Game.csproj
+++ b/OpenRA.Game/OpenRA.Game.csproj
@@ -226,8 +226,8 @@
-
+
diff --git a/OpenRA.Game/Traits/Player/PlayerProductionQueue.cs b/OpenRA.Game/Traits/Player/ClassicProductionQueue.cs
similarity index 63%
rename from OpenRA.Game/Traits/Player/PlayerProductionQueue.cs
rename to OpenRA.Game/Traits/Player/ClassicProductionQueue.cs
index 1c00fb8226..8162e06b50 100644
--- a/OpenRA.Game/Traits/Player/PlayerProductionQueue.cs
+++ b/OpenRA.Game/Traits/Player/ClassicProductionQueue.cs
@@ -15,23 +15,22 @@ using OpenRA.FileFormats;
namespace OpenRA.Traits
{
- public class PlayerProductionQueueInfo : ProductionQueueInfo, ITraitPrerequisite
+ public class ClassicProductionQueueInfo : ProductionQueueInfo, ITraitPrerequisite
{
- public override object Create(ActorInitializer init) { return new PlayerProductionQueue(init.self, this); }
+ public override object Create(ActorInitializer init) { return new ClassicProductionQueue(init.self, this); }
}
- public class PlayerProductionQueue : ProductionQueue
+ public class ClassicProductionQueue : ProductionQueue
{
- public PlayerProductionQueue( Actor self, PlayerProductionQueueInfo info )
+ public ClassicProductionQueue( Actor self, ClassicProductionQueueInfo info )
: base(self, self, info as ProductionQueueInfo) {}
[Sync] bool QueueActive = true;
public override void Tick( Actor self )
{
- if (self == self.Owner.PlayerActor)
- QueueActive = self.World.Queries.OwnedBy[self.Owner].WithTrait()
- .Where(x => x.Trait.Info.Produces.Contains(Info.Type))
- .Any();
+ QueueActive = self.World.Queries.OwnedBy[self.Owner].WithTrait()
+ .Where(x => x.Trait.Info.Produces.Contains(Info.Type))
+ .Any();
base.Tick(self);
}
@@ -49,14 +48,13 @@ namespace OpenRA.Traits
protected override void BuildUnit( string name )
{
- // original ra behavior; queue lives on PlayerActor, need to find a production structure
+ // Find a production structure to build this actor
var producers = self.World.Queries.OwnedBy[self.Owner]
- .WithTrait()
- .Where(x => x.Trait.Info.Produces.Contains(Info.Type))
- .OrderByDescending(x => x.Actor.IsPrimaryBuilding() ? 1 : 0 ) // prioritize the primary.
- .ToArray();
+ .WithTrait()
+ .Where(x => x.Trait.Info.Produces.Contains(Info.Type))
+ .OrderByDescending(x => x.Actor.IsPrimaryBuilding() ? 1 : 0 ); // prioritize the primary.
- if (producers.Length == 0)
+ if (producers.Count() == 0)
{
CancelProduction(name);
return;
diff --git a/mods/ra/rules/system.yaml b/mods/ra/rules/system.yaml
index d6c5a7a63b..8d50f0eeee 100644
--- a/mods/ra/rules/system.yaml
+++ b/mods/ra/rules/system.yaml
@@ -1,26 +1,26 @@
Player:
TechTree:
- PlayerProductionQueue@Building:
+ ClassicProductionQueue@Building:
Type: Building
BuildSpeed: .4
LowPowerSlowdown: 3
- PlayerProductionQueue@Defense:
+ ClassicProductionQueue@Defense:
Type: Defense
BuildSpeed: .4
LowPowerSlowdown: 3
- PlayerProductionQueue@Vehicle:
+ ClassicProductionQueue@Vehicle:
Type: Vehicle
BuildSpeed: .4
LowPowerSlowdown: 3
- PlayerProductionQueue@Infantry:
+ ClassicProductionQueue@Infantry:
Type: Infantry
BuildSpeed: .4
LowPowerSlowdown: 3
- PlayerProductionQueue@Ship:
+ ClassicProductionQueue@Ship:
Type: Ship
BuildSpeed: .4
LowPowerSlowdown: 3
- PlayerProductionQueue@Plane:
+ ClassicProductionQueue@Plane:
Type: Plane
BuildSpeed: .4
LowPowerSlowdown: 3