Fix IDE0032
This commit is contained in:
committed by
Pavel Penev
parent
9809f6ed08
commit
ed90322a0b
@@ -31,18 +31,12 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
sealed class Immobile : IOccupySpace, ISync, INotifyAddedToWorld, INotifyRemovedFromWorld
|
||||
{
|
||||
[Sync]
|
||||
readonly CPos location;
|
||||
|
||||
[Sync]
|
||||
readonly WPos position;
|
||||
|
||||
readonly (CPos, SubCell)[] occupied;
|
||||
|
||||
public Immobile(ActorInitializer init, ImmobileInfo info)
|
||||
{
|
||||
location = init.GetValue<LocationInit, CPos>();
|
||||
position = init.World.Map.CenterOfCell(location);
|
||||
TopLeft = init.GetValue<LocationInit, CPos>();
|
||||
CenterPosition = init.World.Map.CenterOfCell(TopLeft);
|
||||
|
||||
if (info.OccupiesSpace)
|
||||
occupied = new[] { (TopLeft, SubCell.FullCell) };
|
||||
@@ -50,8 +44,10 @@ namespace OpenRA.Mods.Common.Traits
|
||||
occupied = Array.Empty<(CPos, SubCell)>();
|
||||
}
|
||||
|
||||
public CPos TopLeft => location;
|
||||
public WPos CenterPosition => position;
|
||||
[Sync]
|
||||
public CPos TopLeft { get; }
|
||||
[Sync]
|
||||
public WPos CenterPosition { get; }
|
||||
public (CPos, SubCell)[] OccupiedCells() { return occupied; }
|
||||
|
||||
void INotifyAddedToWorld.AddedToWorld(Actor self)
|
||||
|
||||
Reference in New Issue
Block a user