Fix wildcard automations being shown in the UI as active even if the characters triggering it had exact matches already

This commit is contained in:
MTVirux 2025-11-22 15:21:31 +00:00
parent 9c616f1242
commit 9a72928749

View file

@ -241,7 +241,30 @@ public class SetSelector : IDisposable
{
var actorNameStr = actorId.PlayerName.ToString();
if (regex.IsMatch(actorNameStr))
{
// Don't show wildcard match as active if the actor already has an exact match automation
var hasExactMatch = false;
foreach (var designSet in _manager)
{
if (!designSet.Enabled)
continue;
foreach (var otherId in designSet.Identifiers)
{
if (otherId.Equals(actorId))
{
hasExactMatch = true;
break;
}
}
if (hasExactMatch)
break;
}
if (hasExactMatch)
continue;
return true;
}
}
}
}