Changes needed for new notnullableflaganalyzer (#12957)
This commit is contained in:
@@ -295,7 +295,7 @@ namespace Content.Client.Actions
|
||||
if (!map.TryGet("action", out var actionNode))
|
||||
continue;
|
||||
|
||||
var action = _serialization.Read<ActionType>(actionNode);
|
||||
var action = _serialization.Read<ActionType>(actionNode, notNullableOverride: true);
|
||||
|
||||
if (PlayerActions.Actions.TryGetValue(action, out var existingAction))
|
||||
{
|
||||
@@ -310,7 +310,7 @@ namespace Content.Client.Actions
|
||||
if (!map.TryGet("assignments", out var assignmentNode))
|
||||
continue;
|
||||
|
||||
var nodeAssignments = _serialization.Read<List<(byte Hotbar, byte Slot)>>(assignmentNode);
|
||||
var nodeAssignments = _serialization.Read<List<(byte Hotbar, byte Slot)>>(assignmentNode, notNullableOverride: true);
|
||||
|
||||
foreach (var index in nodeAssignments)
|
||||
{
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace Content.Client.Changelog
|
||||
return new List<ChangelogEntry>();
|
||||
|
||||
var node = (MappingDataNode)yamlData.Documents[0].RootNode.ToDataNode();
|
||||
return _serialization.Read<List<ChangelogEntry>>(node["Entries"]);
|
||||
return _serialization.Read<List<ChangelogEntry>>(node["Entries"], notNullableOverride: true);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Content.Shared.Decals
|
||||
IDependencyCollection dependencies, bool skipHook, ISerializationContext? context = null,
|
||||
ISerializationManager.InstantiationDelegate<DecalGridComponent.DecalGridChunkCollection>? _ = default)
|
||||
{
|
||||
var dictionary = serializationManager.Read<Dictionary<Vector2i, Dictionary<uint, Decal>>>(node, context, skipHook);
|
||||
var dictionary = serializationManager.Read<Dictionary<Vector2i, Dictionary<uint, Decal>>>(node, context, skipHook, notNullableOverride: true);
|
||||
|
||||
var uids = new SortedSet<uint>();
|
||||
var uidChunkMap = new Dictionary<uint, Vector2i>();
|
||||
|
||||
Reference in New Issue
Block a user