System actors can have no traits

This commit is contained in:
Gustas
2025-07-27 21:44:28 +03:00
committed by Matthias Mailänder
parent f0ec8105b3
commit a66feafa3f

View File

@@ -34,7 +34,7 @@ namespace OpenRA.Mods.Common.Lint
try
{
var hasTraits = actorInfo.Value.TraitsInConstructOrder().Any();
if (!hasTraits)
if (!hasTraits && !Enum.TryParse<SystemActors>(actorInfo.Key, true, out _))
emitWarning($"Actor `{actorInfo.Key}` has no traits. Is this intended?");
}
catch (Exception e)