Changes needed for new notnullableflaganalyzer (#12957)
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user