RCS0056 - roslynator_max_line_length = 160
This commit is contained in:
committed by
Matthias Mailänder
parent
9d5d2ab493
commit
0649f3dc32
@@ -78,7 +78,8 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
|
||||
void INotifyAttack.PreparingAttack(Actor self, in Target target, Armament a, Barrel barrel) { }
|
||||
|
||||
public override Activity GetAttackActivity(Actor self, AttackSource source, in Target newTarget, bool allowMove, bool forceAttack, Color? targetLineColor = null)
|
||||
public override Activity GetAttackActivity(
|
||||
Actor self, AttackSource source, in Target newTarget, bool allowMove, bool forceAttack, Color? targetLineColor = null)
|
||||
{
|
||||
return new ChargeAttack(this, newTarget, forceAttack, targetLineColor);
|
||||
}
|
||||
|
||||
@@ -102,7 +102,9 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return new TargetTypeOrderTargeter(new BitSet<TargetableType>("DetonateAttack"), "DetonateAttack", 5, info.AttackCursor, true, false) { ForceAttack = false };
|
||||
yield return
|
||||
new TargetTypeOrderTargeter(new BitSet<TargetableType>("DetonateAttack"), "DetonateAttack", 5, info.AttackCursor, true, false)
|
||||
{ ForceAttack = false };
|
||||
|
||||
if (!initiated)
|
||||
yield return new DeployOrderTargeter("Detonate", 5, () => info.DeployCursor);
|
||||
|
||||
@@ -19,7 +19,8 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Cnc.Traits.Render
|
||||
{
|
||||
public class WithVoxelBarrelInfo : ConditionalTraitInfo, IRenderActorPreviewVoxelsInfo, Requires<RenderVoxelsInfo>, Requires<ArmamentInfo>, Requires<TurretedInfo>
|
||||
public class WithVoxelBarrelInfo : ConditionalTraitInfo,
|
||||
IRenderActorPreviewVoxelsInfo, Requires<RenderVoxelsInfo>, Requires<ArmamentInfo>, Requires<TurretedInfo>
|
||||
{
|
||||
[Desc("Voxel sequence name to use")]
|
||||
public readonly string Sequence = "barrel";
|
||||
|
||||
@@ -19,7 +19,8 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Cnc.Traits.Render
|
||||
{
|
||||
public class WithVoxelWalkerBodyInfo : PausableConditionalTraitInfo, IRenderActorPreviewVoxelsInfo, Requires<RenderVoxelsInfo>, Requires<IMoveInfo>, Requires<IFacingInfo>
|
||||
public class WithVoxelWalkerBodyInfo : PausableConditionalTraitInfo,
|
||||
IRenderActorPreviewVoxelsInfo, Requires<RenderVoxelsInfo>, Requires<IMoveInfo>, Requires<IFacingInfo>
|
||||
{
|
||||
public readonly string Sequence = "idle";
|
||||
|
||||
|
||||
@@ -209,7 +209,8 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
var tiles = power.CellsMatching(xy, footprint, dimensions);
|
||||
var palette = wr.Palette(((ChronoshiftPowerInfo)power.Info).TargetOverlayPalette);
|
||||
foreach (var t in tiles)
|
||||
yield return new SpriteRenderable(tile, wr.World.Map.CenterOfCell(t), WVec.Zero, -511, palette, 1f, alpha, float3.Ones, TintModifiers.IgnoreWorldTint, true);
|
||||
yield return new SpriteRenderable(
|
||||
tile, wr.World.Map.CenterOfCell(t), WVec.Zero, -511, palette, 1f, alpha, float3.Ones, TintModifiers.IgnoreWorldTint, true);
|
||||
}
|
||||
|
||||
protected override string GetCursor(World world, CPos cell, int2 worldPixel, MouseInput mi)
|
||||
@@ -310,7 +311,8 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
var isValid = manager.Self.Owner.Shroud.IsExplored(t + delta);
|
||||
var tile = isValid ? validTile : invalidTile;
|
||||
var alpha = isValid ? validAlpha : invalidAlpha;
|
||||
yield return new SpriteRenderable(tile, wr.World.Map.CenterOfCell(t + delta), WVec.Zero, -511, palette, 1f, alpha, float3.Ones, TintModifiers.IgnoreWorldTint, true);
|
||||
yield return new SpriteRenderable(
|
||||
tile, wr.World.Map.CenterOfCell(t + delta), WVec.Zero, -511, palette, 1f, alpha, float3.Ones, TintModifiers.IgnoreWorldTint, true);
|
||||
}
|
||||
|
||||
// Unit previews
|
||||
@@ -323,7 +325,8 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
unit.Trait<Chronoshiftable>().CanChronoshiftTo(unit, targetCell);
|
||||
var tile = canEnter ? validTile : invalidTile;
|
||||
var alpha = canEnter ? validAlpha : invalidAlpha;
|
||||
yield return new SpriteRenderable(tile, wr.World.Map.CenterOfCell(targetCell), WVec.Zero, -511, palette, 1f, alpha, float3.Ones, TintModifiers.IgnoreWorldTint, true);
|
||||
yield return new SpriteRenderable(
|
||||
tile, wr.World.Map.CenterOfCell(targetCell), WVec.Zero, -511, palette, 1f, alpha, float3.Ones, TintModifiers.IgnoreWorldTint, true);
|
||||
}
|
||||
|
||||
var offset = world.Map.CenterOfCell(xy) - world.Map.CenterOfCell(sourceLocation);
|
||||
@@ -353,7 +356,8 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
|
||||
// Source tiles
|
||||
foreach (var t in power.CellsMatching(sourceLocation, footprint, dimensions))
|
||||
yield return new SpriteRenderable(sourceTile, wr.World.Map.CenterOfCell(t), WVec.Zero, -511, palette, 1f, sourceAlpha, float3.Ones, TintModifiers.IgnoreWorldTint, true);
|
||||
yield return new SpriteRenderable(
|
||||
sourceTile, wr.World.Map.CenterOfCell(t), WVec.Zero, -511, palette, 1f, sourceAlpha, float3.Ones, TintModifiers.IgnoreWorldTint, true);
|
||||
}
|
||||
|
||||
bool IsValidTarget(CPos xy)
|
||||
|
||||
@@ -47,7 +47,8 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
bool IOccupySpaceInfo.SharesCell => false;
|
||||
|
||||
// Used to determine if actor can spawn
|
||||
public bool CanEnterCell(World world, Actor self, CPos cell, SubCell subCell = SubCell.FullCell, Actor ignoreActor = null, BlockedByActor check = BlockedByActor.All)
|
||||
public bool CanEnterCell(World world, Actor self, CPos cell,
|
||||
SubCell subCell = SubCell.FullCell, Actor ignoreActor = null, BlockedByActor check = BlockedByActor.All)
|
||||
{
|
||||
return world.Map.Contains(cell);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user