Require explicit INotifyAddedToWorld and INotifyRemovedFromWorld

This commit is contained in:
reaperrr
2017-09-27 23:50:30 +02:00
committed by abcdefg30
parent 8ec3d5ddb8
commit 8533debc44
17 changed files with 35 additions and 25 deletions

View File

@@ -295,7 +295,12 @@ namespace OpenRA.Mods.Common.Traits
NotifyBuildingComplete(self);
}
public virtual void AddedToWorld(Actor self)
void INotifyAddedToWorld.AddedToWorld(Actor self)
{
AddedToWorld(self);
}
protected virtual void AddedToWorld(Actor self)
{
if (Info.RemoveSmudgesOnBuild)
RemoveSmudges();

View File

@@ -114,7 +114,7 @@ namespace OpenRA.Mods.Common.Traits
return !self.IsDisabled() && BuildComplete && blocking.AppearsFriendlyTo(self);
}
public override void AddedToWorld(Actor self)
protected override void AddedToWorld(Actor self)
{
base.AddedToWorld(self);
blockedPositions = Info.Tiles(self.Location);