parent
b704f08c63
commit
f736b0d457
@ -1,22 +0,0 @@
|
||||
using System;
|
||||
using DLatchPoke.Shared.Packets.S2C;
|
||||
using LogicWorld.SharedCode.Networking;
|
||||
|
||||
namespace DLatchPoke.Client.Network {
|
||||
public class AnnounceModPacketHandler : PacketHandler<AnnounceModPresence> {
|
||||
private readonly Version _version;
|
||||
|
||||
public AnnounceModPacketHandler(Version version) {
|
||||
_version = version;
|
||||
}
|
||||
|
||||
public override void Handle(AnnounceModPresence packet, HandlerContext context) {
|
||||
if (packet.Version == _version) {
|
||||
DLatchPokeClient.Logger.Info($"Mod is supported on the server: version={packet.Version}");
|
||||
DLatchPokeClient.ServerSupportsMod = true;
|
||||
} else {
|
||||
DLatchPokeClient.Logger.Error($"Mod version mismatch: client={_version}, server={packet.Version}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
using EccsLogicWorldAPI.Shared.PacketWrapper;
|
||||
using LogicAPI.Networking.Packets.Initialization;
|
||||
using LogicWorld.SharedCode.Networking;
|
||||
|
||||
namespace DLatchPoke.Server.Network {
|
||||
public class ClientJoinedPacketHandler : CustomPacketHandler<ClientLoadedWorldPacket> {
|
||||
private readonly DLatchPokeServer _dLatchPokeServer;
|
||||
public ClientJoinedPacketHandler(DLatchPokeServer dLatchPokeServer) {
|
||||
_dLatchPokeServer = dLatchPokeServer;
|
||||
}
|
||||
|
||||
public override void handle(ref bool isCancelled, ref ClientLoadedWorldPacket packet, HandlerContext context) {
|
||||
_dLatchPokeServer.PlayerJoined(packet.PlayerData, context);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
using System;
|
||||
using LogicAPI.Networking.Packets;
|
||||
using MessagePack;
|
||||
|
||||
namespace DLatchPoke.Shared.Packets.S2C {
|
||||
[MessagePackObject]
|
||||
public class AnnounceModPresence : Packet {
|
||||
[Key(0)] public Version Version;
|
||||
}
|
||||
}
|
Loading…
Reference in new issue