summaryrefslogtreecommitdiff
path: root/src/script/cpp_api
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-03-17 07:48:29 +0100
committerGitHub <noreply@github.com>2017-03-17 07:48:29 +0100
commit0891975ad6c8d6d3e15b20f33b22cf5baca7eb62 (patch)
tree5e34935333741f6376b0a84fa00b3178c584d457 /src/script/cpp_api
parentb52f3005c315da9e55ffa7f1cbd71f2b18c7ba7f (diff)
downloadminetest-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.cpp5
-rw-r--r--src/script/cpp_api/s_client.h4
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