Remove unnecessary this. references.
This commit is contained in:
@@ -51,7 +51,7 @@ namespace OpenRA.Activities
|
||||
public Activity TickOuter(Actor self)
|
||||
{
|
||||
if (State == ActivityState.Done && Game.Settings.Debug.StrictActivityChecking)
|
||||
throw new InvalidOperationException("Actor {0} attempted to tick activity {1} after it had already completed.".F(self, this.GetType()));
|
||||
throw new InvalidOperationException("Actor {0} attempted to tick activity {1} after it had already completed.".F(self, GetType()));
|
||||
|
||||
if (State == ActivityState.Queued)
|
||||
{
|
||||
@@ -147,7 +147,7 @@ namespace OpenRA.Activities
|
||||
if (origin == this)
|
||||
Console.Write("*");
|
||||
|
||||
Console.WriteLine(this.GetType().ToString().Split('.').Last());
|
||||
Console.WriteLine(GetType().ToString().Split('.').Last());
|
||||
|
||||
if (ChildActivity != null)
|
||||
ChildActivity.PrintActivityTree(self, origin, level + 1);
|
||||
|
||||
@@ -412,7 +412,7 @@ namespace OpenRA
|
||||
if (enabledTargetablePositionTraits.Any())
|
||||
return enabledTargetablePositionTraits.SelectMany(tp => tp.TargetablePositions(this));
|
||||
|
||||
return new[] { this.CenterPosition };
|
||||
return new[] { CenterPosition };
|
||||
}
|
||||
|
||||
#region Scripting interface
|
||||
|
||||
@@ -114,9 +114,10 @@ namespace OpenRA
|
||||
// - a small margin so that tiles rendered partially above the top edge of the screen aren't pushed behind the clip plane
|
||||
// We need an offset of mapGrid.MaximumTerrainHeight * mapGrid.TileSize.Height / 2 to cover the terrain height
|
||||
// and choose to use mapGrid.MaximumTerrainHeight * mapGrid.TileSize.Height / 4 for each of the actor and top-edge cases
|
||||
this.depthScale = mapGrid == null || !mapGrid.EnableDepthBuffer ? 0 :
|
||||
depthScale = mapGrid == null || !mapGrid.EnableDepthBuffer ? 0 :
|
||||
(float)Resolution.Height / (Resolution.Height + mapGrid.TileSize.Height * mapGrid.MaximumTerrainHeight);
|
||||
this.depthOffset = this.depthScale / 2;
|
||||
|
||||
depthOffset = depthScale / 2;
|
||||
}
|
||||
|
||||
public void BeginFrame(int2 scroll, float zoom)
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
readonly IMove move;
|
||||
readonly CPos targetCell;
|
||||
|
||||
public HarvestResource(Actor self, CPos targetcell)
|
||||
public HarvestResource(Actor self, CPos targetCell)
|
||||
{
|
||||
harv = self.Trait<Harvester>();
|
||||
harvInfo = self.Info.TraitInfo<HarvesterInfo>();
|
||||
@@ -36,7 +36,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
move = self.Trait<IMove>();
|
||||
claimLayer = self.World.WorldActor.Trait<ResourceClaimLayer>();
|
||||
resLayer = self.World.WorldActor.Trait<ResourceLayer>();
|
||||
this.targetCell = targetcell;
|
||||
this.targetCell = targetCell;
|
||||
}
|
||||
|
||||
protected override void OnFirstRun(Actor self)
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace OpenRA.Mods.Common.Graphics
|
||||
this.pos = pos;
|
||||
this.zOffset = zOffset;
|
||||
this.railgun = railgun;
|
||||
this.info = railgunInfo;
|
||||
info = railgunInfo;
|
||||
this.ticks = ticks;
|
||||
|
||||
helixRadius = info.HelixRadius + new WDist(ticks * info.HelixRadiusDeltaPerTick);
|
||||
@@ -59,7 +59,7 @@ namespace OpenRA.Mods.Common.Graphics
|
||||
var screenWidth = wr.ScreenVector(new WVec(info.HelixThickness.Length, 0, 0))[0];
|
||||
|
||||
// Move forward from self to target to draw helix
|
||||
var centerPos = this.pos;
|
||||
var centerPos = pos;
|
||||
var points = new float3[railgun.CycleCount * info.QuantizationCount];
|
||||
for (var i = points.Length - 1; i >= 0; i--)
|
||||
{
|
||||
|
||||
@@ -125,8 +125,8 @@ namespace OpenRA.Mods.Common.Projectiles
|
||||
this.info = info;
|
||||
target = args.PassiveTarget;
|
||||
|
||||
this.BeamColor = beamColor;
|
||||
this.HelixColor = helixColor;
|
||||
BeamColor = beamColor;
|
||||
HelixColor = helixColor;
|
||||
|
||||
if (!string.IsNullOrEmpty(info.HitAnim))
|
||||
hitanim = new Animation(args.SourceActor.World, info.HitAnim);
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public AttackFrontal(Actor self, AttackFrontalInfo info)
|
||||
: base(self, info)
|
||||
{
|
||||
this.Info = info;
|
||||
Info = info;
|
||||
}
|
||||
|
||||
protected override bool CanAttack(Actor self, Target target)
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public GrantExternalConditionToCrusher(Actor self, GrantExternalConditionToCrusherInfo info)
|
||||
{
|
||||
this.Info = info;
|
||||
Info = info;
|
||||
}
|
||||
|
||||
void INotifyCrushed.OnCrush(Actor self, Actor crusher, BitSet<CrushClass> crushClasses)
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public ModularBot(ModularBotInfo info, ActorInitializer init)
|
||||
{
|
||||
this.info = info;
|
||||
this.world = init.World;
|
||||
world = init.World;
|
||||
}
|
||||
|
||||
// Called by the host's player creation code
|
||||
|
||||
@@ -50,8 +50,8 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
centerPosition,
|
||||
range.Value,
|
||||
0,
|
||||
this.Color,
|
||||
this.BorderColor);
|
||||
Color,
|
||||
BorderColor);
|
||||
|
||||
var otherRanges = w.ActorsWithTrait<RenderRangeCircle>()
|
||||
.Where(a => a.Trait.Info.RangeCircleType == RangeCircleType)
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
void INotifyCreated.Created(Actor self)
|
||||
{
|
||||
this.worldNotifySelection = self.TraitsImplementing<INotifySelection>().ToArray();
|
||||
worldNotifySelection = self.TraitsImplementing<INotifySelection>().ToArray();
|
||||
}
|
||||
|
||||
void UpdateHash()
|
||||
|
||||
@@ -35,9 +35,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
|
||||
public CommonSelectorLogic(Widget widget, World world, WorldRenderer worldRenderer, string templateListId, string previewTemplateId)
|
||||
{
|
||||
this.Widget = widget;
|
||||
this.World = world;
|
||||
this.WorldRenderer = worldRenderer;
|
||||
Widget = widget;
|
||||
World = world;
|
||||
WorldRenderer = worldRenderer;
|
||||
Editor = widget.Parent.Get<EditorViewportControllerWidget>("MAP_EDITOR");
|
||||
Panel = widget.Get<ScrollPanelWidget>(templateListId);
|
||||
ItemTemplate = Panel.Get<ScrollItemWidget>(previewTemplateId);
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
public IngameChatLogic(Widget widget, OrderManager orderManager, World world, ModData modData, bool isMenuChat, Dictionary<string, MiniYaml> logicArgs)
|
||||
{
|
||||
this.orderManager = orderManager;
|
||||
this.modRules = modData.DefaultRules;
|
||||
modRules = modData.DefaultRules;
|
||||
|
||||
chatTraits = world.WorldActor.TraitsImplementing<INotifyChat>().ToArray();
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
this.skirmishMode = skirmishMode;
|
||||
|
||||
// TODO: This needs to be reworked to support per-map tech levels, bots, etc.
|
||||
this.modRules = modData.DefaultRules;
|
||||
modRules = modData.DefaultRules;
|
||||
shellmapWorld = worldRenderer.World;
|
||||
|
||||
services = modData.Manifest.Get<WebServices>();
|
||||
|
||||
@@ -104,7 +104,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
[ObjectCreator.UseCtor]
|
||||
public ScrollPanelWidget(ModData modData)
|
||||
{
|
||||
this.modRules = modData.DefaultRules;
|
||||
modRules = modData.DefaultRules;
|
||||
|
||||
Layout = new ListLayout(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user