From 40e57a62a595f28081b4f75359f7a6edec4fa731 Mon Sep 17 00:00:00 2001 From: BtbN Date: Tue, 4 Jun 2019 14:17:01 +0200 Subject: [PATCH] Teach KBinXML about explicit void type --- eAmuseCore/KBinXML/XmlTypes.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eAmuseCore/KBinXML/XmlTypes.cs b/eAmuseCore/KBinXML/XmlTypes.cs index 5bfdb36..03f69e1 100644 --- a/eAmuseCore/KBinXML/XmlTypes.cs +++ b/eAmuseCore/KBinXML/XmlTypes.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Net; using System.Linq; using System.Collections.Generic; @@ -137,6 +137,8 @@ namespace eAmuseCore.KBinXML return new XmlType(size, new KBinConverter(fromString, toString), count, names); } + public static XmlType Void = new XmlType(0, null, "void"); + public static XmlType S8 = new XmlType(1, KBinConverter.S8, "s8"); public static XmlType U8 = new XmlType(1, KBinConverter.U8, "u8"); public static XmlType S16 = new XmlType(2, KBinConverter.S16, "s16"); @@ -158,6 +160,7 @@ namespace eAmuseCore.KBinXML private static readonly Dictionary lookupMap = new Dictionary() { + [1] = Void, [2] = S8, [3] = U8, [4] = S16,