Remove BuildingInfluence trait.

This commit is contained in:
Paul Chote
2020-10-08 09:10:31 +01:00
committed by Matthias Mailänder
parent b9dd59cd63
commit 72c82cb080
8 changed files with 35 additions and 62 deletions

View File

@@ -264,7 +264,6 @@ namespace OpenRA.Mods.Common.Traits
readonly CPos topLeft;
readonly Actor self;
readonly BuildingInfluence influence;
(CPos, SubCell)[] occupiedCells;
(CPos, SubCell)[] targetableCells;
@@ -278,7 +277,6 @@ namespace OpenRA.Mods.Common.Traits
self = init.Self;
topLeft = init.GetValue<LocationInit, CPos>();
Info = info;
influence = self.World.WorldActor.Trait<BuildingInfluence>();
occupiedCells = Info.OccupiedTiles(TopLeft)
.Select(c => (c, SubCell.FullCell)).ToArray();
@@ -308,13 +306,11 @@ namespace OpenRA.Mods.Common.Traits
RemoveSmudges();
self.World.AddToMaps(self, this);
influence.AddInfluence(self, Info.Tiles(self.Location));
}
void INotifyRemovedFromWorld.RemovedFromWorld(Actor self)
{
self.World.RemoveFromMaps(self, this);
influence.RemoveInfluence(self, Info.Tiles(self.Location));
}
void INotifySold.Selling(Actor self)