Changes needed for new notnullableflaganalyzer (#12957)

This commit is contained in:
Paul Ritter
2022-12-11 00:19:37 +01:00
committed by GitHub
parent 95358f3b66
commit 5715b0c2be
4 changed files with 6 additions and 6 deletions

View File

@@ -40,7 +40,7 @@ public sealed class DamageSpecifierDictionarySerializer : ITypeReader<Dictionary
// Add all the damage types by just copying the type dictionary (if it is not null).
if (node.TryGet("types", out var typesNode))
{
serializationManager.Read(typesNode, instanceProvider: () => dict);
serializationManager.Read(typesNode, instanceProvider: () => dict, notNullableOverride: true);
}
if (!node.TryGet("groups", out var groupsNode))
@@ -48,7 +48,7 @@ public sealed class DamageSpecifierDictionarySerializer : ITypeReader<Dictionary
// Then resolve damage groups and add them
var prototypeManager = dependencies.Resolve<IPrototypeManager>();
foreach (var entry in serializationManager.Read<Dictionary<string, FixedPoint2>>(groupsNode))
foreach (var entry in serializationManager.Read<Dictionary<string, FixedPoint2>>(groupsNode, notNullableOverride: true))
{
if (!prototypeManager.TryIndex<DamageGroupPrototype>(entry.Key, out var group))
{