Fix IDE0032

This commit is contained in:
RoosterDragon
2024-11-13 18:02:09 +00:00
committed by Pavel Penev
parent 9809f6ed08
commit ed90322a0b
4 changed files with 40 additions and 53 deletions

View File

@@ -267,10 +267,6 @@ namespace OpenRA.Mods.Common.Traits
INotifyAddedToWorld, INotifyRemovedFromWorld
{
public readonly BuildingInfo Info;
[Sync]
readonly CPos topLeft;
readonly Actor self;
readonly BuildingInfluence influence;
@@ -278,13 +274,14 @@ namespace OpenRA.Mods.Common.Traits
readonly (CPos, SubCell)[] targetableCells;
readonly CPos[] transitOnlyCells;
public CPos TopLeft => topLeft;
[Sync]
public CPos TopLeft { get; }
public WPos CenterPosition { get; }
public Building(ActorInitializer init, BuildingInfo info)
{
self = init.Self;
topLeft = init.GetValue<LocationInit, CPos>();
TopLeft = init.GetValue<LocationInit, CPos>();
Info = info;
influence = self.World.WorldActor.Trait<BuildingInfluence>();
@@ -296,7 +293,7 @@ namespace OpenRA.Mods.Common.Traits
transitOnlyCells = Info.TransitOnlyTiles(TopLeft).ToArray();
CenterPosition = init.World.Map.CenterOfCell(topLeft) + Info.CenterOffset(init.World);
CenterPosition = init.World.Map.CenterOfCell(TopLeft) + Info.CenterOffset(init.World);
}
public (CPos, SubCell)[] OccupiedCells() { return occupiedCells; }