Code/Protocol/Packets/RoomUpdatePacket.cs

A simple packet type used by the networking protocol. It represents a RoomUpdate message and serializes three properties: the command string "RoomUpdate", an array of checked location IDs, and an array of NetworkPlayer objects.

Networking
using System.Text.Json.Serialization;

namespace APLib.Protocol.Packets;

public sealed class RoomUpdatePacket : APPacket
{
	[JsonPropertyName( "cmd" )]
	public override string Command => "RoomUpdate";
	
	[JsonPropertyName( "checked_locations" )]
	public long[] CheckedLocations { get; set; }
	
	[JsonPropertyName( "players" )]
	public NetworkPlayer[] Players { get; set; }
}