Only search for palette definitions on the world actor
This commit is contained in:
committed by
Matthias Mailänder
parent
0bbcff973f
commit
97c96c46f4
@@ -121,9 +121,9 @@ namespace OpenRA.Mods.Common.Lint
|
||||
|
||||
void GetPalettes(Ruleset rules, List<string> palettes, List<string> playerPalettes)
|
||||
{
|
||||
foreach (var actorInfo in rules.Actors)
|
||||
{
|
||||
foreach (var traitInfo in actorInfo.Value.TraitInfos<TraitInfo>())
|
||||
// Palettes are only defined on the world actor
|
||||
var worldActorInfo = rules.Actors[SystemActors.World];
|
||||
foreach (var traitInfo in worldActorInfo.TraitInfos<TraitInfo>())
|
||||
{
|
||||
var fields = traitInfo.GetType().GetFields();
|
||||
foreach (var field in fields)
|
||||
@@ -144,5 +144,4 @@ namespace OpenRA.Mods.Common.Lint
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user