Rename ProvidesCustomPrerequisite to ProvidesPrerequisite
This commit is contained in:
@@ -17,8 +17,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("The prerequisite names that must be available before this can be built.",
|
||||
"This can be prefixed with ! to invert the prerequisite (disabling production if the prerequisite is available)",
|
||||
"and/or ~ to hide the actor from the production palette if the prerequisite is not available.",
|
||||
"Prerequisites are granted by actors with the Building trait (with a prerequisite string given by the lower case actor name)",
|
||||
"and by the ProvidesCustomPrerequisite trait.")]
|
||||
"Prerequisites are granted by actors with the ProvidesPrerequisite trait.")]
|
||||
public readonly string[] Prerequisites = { };
|
||||
|
||||
[Desc("Production queue(s) that can produce this.")]
|
||||
|
||||
@@ -10,12 +10,11 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Primitives;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
public class ProvidesCustomPrerequisiteInfo : ITraitInfo
|
||||
public class ProvidesPrerequisiteInfo : ITraitInfo
|
||||
{
|
||||
[Desc("The prerequisite type that this provides. If left empty it defaults to the actor's name.")]
|
||||
public readonly string Prerequisite = null;
|
||||
@@ -28,17 +27,17 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
[Desc("Should it recheck everything when it is captured?")]
|
||||
public readonly bool ResetOnOwnerChange = false;
|
||||
public object Create(ActorInitializer init) { return new ProvidesCustomPrerequisite(init, this); }
|
||||
public object Create(ActorInitializer init) { return new ProvidesPrerequisite(init, this); }
|
||||
}
|
||||
|
||||
public class ProvidesCustomPrerequisite : ITechTreePrerequisite, INotifyOwnerChanged
|
||||
public class ProvidesPrerequisite : ITechTreePrerequisite, INotifyOwnerChanged
|
||||
{
|
||||
readonly ProvidesCustomPrerequisiteInfo info;
|
||||
readonly ProvidesPrerequisiteInfo info;
|
||||
readonly string prerequisite;
|
||||
|
||||
bool enabled = true;
|
||||
|
||||
public ProvidesCustomPrerequisite(ActorInitializer init, ProvidesCustomPrerequisiteInfo info)
|
||||
public ProvidesPrerequisite(ActorInitializer init, ProvidesPrerequisiteInfo info)
|
||||
{
|
||||
this.info = info;
|
||||
prerequisite = info.Prerequisite;
|
||||
Reference in New Issue
Block a user