RCS0056 - roslynator_max_line_length = 180

This commit is contained in:
RoosterDragon
2024-01-13 20:59:33 +00:00
committed by Matthias Mailänder
parent 822a29aa76
commit 9d5d2ab493
66 changed files with 338 additions and 97 deletions

View File

@@ -60,7 +60,8 @@ namespace OpenRA.Mods.Common.Traits.Render
var body = init.Self.TraitOrDefault<BodyOrientation>();
var facing = init.Self.TraitOrDefault<IFacing>();
overlay = new Animation(init.World, renderSprites.GetImage(init.Self), facing == null ? () => WAngle.Zero : (body == null ? () => facing.Facing : () => body.QuantizeFacing(facing.Facing)))
overlay = new Animation(init.World, renderSprites.GetImage(init.Self),
facing == null ? () => WAngle.Zero : (body == null ? () => facing.Facing : () => body.QuantizeFacing(facing.Facing)))
{
IsDecoration = info.IsDecoration
};

View File

@@ -95,7 +95,9 @@ namespace OpenRA.Mods.Common.Traits.Render
var facing = self.TraitOrDefault<IFacing>();
var image = info.Image ?? rs.GetImage(self);
overlay = new Animation(self.World, image, facing == null ? () => WAngle.Zero : (body == null ? () => facing.Facing : () => body.QuantizeFacing(facing.Facing)), () => IsTraitPaused)
overlay = new Animation(self.World, image,
facing == null ? () => WAngle.Zero : (body == null ? () => facing.Facing : () => body.QuantizeFacing(facing.Facing)),
() => IsTraitPaused)
{
IsDecoration = info.IsDecoration
};

View File

@@ -18,7 +18,8 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits.Render
{
[Desc("Play an animation when a unit exits or blocks the exit after production finished.")]
sealed class WithProductionDoorOverlayInfo : ConditionalTraitInfo, IRenderActorPreviewSpritesInfo, Requires<RenderSpritesInfo>, Requires<BodyOrientationInfo>, Requires<BuildingInfo>
sealed class WithProductionDoorOverlayInfo : ConditionalTraitInfo,
IRenderActorPreviewSpritesInfo, Requires<RenderSpritesInfo>, Requires<BodyOrientationInfo>, Requires<BuildingInfo>
{
[SequenceReference]
public readonly string Sequence = "build-door";

View File

@@ -137,7 +137,11 @@ namespace OpenRA.Mods.Common.Traits.Render
var anim = new AnimationWithOffset(overlay,
() => body.LocalToWorld(info.Offset.Rotate(body.QuantizeOrientation(self.Orientation))),
() => IsTraitDisabled || (Info.SwitchingSequence == null && chargeSpeed != 0) || (Info.EnabledSequence == null && switchingLevel > Info.SwitchingLevel) || (Info.DisabledSequence == null && switchingLevel < 0),
() =>
IsTraitDisabled ||
(Info.SwitchingSequence == null && chargeSpeed != 0) ||
(Info.EnabledSequence == null && switchingLevel > Info.SwitchingLevel) ||
(Info.DisabledSequence == null && switchingLevel < 0),
p => RenderUtils.ZOffsetFromCenter(self, p, 1));
rs.Add(anim, info.Palette, info.IsPlayerPalette);