using MessagePack;
using Shiki.Common.Identity;
using UniScan.Network.Data.Info.Software;
using UniScan.Network.Protocol.PayloadPart;
using UniScan.Network.Registry;
namespace UniScan.Network.Protocol.Packets.Clientbound.Remote;
///
/// Sent to clients so that they can tell whether to disconnect due to version differences.
///
/// Should stay the same throughout versions, attributes are added in the RemoteInfoPacket instead.
/// Clients should get this packet before getting the RemoteInfoPacket to prevent connecting to an incompatible server.
///
[RegistryPacket("UniScan", "packet", "clientbound", "remote", "software_info")]
[MessagePackObject]
public readonly record struct ServerSoftwareInfoPacket(
[property: Key(0)] ServerSoftwareInfo Info,
[property: Key(1)] Dictionary Modules,
[property: Key(2)] Guid? RequestId
) : IClientboundPacket, IResponsePayloadPart;