Fix bad uses of FirstEnabledTraitOrDefault on TraitInfos.
These are not traits so this method does not work. We can use EnabledByDefault on the ConditionalTraitInfo instead.
This commit is contained in:
committed by
Paul Chote
parent
7a7eed4fb7
commit
5338784e45
@@ -26,7 +26,7 @@ namespace OpenRA.Mods.Common.Lint
|
||||
if (buildable == null)
|
||||
continue;
|
||||
|
||||
var tooltip = actorInfo.Value.TraitInfos<TooltipInfo>().FirstEnabledTraitOrDefault();
|
||||
var tooltip = actorInfo.Value.TraitInfos<TooltipInfo>().FirstOrDefault(info => info.EnabledByDefault);
|
||||
if (tooltip == null)
|
||||
emitError("The following buildable actor has no (enabled) Tooltip: " + actorInfo.Key);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user