mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
LocalPlayer api lua
This commit is contained in:
parent
58d83a7bb2
commit
8ad3dad137
7 changed files with 640 additions and 2 deletions
|
@ -29,6 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "lua_api/l_util.h"
|
||||
#include "lua_api/l_item.h"
|
||||
#include "lua_api/l_nodemeta.h"
|
||||
#include "lua_api/l_localplayer.h"
|
||||
|
||||
ClientScripting::ClientScripting(Client *client):
|
||||
ScriptApiBase()
|
||||
|
@ -69,4 +70,11 @@ void ClientScripting::InitializeModApi(lua_State *L, int top)
|
|||
StorageRef::Register(L);
|
||||
LuaMinimap::Register(L);
|
||||
NodeMetaRef::RegisterClient(L);
|
||||
LuaLocalPlayer::Register(L);
|
||||
}
|
||||
|
||||
void ClientScripting::on_client_ready(LocalPlayer *localplayer)
|
||||
{
|
||||
lua_State *L = getStack();
|
||||
LuaLocalPlayer::create(L, localplayer);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue