Fix CA1012
This commit is contained in:
@@ -86,7 +86,7 @@ namespace OpenRA.Activities
|
||||
bool firstRunCompleted;
|
||||
bool lastRun;
|
||||
|
||||
public Activity()
|
||||
protected Activity()
|
||||
{
|
||||
IsInterruptible = true;
|
||||
ChildHasPriority = true;
|
||||
|
||||
@@ -24,10 +24,10 @@ namespace OpenRA
|
||||
protected readonly T[] Entries;
|
||||
protected readonly Rectangle Bounds;
|
||||
|
||||
public CellLayerBase(Map map)
|
||||
protected CellLayerBase(Map map)
|
||||
: this(map.Grid.Type, new Size(map.MapSize.X, map.MapSize.Y)) { }
|
||||
|
||||
public CellLayerBase(MapGridType gridType, Size size)
|
||||
protected CellLayerBase(MapGridType gridType, Size size)
|
||||
{
|
||||
Size = size;
|
||||
Bounds = new Rectangle(0, 0, Size.Width, Size.Height);
|
||||
|
||||
@@ -50,7 +50,8 @@ namespace OpenRA.Scripting
|
||||
{
|
||||
protected readonly Actor Self;
|
||||
protected readonly ScriptContext Context;
|
||||
public ScriptActorProperties(ScriptContext context, Actor self)
|
||||
|
||||
protected ScriptActorProperties(ScriptContext context, Actor self)
|
||||
{
|
||||
Self = self;
|
||||
Context = context;
|
||||
@@ -61,7 +62,8 @@ namespace OpenRA.Scripting
|
||||
{
|
||||
protected readonly Player Player;
|
||||
protected readonly ScriptContext Context;
|
||||
public ScriptPlayerProperties(ScriptContext context, Player player)
|
||||
|
||||
protected ScriptPlayerProperties(ScriptContext context, Player player)
|
||||
{
|
||||
Player = player;
|
||||
Context = context;
|
||||
@@ -87,7 +89,8 @@ namespace OpenRA.Scripting
|
||||
protected override string MemberNotFoundError(string memberName) { return $"Table '{Name}' does not define a property '{memberName}'"; }
|
||||
|
||||
public readonly string Name;
|
||||
public ScriptGlobal(ScriptContext context)
|
||||
|
||||
protected ScriptGlobal(ScriptContext context)
|
||||
: base(context)
|
||||
{
|
||||
// GetType resolves the actual (subclass) type
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace OpenRA.Scripting
|
||||
readonly List<string> membersToRemove = new List<string>();
|
||||
#endif
|
||||
|
||||
public ScriptObjectWrapper(ScriptContext context)
|
||||
protected ScriptObjectWrapper(ScriptContext context)
|
||||
{
|
||||
Context = context;
|
||||
}
|
||||
|
||||
@@ -576,7 +576,7 @@ namespace OpenRA.Support
|
||||
}
|
||||
}
|
||||
|
||||
public VariableExpression(string expression)
|
||||
protected VariableExpression(string expression)
|
||||
{
|
||||
Expression = expression;
|
||||
}
|
||||
|
||||
@@ -204,9 +204,10 @@ namespace OpenRA.Widgets
|
||||
public Rectangle Bounds;
|
||||
public Widget Parent = null;
|
||||
public Func<bool> IsVisible;
|
||||
public Widget() { IsVisible = () => Visible; }
|
||||
|
||||
public Widget(Widget widget)
|
||||
protected Widget() { IsVisible = () => Visible; }
|
||||
|
||||
protected Widget(Widget widget)
|
||||
{
|
||||
Id = widget.Id;
|
||||
X = widget.X;
|
||||
|
||||
Reference in New Issue
Block a user