allow custom icons on units
This commit is contained in:
@@ -57,7 +57,7 @@ namespace OpenRa.Game
|
||||
.Where(u => Rules.UnitInfo[u].TechLevel != -1)
|
||||
.ToDictionary(
|
||||
u => u,
|
||||
u => SpriteSheetBuilder.LoadAllSprites(u + "icon")[0]);
|
||||
u => SpriteSheetBuilder.LoadAllSprites(Rules.UnitInfo[u].Icon ?? (u + "icon"))[0]);
|
||||
|
||||
tabSprites = groups.Select(
|
||||
(g, i) => Pair.New(g,
|
||||
|
||||
@@ -51,6 +51,7 @@ namespace OpenRa.Game.GameRules
|
||||
public readonly int FireDelay = 0;
|
||||
public readonly string LongDesc = null;
|
||||
public readonly int OrePips = 0;
|
||||
public readonly string Icon = null;
|
||||
|
||||
public UnitInfo(string name) { Name = name; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user