summaryrefslogtreecommitdiff
path: root/src/server.h
diff options
context:
space:
mode:
authorWeblate <42@minetest.ru>2013-06-01 13:18:52 +0200
committerWeblate <42@minetest.ru>2013-06-01 13:18:52 +0200
commit1dfc2e02b3c358af4bb20bb3cb60ac7bd3ed1124 (patch)
tree54660f353f3342f89b6259ea6a5dfedfa20dc16f /src/server.h
parentec039a3d123120f9918812b13f5971e94546b9af (diff)
parent64627817fcca52f20948c24b60ce192b218f6ce2 (diff)
downloadminetest-1dfc2e02b3c358af4bb20bb3cb60ac7bd3ed1124.tar.gz
minetest-1dfc2e02b3c358af4bb20bb3cb60ac7bd3ed1124.tar.bz2
minetest-1dfc2e02b3c358af4bb20bb3cb60ac7bd3ed1124.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src/server.h')
-rw-r--r--src/server.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/server.h b/src/server.h
index dcd007d23..edc5c4895 100644
--- a/src/server.h
+++ b/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; }
@@ -541,6 +541,7 @@ public:
bool hudRemove(Player *player, u32 id);
bool hudChange(Player *player, u32 id, HudElementStat stat, void *value);
bool hudSetFlags(Player *player, u32 flags, u32 mask);
+ bool hudSetHotbarItemcount(Player *player, s32 hotbar_itemcount);
private:
@@ -585,6 +586,7 @@ private:
void SendHUDRemove(u16 peer_id, u32 id);
void SendHUDChange(u16 peer_id, u32 id, HudElementStat stat, void *value);
void SendHUDSetFlags(u16 peer_id, u32 flags, u32 mask);
+ void SendHUDSetParam(u16 peer_id, u16 param, const std::string &value);
/*
Send a node removal/addition event to all clients except ignore_id.
@@ -746,7 +748,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;