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)
|
void GetPalettes(Ruleset rules, List<string> palettes, List<string> playerPalettes)
|
||||||
{
|
{
|
||||||
foreach (var actorInfo in rules.Actors)
|
// Palettes are only defined on the world actor
|
||||||
{
|
var worldActorInfo = rules.Actors[SystemActors.World];
|
||||||
foreach (var traitInfo in actorInfo.Value.TraitInfos<TraitInfo>())
|
foreach (var traitInfo in worldActorInfo.TraitInfos<TraitInfo>())
|
||||||
{
|
{
|
||||||
var fields = traitInfo.GetType().GetFields();
|
var fields = traitInfo.GetType().GetFields();
|
||||||
foreach (var field in fields)
|
foreach (var field in fields)
|
||||||
@@ -145,4 +145,3 @@ namespace OpenRA.Mods.Common.Lint
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user