Exemple #1
0
        public static CelestialLog FromStream(IStarboundStream stream)
        {
            CelestialLog log = new CelestialLog();

            byte[] logDat = stream.ReadUInt8Array();

            using (StarboundStream s = new StarboundStream(logDat))
            {
                uint visited = s.ReadUInt32();

                for (int i = 0; i < visited; i++)
                {
                    log.Visited.Add(s.ReadSystemCoordinate());
                }

                uint sectors = s.ReadUInt32();

                for (int i = 0; i < sectors; i++)
                {
                    log.Sectors.Add(new LogSector {
                        SectorName = s.ReadString(), Unknown = s.ReadBoolean()
                    });
                }

                s.ReadUInt8(); //unknown

                log.CurrentSystem   = s.ReadSystemCoordinate();
                log.CurrentLocation = s.ReadWorldCoordinate();
                log.HomeCoordinate  = s.ReadWorldCoordinate();
            }

            return(log);
        }
        public void Read(StarboundStream stream)
        {
            int discarded;

            Success         = stream.ReadBoolean();
            ClientId        = stream.ReadVLQ(out discarded);
            RejectionReason = stream.ReadString();
        }
        public void Read(StarboundStream stream)
        {
            AssetDigest = stream.ReadString();
            Claim       = stream.ReadVariant();
            bool uuid = stream.ReadBoolean();

            if (uuid)
            {
                UUID = stream.ReadUInt8Array(16);
            }
            PlayerName = stream.ReadString();
            Species    = stream.ReadString();
            Shipworld  = stream.ReadUInt8Array();
            Account    = stream.ReadString();
        }