Clean up some warnings (#6088)
* Clean up some warnings * Remove nullable enable Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com> Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.IO;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
@@ -22,9 +22,9 @@ namespace Content.Tools
|
||||
Root = stream.Documents[0].RootNode;
|
||||
TilemapNode = (YamlMappingNode) Root["tilemap"];
|
||||
GridsNode = (YamlSequenceNode) Root["grids"];
|
||||
_entitiesNode = (YamlSequenceNode) Root["entities"];
|
||||
EntitiesNode = (YamlSequenceNode) Root["entities"];
|
||||
|
||||
foreach (var entity in _entitiesNode)
|
||||
foreach (var entity in EntitiesNode)
|
||||
{
|
||||
var uid = uint.Parse(entity["uid"].AsString());
|
||||
if (uid >= NextAvailableEntityId)
|
||||
@@ -47,7 +47,7 @@ namespace Content.Tools
|
||||
|
||||
// Entities lookup
|
||||
|
||||
private YamlSequenceNode _entitiesNode { get; }
|
||||
private YamlSequenceNode EntitiesNode { get; }
|
||||
|
||||
public Dictionary<uint, YamlMappingNode> Entities { get; } = new Dictionary<uint, YamlMappingNode>();
|
||||
|
||||
@@ -60,9 +60,9 @@ namespace Content.Tools
|
||||
public void Save(string fileName)
|
||||
{
|
||||
// Update entities node
|
||||
_entitiesNode.Children.Clear();
|
||||
EntitiesNode.Children.Clear();
|
||||
foreach (var kvp in Entities)
|
||||
_entitiesNode.Add(kvp.Value);
|
||||
EntitiesNode.Add(kvp.Value);
|
||||
|
||||
using var writer = new StreamWriter(fileName);
|
||||
var document = new YamlDocument(Root);
|
||||
|
||||
Reference in New Issue
Block a user