Don't crash if two powers have the same icon.

This commit is contained in:
Paul Chote
2010-12-07 21:22:53 +13:00
parent c2a945b7ed
commit 55d60bd466

View File

@@ -38,9 +38,10 @@ namespace OpenRA.Mods.RA.Widgets
if (spsprites == null)
spsprites = Rules.Info.Values.SelectMany( u => u.Traits.WithInterface<SupportPowerInfo>() )
.Select(u => u.Image).Distinct()
.ToDictionary(
u => u.Image,
u => SpriteSheetBuilder.LoadAllSprites(u.Image)[0]);
u => u,
u => SpriteSheetBuilder.LoadAllSprites(u)[0]);
ready = new Animation("pips");
ready.PlayRepeating("ready");