1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Implement mod communication channels (#6351)

Implement network communication for channels

* Implement ModChannel manager server side to route incoming messages from clients to other clients
* Add signal handler switch on client & ModChannelMgr on client to handle channels
* Add Lua API bindings + client packet sending + unittests
* Implement server message sending
* Add callback from received message handler to Lua API using registration method
This commit is contained in:
Loïc Blot 2017-09-26 00:11:20 +02:00 committed by GitHub
parent 6df312a608
commit 6f1c907204
37 changed files with 1206 additions and 39 deletions

View file

@ -24,6 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "lua_api/l_client.h"
#include "lua_api/l_env.h"
#include "lua_api/l_minimap.h"
#include "lua_api/l_modchannels.h"
#include "lua_api/l_storage.h"
#include "lua_api/l_sound.h"
#include "lua_api/l_util.h"
@ -72,11 +73,13 @@ void ClientScripting::InitializeModApi(lua_State *L, int top)
NodeMetaRef::RegisterClient(L);
LuaLocalPlayer::Register(L);
LuaCamera::Register(L);
ModChannelRef::Register(L);
ModApiUtil::InitializeClient(L, top);
ModApiClient::Initialize(L, top);
ModApiStorage::Initialize(L, top);
ModApiEnvMod::InitializeClient(L, top);
ModApiChannels::Initialize(L, top);
}
void ClientScripting::on_client_ready(LocalPlayer *localplayer)