Remove deprecated Buildable.Owner field.
This commit is contained in:
@@ -21,9 +21,6 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
"and by the ProvidesCustomPrerequisite trait.")]
|
"and by the ProvidesCustomPrerequisite trait.")]
|
||||||
public readonly string[] Prerequisites = { };
|
public readonly string[] Prerequisites = { };
|
||||||
|
|
||||||
[Desc("Restrict production to a specific race(s). **Deprecated**: Use race-specific prerequisites instead.")]
|
|
||||||
public readonly string[] Owner = { };
|
|
||||||
|
|
||||||
[Desc("Production queue(s) that can produce this.")]
|
[Desc("Production queue(s) that can produce this.")]
|
||||||
public readonly string[] Queue = { };
|
public readonly string[] Queue = { };
|
||||||
|
|
||||||
|
|||||||
@@ -26,9 +26,6 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
[Desc("Group queues from separate buildings together into the same tab.")]
|
[Desc("Group queues from separate buildings together into the same tab.")]
|
||||||
public readonly string Group = null;
|
public readonly string Group = null;
|
||||||
|
|
||||||
[Desc("Filter buildable items based on their Owner.")]
|
|
||||||
public readonly bool RequireOwner = true;
|
|
||||||
|
|
||||||
[Desc("Only enable this queue for certain factions")]
|
[Desc("Only enable this queue for certain factions")]
|
||||||
public readonly string[] Race = { };
|
public readonly string[] Race = { };
|
||||||
|
|
||||||
@@ -155,13 +152,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
{
|
{
|
||||||
var bi = a.Traits.Get<BuildableInfo>();
|
var bi = a.Traits.Get<BuildableInfo>();
|
||||||
|
|
||||||
// Can our race build this by satisfying normal prerequisites?
|
produceable.Add(a, new ProductionState());
|
||||||
var buildable = !Info.RequireOwner || bi.Owner.Contains(Race);
|
|
||||||
|
|
||||||
// Checks if Prerequisites want to hide the Actor from buildQueue if they are false
|
|
||||||
produceable.Add(a, new ProductionState { Visible = buildable });
|
|
||||||
|
|
||||||
if (buildable)
|
|
||||||
ttc.Add(a.Name, bi.Prerequisites, bi.BuildLimit, this);
|
ttc.Add(a.Name, bi.Prerequisites, bi.BuildLimit, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -391,7 +382,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
public class ProductionState
|
public class ProductionState
|
||||||
{
|
{
|
||||||
public bool Visible = false;
|
public bool Visible = true;
|
||||||
public bool Buildable = false;
|
public bool Buildable = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user