WEAF roof fixed

This commit is contained in:
Chris Forbes
2009-10-11 09:32:24 +13:00
parent f79d52be6a
commit a9af3be206
2 changed files with 6 additions and 40 deletions

View File

@@ -88,7 +88,6 @@ namespace OpenRa.Game
case "tsla":
case "ftur":
case "facf":
case "weaf":
case "syrf":
case "spef":
case "domf":
@@ -96,6 +95,7 @@ namespace OpenRa.Game
traits.Add( new Traits.RenderBuilding( this ) );
break;
case "weap":
case "weaf":
traits.Add( new Traits.Building( this ) );
traits.Add( new Traits.RenderWarFactory( this ) );
break;
@@ -206,7 +206,7 @@ namespace OpenRa.Game
public RenderWarFactory( Actor self )
: base( self )
{
roof = new Animation( self.unitInfo.Name );
roof = new Animation( self.unitInfo.Image ?? self.unitInfo.Name );
anim.PlayThen( "make", () =>
{
doneBuilding = true;
@@ -458,39 +458,5 @@ namespace OpenRa.Game
yield return Pair.New( Image, 24 * (float2)self.Location );
}
}
//class WarFactory : Building
//{
// Animation roof;
// public WarFactory( int2 location, Player owner, Game game )
// : base( "weap", location, owner, game )
// {
// animation.PlayThen( "make", () =>
// {
// roof = new Animation( "weap" );
// animation.PlayRepeating( "idle" );
// roof.PlayRepeating( "idle-top" );
// } );
// }
// public override IEnumerable<Pair<Sprite, float2>> CurrentImages
// {
// get
// {
// return ( roof == null )
// ? base.CurrentImages
// : ( base.CurrentImages.Concat(
// new[] { Pair.New( roof.Image, 24 * (float2)location ) } ) );
// }
// }
// public override void Tick( Game game, int t )
// {
// base.Tick( game, t );
// if( roof != null ) roof.Tick( t );
// }
//}
}
}

View File

@@ -8,7 +8,7 @@ namespace OpenRa.Game.Graphics
{
class OverlayRenderer
{
static string[] overlaySpriteNames = new string[]
static string[] overlaySpriteNames =
{
"sbag", "cycl", "brik", "fenc", "wood",
"gold01", "gold02", "gold03", "gold04",
@@ -16,7 +16,7 @@ namespace OpenRa.Game.Graphics
"v12", "v13", "v14", "v15", "v16", "v17", "v18",
"fpls", "wcrate", "scrate", "barb", "sbag",
};
static bool[] overlayIsFence = new bool[]
static bool[] overlayIsFence =
{
true, true, true, true, true,
false, false, false, false,
@@ -25,7 +25,7 @@ namespace OpenRa.Game.Graphics
false, false, false, true, true,
};
static bool[] overlayIsOre = new bool[]
static bool[] overlayIsOre =
{
false, false, false, false, false,
true, true, true, true,
@@ -34,7 +34,7 @@ namespace OpenRa.Game.Graphics
false, false, false, false, false,
};
static bool[] overlayIsGems = new bool[]
static bool[] overlayIsGems =
{
false, false, false, false, false,
false, false, false, false,