private void readJson(JToken node, ReadingOptions options) { X = node.Value <float>("x"); Y = node.Value <float>("y"); Z = node.Value <float>("z"); UnkByte = node.Value <byte>("unkByte"); UnkFloat = node.Value <float>("unkFloat"); ZoneVolumes.Clear(); JArray zones = node.Value <JArray>("zones"); if (zones != null && zones.Type != JTokenType.Null) { foreach (JToken zone in zones) { ZoneVolumes.Add(ArkName.From(zone.Value <string>())); } } Objects.Clear(); ObjectMap.Clear(); JArray objectsNode = node.Value <JArray>("objects"); if (objectsNode != null && objectsNode.Type != JTokenType.Null) { foreach (var jsonNode in objectsNode) { addObject(new GameObject((JObject)jsonNode, options.HibernationObjectProperties), options.BuildComponentTree); } } UnkInt1 = node.Value <int>("unkInt1"); ClassIndex = node.Value <int>("classIndex"); }
private void readBinaryNameTable(ArkArchive archive) { int version = archive.ReadInt(); if (version != 3) { archive.DebugMessage($"Found unknown Version {version}", -4); throw new NotSupportedException(); } int count = archive.ReadInt(); nameTable = new List <string>(count); for (int index = 0; index < count; index++) { nameTable.Add(archive.ReadString()); } int zoneCount = archive.ReadInt(); for (int index = 0; index < zoneCount; index++) { ZoneVolumes.Add(archive.ReadName()); } }