mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-07-12 10:48:09 +00:00
Simplefied XMLVERSION check in PCKFileReader/Writer
This commit is contained in:
@@ -32,16 +32,14 @@ namespace PckStudio.Classes.IO
|
||||
internal void ReadMetaData(Stream stream)
|
||||
{
|
||||
int meta_entry_count = ReadInt(stream);
|
||||
bool has_xml_tag = false;
|
||||
_file.meta_data.Capacity = meta_entry_count;
|
||||
for (; 0 < meta_entry_count; meta_entry_count--)
|
||||
{
|
||||
int index = ReadInt(stream);
|
||||
string value = ReadString(stream);
|
||||
if (value.Equals("XMLVERSION")) has_xml_tag = true;
|
||||
_file.meta_data.Insert(index, value);
|
||||
}
|
||||
if (has_xml_tag)
|
||||
if (_file.meta_data.Contains("XMLVERSION"))
|
||||
Console.WriteLine(ReadInt(stream)); // xml version num ??
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user