mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
[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
This commit is contained in:
parent
c9492b4d37
commit
2efae3ffd7
37 changed files with 488 additions and 64 deletions
10
src/client.h
10
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);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue