fixes WEAP roof when selling.

This commit is contained in:
Bob
2010-01-18 17:24:05 +13:00
parent 18e46bb886
commit b54aedc287
5 changed files with 33 additions and 9 deletions

View File

@@ -9,7 +9,7 @@ namespace OpenRa.Traits
public object Create(Actor self) { return new RenderWarFactory(self); }
}
class RenderWarFactory : INotifyBuildComplete, INotifyDamage, ITick, INotifyProduction
class RenderWarFactory : INotifyBuildComplete, INotifyDamage, ITick, INotifyProduction, INotifySold
{
public Animation roof;
[Sync]
@@ -59,5 +59,12 @@ namespace OpenRa.Traits
{
roof.PlayThen(GetPrefix(self) + "build-top", () => isOpen = true);
}
public void Selling( Actor self )
{
self.traits.Get<RenderSimple>().anims.Remove( "roof" );
}
public void Sold( Actor self ) { }
}
}