fix warnings; fix small bug in Bullet; fix impossible prereqs

This commit is contained in:
Chris Forbes
2010-01-08 12:18:31 +13:00
parent 69da6fdd2d
commit 49774e022d
8 changed files with 123 additions and 117 deletions

View File

@@ -703,7 +703,10 @@ namespace OpenRa.Game
p += new int2(0, 15);
if (!Rules.TechTree.CanBuild(info, Game.LocalPlayer, buildings))
{
var prereqs = info.Prerequisite.Select(a => Rules.UnitInfo[a.ToLowerInvariant()].Description);
var prereqs = info.Prerequisite
.Select(a => Rules.UnitInfo[a.ToLowerInvariant()])
.Where( u => u.Owner.Any( o => o == Game.LocalPlayer.Race ) )
.Select( a => a.Description );
renderer.DrawText("Requires {0}".F( string.Join( ", ", prereqs.ToArray() ) ), p.ToInt2(),
Color.White);
}