Remove unread private member (IDE0052)
This commit is contained in:
committed by
Gustas
parent
43e0cca663
commit
d3a8b07f05
@@ -20,7 +20,6 @@ namespace OpenRA.Mods.Common.Activities
|
||||
public class DeliverUnit : Activity
|
||||
{
|
||||
readonly Carryall carryall;
|
||||
readonly BodyOrientation body;
|
||||
readonly bool assignTargetOnFirstRun;
|
||||
readonly WDist deliverRange;
|
||||
readonly Color? targetLineColor;
|
||||
@@ -40,7 +39,6 @@ namespace OpenRA.Mods.Common.Activities
|
||||
this.targetLineColor = targetLineColor;
|
||||
|
||||
carryall = self.Trait<Carryall>();
|
||||
body = self.Trait<BodyOrientation>();
|
||||
}
|
||||
|
||||
protected override void OnFirstRun(Actor self)
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
editorActionManager = world.WorldActor.Trait<EditorActionManager>();
|
||||
editorCursor = world.WorldActor.Trait<EditorCursorLayer>();
|
||||
resourceLayer = world.WorldActor.Trait<IResourceLayer>();
|
||||
action = new AddResourcesEditorAction(world.Map, resourceType, resourceLayer);
|
||||
action = new AddResourcesEditorAction(resourceType, resourceLayer);
|
||||
|
||||
cursorToken = editorCursor.SetResource(wr, resourceType);
|
||||
}
|
||||
@@ -74,7 +74,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
else if (resourceAdded && mi.Button == MouseButton.Left && mi.Event == MouseInputEvent.Up)
|
||||
{
|
||||
editorActionManager.Add(action);
|
||||
action = new AddResourcesEditorAction(world.Map, ResourceType, resourceLayer);
|
||||
action = new AddResourcesEditorAction(ResourceType, resourceLayer);
|
||||
resourceAdded = false;
|
||||
}
|
||||
|
||||
@@ -107,14 +107,12 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public string Text { get; private set; }
|
||||
|
||||
readonly Map map;
|
||||
readonly IResourceLayer resourceLayer;
|
||||
readonly string resourceType;
|
||||
readonly List<CellResource> cellResources = new List<CellResource>();
|
||||
|
||||
public AddResourcesEditorAction(Map map, string resourceType, IResourceLayer resourceLayer)
|
||||
public AddResourcesEditorAction(string resourceType, IResourceLayer resourceLayer)
|
||||
{
|
||||
this.map = map;
|
||||
this.resourceType = resourceType;
|
||||
this.resourceLayer = resourceLayer;
|
||||
}
|
||||
|
||||
@@ -1231,13 +1231,11 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
class AssociateWithAirfieldActivity : Activity
|
||||
{
|
||||
readonly Actor self;
|
||||
readonly Aircraft aircraft;
|
||||
readonly int delay;
|
||||
|
||||
public AssociateWithAirfieldActivity(Actor self, int delay = 0)
|
||||
{
|
||||
this.self = self;
|
||||
aircraft = self.Trait<Aircraft>();
|
||||
IsInterruptible = false;
|
||||
this.delay = delay;
|
||||
|
||||
@@ -61,8 +61,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
readonly World world;
|
||||
readonly Player player;
|
||||
|
||||
readonly Predicate<Actor> unitCannotBeOrdered;
|
||||
|
||||
IBotPositionsUpdated[] notifyPositionsUpdated;
|
||||
IBotRequestUnitProduction[] requestUnitProduction;
|
||||
|
||||
@@ -75,7 +73,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
world = self.World;
|
||||
player = self.Owner;
|
||||
unitCannotBeOrdered = a => a.Owner != player || a.IsDead || !a.IsInWorld;
|
||||
}
|
||||
|
||||
protected override void Created(Actor self)
|
||||
|
||||
@@ -40,14 +40,11 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
public class WithSpriteControlGroupDecoration : IDecoration
|
||||
{
|
||||
public readonly WithSpriteControlGroupDecorationInfo Info;
|
||||
readonly Actor self;
|
||||
readonly Animation anim;
|
||||
|
||||
public WithSpriteControlGroupDecoration(Actor self, WithSpriteControlGroupDecorationInfo info)
|
||||
{
|
||||
Info = info;
|
||||
this.self = self;
|
||||
|
||||
anim = new Animation(self.World, Info.Image);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,6 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
{
|
||||
readonly WithTextControlGroupDecorationInfo info;
|
||||
readonly SpriteFont font;
|
||||
readonly Actor self;
|
||||
readonly CachedTransform<int, string> label;
|
||||
|
||||
Color color;
|
||||
@@ -57,7 +56,6 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
public WithTextControlGroupDecoration(Actor self, WithTextControlGroupDecorationInfo info)
|
||||
{
|
||||
this.info = info;
|
||||
this.self = self;
|
||||
font = Game.Renderer.Fonts[info.Font];
|
||||
color = info.UsePlayerColor ? self.Owner.Color : info.Color;
|
||||
|
||||
|
||||
@@ -49,15 +49,11 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
|
||||
public class WithVoxelTurret : ConditionalTrait<WithVoxelTurretInfo>
|
||||
{
|
||||
readonly Actor self;
|
||||
readonly Turreted turreted;
|
||||
readonly BodyOrientation body;
|
||||
|
||||
public WithVoxelTurret(Actor self, WithVoxelTurretInfo info)
|
||||
: base(info)
|
||||
{
|
||||
this.self = self;
|
||||
body = self.Trait<BodyOrientation>();
|
||||
turreted = self.TraitsImplementing<Turreted>()
|
||||
.First(tt => tt.Name == Info.Turret);
|
||||
|
||||
|
||||
@@ -95,7 +95,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
readonly TimeLimitManagerInfo info;
|
||||
readonly int ticksPerSecond;
|
||||
MapOptions mapOptions;
|
||||
LabelWidget countdownLabel;
|
||||
CachedTransform<int, string> countdown;
|
||||
int ticksRemaining;
|
||||
@@ -119,7 +118,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
void IWorldLoaded.WorldLoaded(World w, OpenRA.Graphics.WorldRenderer wr)
|
||||
{
|
||||
mapOptions = w.WorldActor.Trait<MapOptions>();
|
||||
if (string.IsNullOrWhiteSpace(info.CountdownLabel) || string.IsNullOrWhiteSpace(info.CountdownText))
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user