Disable WithBuildingPlacedAnimation while selling.
This commit is contained in:
@@ -22,7 +22,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
|||||||
public object Create(ActorInitializer init) { return new WithBuildingPlacedAnimation(init.Self, this); }
|
public object Create(ActorInitializer init) { return new WithBuildingPlacedAnimation(init.Self, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class WithBuildingPlacedAnimation : INotifyBuildingPlaced, INotifyBuildComplete
|
public class WithBuildingPlacedAnimation : INotifyBuildingPlaced, INotifyBuildComplete, INotifySold, INotifyTransform
|
||||||
{
|
{
|
||||||
readonly WithBuildingPlacedAnimationInfo info;
|
readonly WithBuildingPlacedAnimationInfo info;
|
||||||
readonly WithSpriteBody wsb;
|
readonly WithSpriteBody wsb;
|
||||||
@@ -40,6 +40,20 @@ namespace OpenRA.Mods.Common.Traits.Render
|
|||||||
buildComplete = true;
|
buildComplete = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Sold(Actor self) { }
|
||||||
|
public void Selling(Actor self)
|
||||||
|
{
|
||||||
|
buildComplete = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void BeforeTransform(Actor self)
|
||||||
|
{
|
||||||
|
buildComplete = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnTransform(Actor self) { }
|
||||||
|
public void AfterTransform(Actor self) { }
|
||||||
|
|
||||||
public void BuildingPlaced(Actor self)
|
public void BuildingPlaced(Actor self)
|
||||||
{
|
{
|
||||||
if (buildComplete)
|
if (buildComplete)
|
||||||
|
|||||||
Reference in New Issue
Block a user