diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-03-17 07:48:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-17 07:48:29 +0100 |
commit | 0891975ad6c8d6d3e15b20f33b22cf5baca7eb62 (patch) | |
tree | 5e34935333741f6376b0a84fa00b3178c584d457 /src/script/cpp_api | |
parent | b52f3005c315da9e55ffa7f1cbd71f2b18c7ba7f (diff) | |
download | minetest-0891975ad6c8d6d3e15b20f33b22cf5baca7eb62.tar.gz minetest-0891975ad6c8d6d3e15b20f33b22cf5baca7eb62.tar.bz2 minetest-0891975ad6c8d6d3e15b20f33b22cf5baca7eb62.zip |
[CSM] Add core.get_timeofday & core.get_day_count env calls (#5401)
* [CSM] Add core.get_timeofday & core.get_day_count env calls
* [CSM] Add core.get_node_level, core.get_node_max_level, core.find_node_near
Diffstat (limited to 'src/script/cpp_api')
-rw-r--r-- | src/script/cpp_api/s_client.cpp | 5 | ||||
-rw-r--r-- | src/script/cpp_api/s_client.h | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/script/cpp_api/s_client.cpp b/src/script/cpp_api/s_client.cpp index 154dd6194..666fd693d 100644 --- a/src/script/cpp_api/s_client.cpp +++ b/src/script/cpp_api/s_client.cpp @@ -177,3 +177,8 @@ bool ScriptApiClient::on_punchnode(v3s16 p, MapNode node) bool blocked = lua_toboolean(L, -1); return blocked; } + +void ScriptApiClient::setEnv(ClientEnvironment *env) +{ + ScriptApiBase::setEnv(env); +} diff --git a/src/script/cpp_api/s_client.h b/src/script/cpp_api/s_client.h index 93e9558f2..2369efe3e 100644 --- a/src/script/cpp_api/s_client.h +++ b/src/script/cpp_api/s_client.h @@ -29,6 +29,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #include <cstdint> #endif +class ClientEnvironment; + class ScriptApiClient: virtual public ScriptApiBase { public: @@ -47,5 +49,7 @@ public: bool on_dignode(v3s16 p, MapNode node); bool on_punchnode(v3s16 p, MapNode node); + + void setEnv(ClientEnvironment *env); }; #endif |