Fix RCS1061

This commit is contained in:
RoosterDragon
2023-03-18 12:16:52 +00:00
committed by Gustas
parent 5d91b678bb
commit 4dd787be13
32 changed files with 167 additions and 210 deletions

View File

@@ -40,9 +40,8 @@ namespace OpenRA.Mods.Common.Lint
if (!playerNames.Contains(ownerName))
emitError($"Actor `{kv.Key}` is owned by unknown player `{ownerName}`.");
if (actorsWithRequiredOwner.TryGetValue(kv.Value.Value, out var info))
if (!info.ValidOwnerNames.Contains(ownerName))
emitError($"Actor `{kv.Key}` owner `{ownerName}` is not one of ValidOwnerNames: {info.ValidOwnerNames.JoinWith(", ")}");
if (actorsWithRequiredOwner.TryGetValue(kv.Value.Value, out var info) && !info.ValidOwnerNames.Contains(ownerName))
emitError($"Actor `{kv.Key}` owner `{ownerName}` is not one of ValidOwnerNames: {info.ValidOwnerNames.JoinWith(", ")}");
}
}
}