preserve whole CountryInfo object in ProductionQueue
This commit is contained in:
@@ -39,7 +39,7 @@ namespace OpenRA.Mods.RA
|
|||||||
public ProductionQueueInfo Info;
|
public ProductionQueueInfo Info;
|
||||||
PowerManager PlayerPower;
|
PowerManager PlayerPower;
|
||||||
PlayerResources playerResources;
|
PlayerResources playerResources;
|
||||||
string Race;
|
CountryInfo Race;
|
||||||
|
|
||||||
// A list of things we are currently building
|
// A list of things we are currently building
|
||||||
public List<ProductionItem> Queue = new List<ProductionItem>();
|
public List<ProductionItem> Queue = new List<ProductionItem>();
|
||||||
@@ -67,7 +67,7 @@ namespace OpenRA.Mods.RA
|
|||||||
playerResources = playerActor.Trait<PlayerResources>();
|
playerResources = playerActor.Trait<PlayerResources>();
|
||||||
PlayerPower = playerActor.Trait<PowerManager>();
|
PlayerPower = playerActor.Trait<PowerManager>();
|
||||||
|
|
||||||
Race = self.Owner.Country.Race;
|
Race = self.Owner.Country;
|
||||||
Produceable = InitTech(playerActor);
|
Produceable = InitTech(playerActor);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
var bi = a.Traits.Get<BuildableInfo>();
|
var bi = a.Traits.Get<BuildableInfo>();
|
||||||
// Can our race build this by satisfying normal prereqs?
|
// Can our race build this by satisfying normal prereqs?
|
||||||
var buildable = bi.Owner.Contains(Race);
|
var buildable = bi.Owner.Contains(Race.Race);
|
||||||
tech.Add(a, new ProductionState() { Visible = buildable && !bi.Hidden });
|
tech.Add(a, new ProductionState() { Visible = buildable && !bi.Hidden });
|
||||||
if (buildable)
|
if (buildable)
|
||||||
ttc.Add(a.Name, a.Traits.Get<BuildableInfo>().Prerequisites.ToList(), this);
|
ttc.Add(a.Name, a.Traits.Get<BuildableInfo>().Prerequisites.ToList(), this);
|
||||||
|
|||||||
Reference in New Issue
Block a user