public static CelestialInfo FromStream(IStarboundStream stream) { CelestialInfo cInfo = new CelestialInfo(); cInfo.planetOrbitalLevels = stream.ReadInt32(); cInfo.satelliteOrbitalLevels = stream.ReadInt32(); cInfo.ChunkSize = stream.ReadInt32(); cInfo.xyCoordRange = Vec2I.FromStream(stream); cInfo.zCoordRange = stream.ReadToEnd(); // cInfo.zCoordRange = Vec2I.FromStream(stream); //doc lies??? // cInfo.zCoordRange = stream.ReadInt32(); /* * cInfo.OrbitalLevels = stream.ReadInt32(); * cInfo.ChunkSize = stream.ReadInt32(); * cInfo.XyCoordinateMin = stream.ReadInt32(); * cInfo.XyCoordinateMax = stream.ReadInt32(); * cInfo.ZCoordinateMin = stream.ReadInt32(); * cInfo.ZCoordinateMax = stream.ReadInt32(); * * ulong length = stream.ReadVLQ(); * * for (ulong i = 0; i < length; i++) * { * cInfo.Sectors.Add(Sector.FromStream(stream)); * } */ return(cInfo); }
public static Vec2I FromStream(IStarboundStream stream) { Vec2I vec = new Vec2I(); vec.X = stream.ReadInt32(); vec.Y = stream.ReadInt32(); return(vec); }
public static CelestialCoordinate FromStream(IStarboundStream stream) { var cs = new CelestialCoordinate(); cs.X = stream.ReadInt32(); cs.Y = stream.ReadInt32(); cs.Z = stream.ReadInt32(); return(cs); }
public static SystemCoordinate FromStream(IStarboundStream stream) { SystemCoordinate coord = new SystemCoordinate(); coord.Sector = stream.ReadString(); coord.X = stream.ReadInt32(); coord.Y = stream.ReadInt32(); coord.Z = stream.ReadInt32(); return(coord); }
public static WorldCoordinate FromStream(IStarboundStream stream) { WorldCoordinate wc = new WorldCoordinate(); // wc.Sector = stream.ReadString(); wc.X = stream.ReadInt32(); wc.Y = stream.ReadInt32(); wc.Z = stream.ReadInt32(); wc.Planet = stream.ReadInt32(); wc.Satellite = stream.ReadInt32(); wc.Sector = wc.X.ToString() + wc.Y.ToString() + wc.Planet.ToString() + wc.Planet.ToString() + wc.Satellite.ToString(); return(wc); }
public override void Read(IStarboundStream stream) { WarptoWorld = stream.ReadString(); WarptoPlayer = stream.ReadString(); WarpAlias = (WarpAlias)stream.ReadInt32(); WarpActionInvalid = stream.ReadBoolean(); }
public override void Read(IStarboundStream stream) { Itype = (InteractionType)stream.ReadUInt32(); SharpStarLogger.DefaultLogger.Info("itype:" + Itype); EntityId = stream.ReadInt32(); SharpStarLogger.DefaultLogger.Info("EntityID:" + EntityId); Results = Json.FromStream(stream); SharpStarLogger.DefaultLogger.Info("Results:" + Results); }
public static InteractAction FromStream(IStarboundStream stream) { InteractAction action = new InteractAction(); action.ActionType = (InteractActionType)stream.ReadUInt8(); action.EntityId = stream.ReadInt32(); action.Data = stream.ReadVariant(); return(action); }
public override void Read(IStarboundStream stream) { EntityId = stream.ReadInt32(); }
public override void Read(IStarboundStream stream) { Celestial.X = stream.ReadInt32(); Celestial.Y = stream.ReadInt32(); Celestial.Z = stream.ReadInt32(); }
public override void Read(IStarboundStream stream) { EntityId = stream.ReadInt32(); item = ItemDescriptor.FromStream(stream); slot = stream.ReadVLQ(); }
public override void Read(IStarboundStream stream) { Claim = stream.ReadString(); Salt = stream.ReadString(); Rounds = stream.ReadInt32(); }
public static Json FromStream(IStarboundStream stream) { var json = new Json(); var type = stream.ReadUInt8(); switch (type) { case 0: json.Value = null; break; case 1: json.Value = stream.ReadSingle(); break; case 2: json.Value = stream.ReadBoolean(); break; case 3: json.Value = stream.ReadInt32(); break; case 4: json.Value = stream.ReadString(); break; case 5: var array = new Json[stream.ReadVLQ()]; for (int i = 0; i < array.Length; i++) { array[i] = FromStream(stream); } json.Value = array; break; case 6: var dict = new JsonDict(); var length = stream.ReadVLQ(); while (length-- > 0) { dict[stream.ReadString()] = FromStream(stream); } json.Value = dict; break; case 7: var dict1 = new JsonDict(); var length2 = stream.ReadVLQ(); while (length2-- > 0) { dict1[stream.ReadString()] = FromStream(stream); } json.Value = dict1; break; default: throw new InvalidOperationException(string.Format("Unknown Json type: 0x{0:X2}", type)); } return(json); }
public override void Read(IStarboundStream stream) { sEntityId = stream.ReadInt32(); SourcePosition = Vec2F.FromStream(stream); dEntityId = stream.ReadInt32(); }