Removed TagType.EMPTY
This commit is contained in:
parent
9dc282253d
commit
452c5d3177
@ -120,8 +120,9 @@ public class RegionConverter
|
|||||||
currentTags.TryAdd(Tag.TagType.id, Convert.ToUInt64(wayReader.GetAttribute("id")!));
|
currentTags.TryAdd(Tag.TagType.id, Convert.ToUInt64(wayReader.GetAttribute("id")!));
|
||||||
if (wayReader.Name == "tag")
|
if (wayReader.Name == "tag")
|
||||||
{
|
{
|
||||||
Tag wayTag = Tag.ConvertToTag(wayReader.GetAttribute("k")!, wayReader.GetAttribute("v")!);
|
Tag? wayTag = Tag.ConvertToTag(wayReader.GetAttribute("k")!, wayReader.GetAttribute("v")!);
|
||||||
currentTags.TryAdd(wayTag.key, wayTag.value);
|
if(wayTag is not null)
|
||||||
|
currentTags.TryAdd(wayTag.key, wayTag.value);
|
||||||
}
|
}
|
||||||
else if (wayReader.Name == "nd")
|
else if (wayReader.Name == "nd")
|
||||||
{
|
{
|
||||||
@ -193,8 +194,13 @@ public class RegionConverter
|
|||||||
string tagsRegionPath = Path.Combine(outputPath, regionHash.ToString(), tagsFileName);
|
string tagsRegionPath = Path.Combine(outputPath, regionHash.ToString(), tagsFileName);
|
||||||
regionTagsFileStreams.Add(regionHash, new FileStream(tagsRegionPath, FileMode.OpenOrCreate));
|
regionTagsFileStreams.Add(regionHash, new FileStream(tagsRegionPath, FileMode.OpenOrCreate));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ulong id = currentTags[Tag.TagType.id];
|
||||||
|
TagManager tm = new TagManager();
|
||||||
|
foreach(KeyValuePair<Tag.TagType, dynamic> kv in currentTags)
|
||||||
|
tm.AddTag(id, kv);
|
||||||
#pragma warning disable SYSLIB0011
|
#pragma warning disable SYSLIB0011
|
||||||
bFormatter.Serialize(regionTagsFileStreams[regionHash], currentTags);
|
bFormatter.Serialize(regionTagsFileStreams[regionHash], tm);
|
||||||
#pragma warning restore SYSLIB0011
|
#pragma warning restore SYSLIB0011
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user