Fix prototype flag add not actually working (#5376)

tryindex was inverted and causing issues with tools.
This commit is contained in:
metalgearsloth
2024-08-25 20:03:09 +10:00
committed by GitHub
parent 679c31199d
commit 3014d9880e

View File

@@ -45,7 +45,7 @@ namespace Robust.Shared.Utility
/// <returns>Whether the flag was added or not.</returns>
public bool Add(string flag, IPrototypeManager prototypeManager)
{
return !prototypeManager.TryIndex<T>(flag, out _) && _flags.Add(flag);
return prototypeManager.HasIndex<T>(flag) && _flags.Add(flag);
}
internal void UnionWith(PrototypeFlags<T> flags)