Add missing ILuaCsNetworking APIs

This commit is contained in:
Evil Factory
2026-02-28 17:57:02 -03:00
parent e2c4282477
commit 28b355911d
2 changed files with 106 additions and 1 deletions
@@ -1,11 +1,20 @@
using Barotrauma.Networking;
using System.Collections.Generic;
namespace Barotrauma.LuaCs.Compatibility;
public interface ILuaCsNetworking : ILuaCsShim
internal interface ILuaCsNetworking : ILuaCsShim
{
void CreateEntityEvent(INetSerializable entity, NetEntityEvent.IData extraData);
ushort LastClientListUpdateID { get; set; }
void HttpRequest(string url, LuaCsAction callback, string data = null, string method = "POST", string contentType = "application/json", Dictionary<string, string> headers = null, string savePath = null);
void HttpPost(string url, LuaCsAction callback, string data, string contentType = "application/json", Dictionary<string, string> headers = null, string savePath = null);
void Receive(string netId, LuaCsAction action);
#if SERVER
int FileSenderMaxPacketsPerUpdate { get; set; }
void ClientWriteLobby(Client client);
void UpdateClientPermissions(Client client);
void Send(IWriteMessage mesage, NetworkConnection connection = null, DeliveryMethod deliveryMethod = DeliveryMethod.Reliable);
#elif CLIENT
void Send(IWriteMessage mesage, DeliveryMethod deliveryMethod = DeliveryMethod.Reliable);