mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-09-26 23:40:46 +00:00
Simplefied XMLVERSION check in PCKFileReader/Writer
This commit is contained in:
@@ -40,14 +40,12 @@ namespace PckStudio.Classes.IO
|
||||
internal void WriteMetaEntries(Stream stream)
|
||||
{
|
||||
WriteInt(stream, _file.meta_data.Count);
|
||||
bool has_xmlverion_tag = false;
|
||||
foreach (var metaEntry in _file.meta_data)
|
||||
_file.meta_data.ForEach(entry =>
|
||||
{
|
||||
if (metaEntry == "XMLVERSION") has_xmlverion_tag = true;
|
||||
WriteInt(stream, _file.meta_data.IndexOf(metaEntry));
|
||||
WriteString(stream, metaEntry);
|
||||
}
|
||||
if (has_xmlverion_tag)
|
||||
WriteInt(stream, _file.meta_data.IndexOf(entry));
|
||||
WriteString(stream, entry);
|
||||
});
|
||||
if (_file.meta_data.Contains("XMLVERSION"))
|
||||
WriteInt(stream, 0x1337); // :^)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user