Fix RCS1170

This commit is contained in:
RoosterDragon
2023-03-18 13:05:26 +00:00
committed by Gustas
parent fbe147ce61
commit 25cb3728ca
4 changed files with 7 additions and 5 deletions

View File

@@ -1061,6 +1061,9 @@ dotnet_diagnostic.RCS1159.severity = warning
# Unused type parameter.
dotnet_diagnostic.RCS1164.severity = warning
# Use read-only auto-implemented property.
dotnet_diagnostic.RCS1170.severity = warning
# Use 'is' operator instead of 'as' operator.
dotnet_diagnostic.RCS1172.severity = warning

View File

@@ -71,7 +71,7 @@ namespace OpenRA
public IEffectiveOwner EffectiveOwner { get; }
public IOccupySpace OccupiesSpace { get; }
public ITargetable[] Targetables { get; }
public IEnumerable<ITargetablePositions> EnabledTargetablePositions { get; private set; }
public IEnumerable<ITargetablePositions> EnabledTargetablePositions { get; }
public bool IsIdle => CurrentActivity == null;
public bool IsDead => Disposed || (health != null && health.IsDead);

View File

@@ -29,6 +29,8 @@ namespace OpenRA.Mods.Common.Widgets
public int AnimationLength = 5;
public string RadarOnlineSound = null;
public string RadarOfflineSound = null;
public string SoundUp;
public string SoundDown;
public Func<bool> IsEnabled = () => true;
public Action AfterOpen = () => { };
public Action AfterClose = () => { };
@@ -63,9 +65,6 @@ namespace OpenRA.Mods.Common.Widgets
PlayerRadarTerrain playerRadarTerrain;
Player currentPlayer;
public string SoundUp { get; private set; }
public string SoundDown { get; private set; }
[ObjectCreator.UseCtor]
public RadarWidget(World world, WorldRenderer worldRenderer)
{

View File

@@ -44,7 +44,7 @@ namespace OpenRA.Mods.Common.Widgets
}
}
public Size IdealPreviewSize { get; private set; }
public Size IdealPreviewSize { get; }
[ObjectCreator.UseCtor]
public ResourcePreviewWidget(ModData modData, WorldRenderer worldRenderer, World world)