diff --git a/OpenRA.Mods.RA/Render/RenderBuildingSilo.cs b/OpenRA.Mods.RA/Render/RenderBuildingSilo.cs index 7b2114e972..80f9ccd3bc 100644 --- a/OpenRA.Mods.RA/Render/RenderBuildingSilo.cs +++ b/OpenRA.Mods.RA/Render/RenderBuildingSilo.cs @@ -1,6 +1,6 @@ #region Copyright & License Information /* - * Copyright 2007-2011 The OpenRA Developers (see AUTHORS) + * Copyright 2007-2014 The OpenRA Developers (see AUTHORS) * This file is part of OpenRA, which is free software. It is made * available to you under the terms of the GNU General Public License * as published by the Free Software Foundation. For more information, @@ -8,13 +8,25 @@ */ #endregion +using System.Collections.Generic; +using OpenRA.Graphics; using OpenRA.Traits; +using OpenRA.Mods.RA.Graphics; namespace OpenRA.Mods.RA.Render { class RenderBuildingSiloInfo : RenderBuildingInfo { public override object Create(ActorInitializer init) { return new RenderBuildingSilo(init, this); } + + public override IEnumerable RenderPreviewSprites(ActorPreviewInitializer init, RenderSpritesInfo rs, string image, int facings, PaletteReference p) + { + // Show a static frame instead of animating all of the fullness states + var anim = new Animation(init.World, image, () => 0); + anim.PlayFetchIndex("idle", () => 0); + + yield return new SpriteActorPreview(anim, WVec.Zero, 0, p, rs.Scale); + } } class RenderBuildingSilo : RenderBuilding, INotifyBuildComplete, INotifyCapture