summaryrefslogtreecommitdiff
path: root/src/client.h
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2017-01-21 15:02:08 +0100
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-03-13 23:56:05 +0100
commit2efae3ffd720095222c800e016286a45c9fe1e5c (patch)
tree3a8b19daa071cf742fee52d70a0e0adf94d56c0c /src/client.h
parentc9492b4d37c11f35cfdc1558f771eef87fc5c972 (diff)
downloadminetest-2efae3ffd720095222c800e016286a45c9fe1e5c.tar.gz
minetest-2efae3ffd720095222c800e016286a45c9fe1e5c.tar.bz2
minetest-2efae3ffd720095222c800e016286a45c9fe1e5c.zip
[CSM] Client side modding
* rename GameScripting to ServerScripting * Make getBuiltinLuaPath static serverside * Add on_shutdown callback * Add on_receiving_chat_message & on_sending_chat_message callbacks * ScriptApiBase: use IGameDef instead of Server This permits to share common attribute between client & server * Enable mod security in client side modding without conditions
Diffstat (limited to 'src/client.h')
-rw-r--r--src/client.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client.h b/src/client.h
index b33358d94..2fdade61a 100644
--- a/src/client.h
+++ b/src/client.h
@@ -305,6 +305,8 @@ private:
std::map<u16, u16> m_packets;
};
+class ClientScripting;
+
class Client : public con::PeerHandler, public InventoryManager, public IGameDef
{
public:
@@ -328,6 +330,8 @@ public:
~Client();
+ void initMods();
+
/*
request all threads managed by client to be stopped
*/
@@ -428,6 +432,10 @@ public:
ClientEnvironment& getEnv() { return m_env; }
ITextureSource *tsrc() { return getTextureSource(); }
ISoundManager *sound() { return getSoundManager(); }
+ static const std::string getBuiltinLuaPath();
+
+ virtual const std::vector<ModSpec> &getMods() const;
+ virtual const ModSpec* getModSpec(const std::string &modname) const;
// Causes urgent mesh updates (unlike Map::add/removeNodeWithEvent)
void removeNode(v3s16 p);
@@ -692,6 +700,8 @@ private:
bool m_cache_enable_shaders;
bool m_cache_use_tangent_vertices;
+ ClientScripting *m_script;
+
DISABLE_CLASS_COPY(Client);
};