Пример #1
0
        private void readBinaryBase(ArkArchive archive)
        {
            readBinaryHeader(archive);

            if (SaveVersion > 5)
            {
                // Name table is located after the objects block, but will be needed to read the objects block
                readBinaryNameTable(archive);
            }

            readBinaryDataFiles(archive);

            SaveState = new SaveState {
                GameTime = GameTime, SaveTime = SaveTime, MapName = DataFiles.FirstOrDefault()
            };

            readBinaryEmbeddedData(archive);

            var unknownValue = archive.GetInt();

            if (unknownValue != 0)
            {
                //if (unknownValue > 2)
                //{
                //    var msg = $"Found unexpected Value {unknownValue} at {archive.Position - 4:X}";
                //    _logger.Error(msg);
                //    throw new System.NotSupportedException(msg);
                //}

                for (int n = 0; n < unknownValue; n++)
                {
                    archive.GetInt();    //unknownFlags
                    archive.GetInt();    //objectCount
                    archive.GetString(); //name
                }
            }
            _baseRead          = true;
            _gameObjectsOffset = archive.Position;
        }
Пример #2
0
 public override string ToString()
 {
     return($"Config@{GetHashCode()} [First data file : {DataFiles.FirstOrDefault()} ; First output file : {OutputFiles.FirstOrDefault()} ; First content file : {ContentFiles.FirstOrDefault()}]");
 }