Fixed item tags & aliases not being taken into account when determining target validity in StatusEffect.Apply. Closes #316

This commit is contained in:
Joonas Rikkonen
2018-03-06 11:25:25 +02:00
parent 8c04722385
commit f5af432ad9
3 changed files with 33 additions and 1 deletions
@@ -694,6 +694,16 @@ namespace Barotrauma
return (tags.Contains(tag) || tags.Contains(tag.ToLowerInvariant()));
}
public bool HasTag(IEnumerable<string> allowedTags)
{
if (allowedTags == null) return true;
foreach (string tag in allowedTags)
{
if (tags.Contains(tag) || tags.Contains(tag.ToLowerInvariant())) return true;
}
return false;
}
public void ApplyStatusEffects(ActionType type, float deltaTime, Character character = null, bool isNetworkEvent = false)
{