Renormalize line endings and fix copyright headers again.
This commit is contained in:
@@ -36,7 +36,7 @@ namespace OpenRA.Mods.RA
|
||||
public readonly Actor self;
|
||||
public ProductionQueueInfo Info;
|
||||
PowerManager PlayerPower;
|
||||
PlayerResources PlayerResources;
|
||||
PlayerResources PlayerResources;
|
||||
string Race;
|
||||
|
||||
// A list of things we are currently building
|
||||
@@ -55,7 +55,7 @@ namespace OpenRA.Mods.RA
|
||||
[Sync]
|
||||
public bool CurrentDone { get { return QueueLength == 0 ? false : Queue[0].Done; } }
|
||||
|
||||
// A list of things we could possibly build, even if our race doesn't normally get it
|
||||
// A list of things we could possibly build, even if our race doesn't normally get it
|
||||
public Dictionary<ActorInfo, ProductionState> Produceable;
|
||||
|
||||
public ProductionQueue( Actor self, Actor playerActor, ProductionQueueInfo info )
|
||||
@@ -65,7 +65,7 @@ namespace OpenRA.Mods.RA
|
||||
PlayerResources = playerActor.Trait<PlayerResources>();
|
||||
PlayerPower = playerActor.Trait<PowerManager>();
|
||||
|
||||
Race = self.Owner.Country.Race;
|
||||
Race = self.Owner.Country.Race;
|
||||
Produceable = InitTech(playerActor);
|
||||
}
|
||||
|
||||
@@ -75,26 +75,26 @@ namespace OpenRA.Mods.RA
|
||||
PlayerResources = newOwner.PlayerActor.Trait<PlayerResources>();
|
||||
Queue.Clear();
|
||||
|
||||
// Produceable contains the tech from the original owner - this is desired so we don't clear it.
|
||||
// Produceable contains the tech from the original owner - this is desired so we don't clear it.
|
||||
Produceable = InitTech(self.Owner.PlayerActor);
|
||||
}
|
||||
|
||||
Dictionary<ActorInfo, ProductionState> InitTech(Actor playerActor)
|
||||
{
|
||||
var tech = new Dictionary<ActorInfo, ProductionState>();
|
||||
var ttc = playerActor.Trait<TechTree>();
|
||||
|
||||
foreach (var a in AllBuildables(Info.Type))
|
||||
{
|
||||
var bi = a.Traits.Get<BuildableInfo>();
|
||||
// Can our race build this by satisfying normal prereqs?
|
||||
var buildable = bi.Owner.Contains(Race);
|
||||
tech.Add(a, new ProductionState() { Visible = buildable && !bi.Hidden });
|
||||
if (buildable)
|
||||
ttc.Add(a.Name, a.Traits.Get<BuildableInfo>().Prerequisites.ToList(), this);
|
||||
}
|
||||
|
||||
return tech;
|
||||
}
|
||||
|
||||
Dictionary<ActorInfo, ProductionState> InitTech(Actor playerActor)
|
||||
{
|
||||
var tech = new Dictionary<ActorInfo, ProductionState>();
|
||||
var ttc = playerActor.Trait<TechTree>();
|
||||
|
||||
foreach (var a in AllBuildables(Info.Type))
|
||||
{
|
||||
var bi = a.Traits.Get<BuildableInfo>();
|
||||
// Can our race build this by satisfying normal prereqs?
|
||||
var buildable = bi.Owner.Contains(Race);
|
||||
tech.Add(a, new ProductionState() { Visible = buildable && !bi.Hidden });
|
||||
if (buildable)
|
||||
ttc.Add(a.Name, a.Traits.Get<BuildableInfo>().Prerequisites.ToList(), this);
|
||||
}
|
||||
|
||||
return tech;
|
||||
}
|
||||
|
||||
IEnumerable<ActorInfo> AllBuildables(string category)
|
||||
|
||||
Reference in New Issue
Block a user