diff --git a/Robust.Shared/Prototypes/PrototypeManager.cs b/Robust.Shared/Prototypes/PrototypeManager.cs index faedc0dcb..94a35c4e3 100644 --- a/Robust.Shared/Prototypes/PrototypeManager.cs +++ b/Robust.Shared/Prototypes/PrototypeManager.cs @@ -60,7 +60,7 @@ namespace Robust.Shared.Prototypes /// IPrototype Index(Type type, string id); bool HasIndex(string id) where T : IPrototype; - bool TryIndex(string id, out T prototype) where T : IPrototype; + bool TryIndex(string id, [NotNullWhen(true)] out T? prototype) where T : IPrototype; /// /// Load prototypes from files in a directory, recursively. @@ -464,7 +464,7 @@ namespace Robust.Shared.Prototypes return index.ContainsKey(id); } - public bool TryIndex(string id, [MaybeNullWhen(false)] out T prototype) where T : IPrototype + public bool TryIndex(string id, [NotNullWhen(true)] out T? prototype) where T : IPrototype { if (!prototypes.TryGetValue(typeof(T), out var index)) {