Fix missing ILuaCsNetworking API
This commit is contained in:
@@ -76,6 +76,9 @@ partial class NetworkingService : INetworkingService, IEventServerConnected, IEv
|
|||||||
GameMain.Client.ClientPeer.Send(netMessage, deliveryMethod);
|
GameMain.Client.ClientPeer.Send(netMessage, deliveryMethod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Send(IWriteMessage netMessage, DeliveryMethod deliveryMethod = DeliveryMethod.Reliable)
|
||||||
|
=> SendToServer(netMessage, deliveryMethod);
|
||||||
|
|
||||||
private void RequestId(NetId netId)
|
private void RequestId(NetId netId)
|
||||||
{
|
{
|
||||||
if (idToPacket.ContainsKey(netId)) { return; }
|
if (idToPacket.ContainsKey(netId)) { return; }
|
||||||
|
|||||||
@@ -180,4 +180,7 @@ partial class NetworkingService : INetworkingService, IEventClientRawNetMessageR
|
|||||||
GameMain.Server.ServerPeer.Send(netMessage, connection, deliveryMethod);
|
GameMain.Server.ServerPeer.Send(netMessage, connection, deliveryMethod);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Send(IWriteMessage netMessage, NetworkConnection connection = null, DeliveryMethod deliveryMethod = DeliveryMethod.Reliable)
|
||||||
|
=> SendToClient(netMessage, connection, deliveryMethod);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,13 @@
|
|||||||
namespace Barotrauma.LuaCs.Compatibility;
|
using Barotrauma.Networking;
|
||||||
|
|
||||||
|
namespace Barotrauma.LuaCs.Compatibility;
|
||||||
|
|
||||||
public interface ILuaCsNetworking : ILuaCsShim
|
public interface ILuaCsNetworking : ILuaCsShim
|
||||||
{
|
{
|
||||||
void Receive(string netId, LuaCsAction action);
|
void Receive(string netId, LuaCsAction action);
|
||||||
|
#if SERVER
|
||||||
|
void Send(IWriteMessage mesage, NetworkConnection connection = null, DeliveryMethod deliveryMethod = DeliveryMethod.Reliable);
|
||||||
|
#elif CLIENT
|
||||||
|
void Send(IWriteMessage mesage, DeliveryMethod deliveryMethod = DeliveryMethod.Reliable);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user