diff --git a/OpenRa.Game/Traits/Activities/Sell.cs b/OpenRa.Game/Traits/Activities/Sell.cs index f4286273ba..0c74d5cd07 100644 --- a/OpenRa.Game/Traits/Activities/Sell.cs +++ b/OpenRa.Game/Traits/Activities/Sell.cs @@ -1,4 +1,4 @@ -#region Copyright & License Information +#region Copyright & License Information /* * Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford. * This file is part of OpenRA. @@ -48,7 +48,7 @@ namespace OpenRa.Traits.Activities { if( !started ) { - framesRemaining = self.traits.Get().anim.GetSequence( "make" ).Length; + framesRemaining = (self.Info.Traits.Get().HasMakeAnimation) ? self.traits.Get().anim.GetSequence( "make" ).Length : 0; foreach( var ns in self.traits.WithInterface() ) ns.Selling( self ); diff --git a/OpenRa.Game/Traits/Render/RenderBuilding.cs b/OpenRa.Game/Traits/Render/RenderBuilding.cs index 32610e9744..cf6adf91ca 100644 --- a/OpenRa.Game/Traits/Render/RenderBuilding.cs +++ b/OpenRa.Game/Traits/Render/RenderBuilding.cs @@ -1,4 +1,4 @@ -#region Copyright & License Information +#region Copyright & License Information /* * Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford. * This file is part of OpenRA. @@ -25,6 +25,7 @@ namespace OpenRa.Traits { public class RenderBuildingInfo : RenderSimpleInfo { + public readonly bool HasMakeAnimation = true; public override object Create(Actor self) { return new RenderBuilding(self);} } @@ -39,8 +40,8 @@ namespace OpenRa.Traits public RenderBuilding(Actor self, Func baseFacing) : base(self, baseFacing) - { - if( Game.skipMakeAnims ) + { + if( Game.skipMakeAnims || !self.Info.Traits.Get().HasMakeAnimation ) Complete( self ); else anim.PlayThen( "make", () => self.World.AddFrameEndTask( _ => Complete( self ) ) ); @@ -124,7 +125,9 @@ namespace OpenRa.Traits public void Selling( Actor self ) { - anim.PlayBackwardsThen( "make", null ); + if( !Game.skipMakeAnims && self.Info.Traits.Get().HasMakeAnimation ) + anim.PlayBackwardsThen( "make", null ); + Sound.PlayToPlayer(self.Owner, "cashturn.aud"); } diff --git a/mods/ra/defaults.yaml b/mods/ra/defaults.yaml index 0c587dcd7f..41d8b23895 100644 --- a/mods/ra/defaults.yaml +++ b/mods/ra/defaults.yaml @@ -57,6 +57,7 @@ Wall: Selectable: RenderBuildingWall: + HasMakeAnimation: false Palette: terrain DamageStates: 2 diff --git a/mods/ra/sequences.xml b/mods/ra/sequences.xml index ca9069b1f1..bfb1ceb239 100644 --- a/mods/ra/sequences.xml +++ b/mods/ra/sequences.xml @@ -864,32 +864,26 @@ - - - - - - \ No newline at end of file