Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
obj
bin
bin
/.vs
18 changes: 18 additions & 0 deletions Systems/WorldMap/MapLayerData.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
namespace Vintagestory.GameContent;

/// <summary>
/// Represents a single map layer and its associated serialised data, sent to or from the client.
/// </summary>
[ProtoContract(ImplicitFields = ImplicitFields.AllPublic)]
public class MapLayerData
{
/// <summary>
/// The identifier or key corresponding to the map layer this data belongs to.
/// </summary>
public string ForMapLayer { get; set; }

/// <summary>
/// The raw, serialised binary data representing the layer's content or state.
/// </summary>
public byte[] Data { get; set; }
}
13 changes: 13 additions & 0 deletions Systems/WorldMap/MapLayerUpdate.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace Vintagestory.GameContent;

/// <summary>
/// Represents a payload used to update the visible map layers for the current session.
/// </summary>
[ProtoContract(ImplicitFields = ImplicitFields.AllPublic)]
public class MapLayerUpdate
{
/// <summary>
/// The collection of map layers that should be updated or applied.
/// </summary>
public MapLayerData[] Maplayers { get; set; }
}
13 changes: 13 additions & 0 deletions Systems/WorldMap/OnMapToggle.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace Vintagestory.GameContent;

/// <summary>
/// Represents a network packet indicating that the map should be opened or closed.
/// </summary>
[ProtoContract(ImplicitFields = ImplicitFields.AllPublic)]
public class OnMapToggle
{
/// <summary>
/// Whether to open (<c>true</c>) or close (<c>false</c>) the map.
/// </summary>
public bool OpenOrClose { get; set; }
}
28 changes: 28 additions & 0 deletions Systems/WorldMap/OnViewChangedPacket.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
namespace Vintagestory.GameContent;

/// <summary>
/// Represents a network packet indicating that the client's view bounds have changed.
/// </summary>
[ProtoContract(ImplicitFields = ImplicitFields.AllPublic)]
public class OnViewChangedPacket
{
/// <summary>
/// The minimum X coordinate of the view bounds.
/// </summary>
public int X1 { get; set; }

/// <summary>
/// The minimum Z coordinate of the view bounds.
/// </summary>
public int Z1 { get; set; }

/// <summary>
/// The maximum X coordinate of the view bounds.
/// </summary>
public int X2 { get; set; }

/// <summary>
/// The maximum Z coordinate of the view bounds.
/// </summary>
public int Z2 { get; set; }
}
Loading