Use read-only autoimplemented property when possible

This commit is contained in:
Eduardo Cáceres
2022-05-02 13:06:21 +02:00
committed by atlimit8
parent 79f321cb44
commit 7eb64ea6fc
52 changed files with 113 additions and 113 deletions

View File

@@ -65,9 +65,9 @@ namespace OpenRA
public int Generation;
public Actor ReplacedByActor;
public IEffectiveOwner EffectiveOwner { get; private set; }
public IOccupySpace OccupiesSpace { get; private set; }
public ITargetable[] Targetables { get; private set; }
public IEffectiveOwner EffectiveOwner { get; }
public IOccupySpace OccupiesSpace { get; }
public ITargetable[] Targetables { get; }
public bool IsIdle => CurrentActivity == null;
public bool IsDead => Disposed || (health != null && health.IsDead);
@@ -102,7 +102,7 @@ namespace OpenRA
/// <summary>Read-only version of conditionCache that is passed to IConditionConsumers.</summary>
readonly IReadOnlyDictionary<string, int> readOnlyConditionCache;
internal SyncHash[] SyncHashes { get; private set; }
internal SyncHash[] SyncHashes { get; }
readonly IFacing facing;
readonly IHealth health;