mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Move scriptapi to separate folder (by sapier)
On the lua side, notably minetest.env:<function>(<args>) should now be replaced by minetest.<function>(<args>). The old way is and will stay supported for a long time. Also: Update and clean up lua_api.txt (by celeron55) Move EnvRef to lua and remove add_rat and add_firefly (by kahrl) Add separate src/util/CMakeLists.txt, other minor fixes (by kahrl)
This commit is contained in:
parent
865f380c91
commit
ab43377577
87 changed files with 6401 additions and 5584 deletions
14
src/server.h
14
src/server.h
|
@ -43,8 +43,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
#define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")"
|
||||
|
||||
struct LuaState;
|
||||
typedef struct lua_State lua_State;
|
||||
class IWritableItemDefManager;
|
||||
class IWritableNodeDefManager;
|
||||
class IWritableCraftDefManager;
|
||||
|
@ -52,7 +50,9 @@ class EventManager;
|
|||
class PlayerSAO;
|
||||
class IRollbackManager;
|
||||
class EmergeManager;
|
||||
//struct HudElement;
|
||||
//struct HudElement; ?????????
|
||||
class ScriptApi;
|
||||
|
||||
|
||||
class ServerError : public std::exception
|
||||
{
|
||||
|
@ -384,7 +384,7 @@ public:
|
|||
void Receive();
|
||||
void ProcessData(u8 *data, u32 datasize, u16 peer_id);
|
||||
|
||||
std::list<PlayerInfo> getPlayerInfo();
|
||||
//std::list<PlayerInfo> getPlayerInfo();
|
||||
|
||||
// Environment must be locked when called
|
||||
void setTimeOfDay(u32 time)
|
||||
|
@ -492,8 +492,8 @@ public:
|
|||
// Creates or resets inventory
|
||||
Inventory* createDetachedInventory(const std::string &name);
|
||||
|
||||
// Envlock and conlock should be locked when using Lua
|
||||
lua_State *getLua(){ return m_lua; }
|
||||
// Envlock and conlock should be locked when using scriptapi
|
||||
ScriptApi *getScriptIface(){ return m_script; }
|
||||
|
||||
// Envlock should be locked when using the rollback manager
|
||||
IRollbackManager *getRollbackManager(){ return m_rollback; }
|
||||
|
@ -746,7 +746,7 @@ private:
|
|||
|
||||
// Scripting
|
||||
// Envlock and conlock should be locked when using Lua
|
||||
lua_State *m_lua;
|
||||
ScriptApi *m_script;
|
||||
|
||||
// Item definition manager
|
||||
IWritableItemDefManager *m_itemdef;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue