Don't crash if two powers have the same icon.
This commit is contained in:
@@ -38,9 +38,10 @@ namespace OpenRA.Mods.RA.Widgets
|
|||||||
|
|
||||||
if (spsprites == null)
|
if (spsprites == null)
|
||||||
spsprites = Rules.Info.Values.SelectMany( u => u.Traits.WithInterface<SupportPowerInfo>() )
|
spsprites = Rules.Info.Values.SelectMany( u => u.Traits.WithInterface<SupportPowerInfo>() )
|
||||||
|
.Select(u => u.Image).Distinct()
|
||||||
.ToDictionary(
|
.ToDictionary(
|
||||||
u => u.Image,
|
u => u,
|
||||||
u => SpriteSheetBuilder.LoadAllSprites(u.Image)[0]);
|
u => SpriteSheetBuilder.LoadAllSprites(u)[0]);
|
||||||
|
|
||||||
ready = new Animation("pips");
|
ready = new Animation("pips");
|
||||||
ready.PlayRepeating("ready");
|
ready.PlayRepeating("ready");
|
||||||
|
|||||||
Reference in New Issue
Block a user