Beispiel #1
0
        public void WriteTo(IStarboundStream stream)
        {
            stream.WriteInt32(planetOrbitalLevels);
            stream.WriteInt32(satelliteOrbitalLevels);
            stream.WriteInt32(ChunkSize);
            xyCoordRange.WriteTo(stream);
            stream.Write(zCoordRange, 0, zCoordRange.Length);
            // zCoordRange.WriteTo(stream);
            //  stream.WriteInt32(zCoordRange);

            /*
             * stream.WriteInt32(OrbitalLevels);
             * stream.WriteInt32(ChunkSize);
             * stream.WriteInt32(XyCoordinateMin);
             * stream.WriteInt32(XyCoordinateMax);
             * stream.WriteInt32(ZCoordinateMin);
             * stream.WriteInt32(ZCoordinateMax);
             * stream.WriteVLQ((ulong)Sectors.Count);
             *
             * foreach (Sector sector in Sectors)
             * {
             *  sector.WriteTo(stream);
             * }
             */
        }
Beispiel #2
0
 public void WriteTo(IStarboundStream stream)
 {
     stream.WriteString(Sector);
     stream.WriteInt32(X);
     stream.WriteInt32(Y);
     stream.WriteInt32(Z);
 }
Beispiel #3
0
 public void WriteTo(IStarboundStream stream)
 {
     //  stream.WriteString(Sector);
     stream.WriteInt32(X);
     stream.WriteInt32(Y);
     stream.WriteInt32(Z);
     stream.WriteInt32(Planet);
     stream.WriteInt32(Satellite);
 }
 public override void Write(IStarboundStream stream)
 {
     stream.WriteString(WarptoWorld);
     stream.WriteString(WarptoPlayer);
     stream.WriteInt32((int)WarpAlias);
     stream.WriteBoolean(WarpActionInvalid);
 }
Beispiel #5
0
 public void WriteTo(IStarboundStream stream)
 {
     if (Value == null)
     {
         stream.WriteUInt8(0);
     }
     else if (Value is float)
     {
         stream.WriteInt8(1);
         stream.WriteSingle((float)Value);
     }
     else if (Value is bool)
     {
         stream.WriteInt8(2);
         stream.WriteBoolean((bool)Value);
     }
     else if (Value is int)
     {
         stream.WriteInt8(3);
         stream.WriteInt32((int)Value);
     }
     else if (Value is string)
     {
         stream.WriteInt8(4);
         stream.WriteString((string)Value);
     }
     else if (Value is Json[])
     {
         stream.WriteInt8(5);
         var array = (Json[])Value;
         stream.WriteVLQ((ulong)array.Length);
         for (var i = 0; i < array.Length; i++)
         {
             array[i].WriteTo(stream);
         }
     }
     else if (Value is JsonDict)
     {
         stream.WriteInt8(7);
         var dict = (JsonDict)Value;
         stream.WriteVLQ((ulong)dict.Count);
         foreach (var kvp in dict)
         {
             stream.WriteString(kvp.Key);
             kvp.Value.WriteTo(stream);
         }
     }
 }
Beispiel #6
0
 public void WriteTo(IStarboundStream stream)
 {
     stream.WriteUInt8((byte)ActionType);
     stream.WriteInt32(EntityId);
     stream.WriteVariant(Data);
 }
Beispiel #7
0
 public override void Write(IStarboundStream stream)
 {
     stream.WriteInt32(EntityId);
 }
Beispiel #8
0
 public override void Write(IStarboundStream stream)
 {
     stream.WriteInt32(Celestial.X);
     stream.WriteInt32(Celestial.Y);
     stream.WriteInt32(Celestial.Z);
 }
Beispiel #9
0
 public override void Write(IStarboundStream stream)
 {
     stream.WriteInt32(EntityId);
     item.WriteTo(stream);
     stream.WriteVLQ(slot);
 }
 public override void Write(IStarboundStream stream)
 {
     stream.WriteUInt32((uint)Itype);
     stream.WriteInt32(EntityId);
     Results.WriteTo(stream);
 }
 public override void Write(IStarboundStream stream)
 {
     stream.WriteString(Claim);
     stream.WriteString(Salt);
     stream.WriteInt32(Rounds);
 }
Beispiel #12
0
 public void WriteTo(IStarboundStream stream)
 {
     stream.WriteInt32(X);
     stream.WriteInt32(Y);
 }
Beispiel #13
0
 public override void Write(IStarboundStream stream)
 {
     stream.WriteInt32(sEntityId);
     SourcePosition.WriteTo(stream);
     stream.WriteInt32(dEntityId);
 }