public override void Write(IStarboundStream stream) { stream.WriteVLQ((ulong)Position.Count); Position.ForEach(p => p.WriteTo(stream)); stream.WriteUInt8((byte)Layer); SourcePos.WriteTo(stream); TileDamage.WriteTo(stream); }
public void WriteTo(IStarboundStream stream) { stream.WriteUInt16(background); stream.WriteUInt8(backgroundHueShift); stream.WriteUInt8(backgroundColorVariant); stream.WriteUInt16(backgroundMod); stream.WriteUInt8(backgroundModHueShift); stream.WriteUInt16(foreground); stream.WriteUInt8(foregroundHueShift); stream.WriteUInt8(foregroundColorVariant); stream.WriteUInt16(foregroundMod); stream.WriteUInt8(foregroundModHueShift); stream.WriteUInt8(collision); stream.WriteUInt8(blockBiomeIndex); stream.WriteUInt8(environmentBiomeIndex); stream.WriteUInt8(LiquidLevel); stream.WriteFloat(Gravity); stream.WriteUInt16(DungeonID); }
public override void Write(IStarboundStream stream) { stream.WriteUInt8((byte)cm); stream.WriteString(ChannelName); stream.WriteUInt32(ClientId); stream.WriteString(Name); stream.WriteString(Message); /* * stream.WriteString(World); */ }
public override void WriteTo(IStarboundStream stream) { stream.WriteUInt8((byte)EntityType); using (StarboundStream s = new StarboundStream()) { s.WriteString(Object); s.WriteVariant(Information); s.WriteUInt8Array(Unknown, false); stream.WriteUInt8Array(s.ToArray()); } stream.WriteSignedVLQ(EntityId); }
public void WriteTo(IStarboundStream stream) { if (Value == null) { stream.WriteUInt8(1); } else if (Value is double) { stream.WriteInt8(2); stream.WriteDouble((double)Value); } else if (Value is bool) { stream.WriteInt8(3); stream.WriteBoolean((bool)Value); } else if (Value is ulong) { stream.WriteInt8(4); stream.WriteVLQ((ulong)Value); } else if (Value is string) { stream.WriteInt8(5); stream.WriteString((string)Value); } else if (Value is Variant[]) { stream.WriteInt8(6); var array = (Variant[])Value; stream.WriteVLQ((ulong)array.Length); for (int i = 0; i < array.Length; i++) { array[i].WriteTo(stream); } } else if (Value is VariantDict) { stream.WriteInt8(7); var dict = (VariantDict)Value; stream.WriteVLQ((ulong)dict.Count); foreach (var kvp in dict) { stream.WriteString(kvp.Key); kvp.Value.WriteTo(stream); } } }
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); } } }
public void WriteTo(IStarboundStream stream) { stream.WriteUInt8((byte)ActionType); stream.WriteInt32(EntityId); stream.WriteVariant(Data); }
public override void Write(IStarboundStream stream) { stream.WriteString(Text); stream.WriteUInt8((byte)cm); }
public override void Write(IStarboundStream stream) { stream.WriteUInt8(NumPairs); stream.WriteString(PropertyName); stream.WriteVariant(PropertyValue); }
public virtual void WriteTo(IStarboundStream stream) { stream.WriteUInt8((byte)EntityType); stream.WriteUInt8Array(StoreData, false); }
public override void Write(IStarboundStream stream) { Position.WriteTo(stream); stream.WriteUInt8((byte)Layer); TileDamage.WriteTo(stream); }
public override void Write(IStarboundStream stream) { stream.WriteString(Message); stream.WriteUInt8(Channel); }
public virtual void WriteTo(IStarboundStream stream) { stream.WriteUInt8((byte)EntityType); stream.WriteUInt8Array(StoreData); stream.WriteSignedVLQ(EntityId); }
public override void Write(IStarboundStream stream) { stream.WriteUInt8(Unknown); }
public override void Write(IStarboundStream stream) { Position.WriteTo(stream); stream.WriteUInt8(LiquidId); stream.WriteUInt8(Level); }
public void WriteTo(IStarboundStream stream) { stream.WriteUInt8((byte)DamageType); stream.WriteSingle(Amount); }