diff options
author | Paul Ouellette <oue.paul18@gmail.com> | 2019-04-11 15:45:39 -0400 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2019-04-11 20:45:39 +0100 |
commit | 22ad820aa459e055fde817d94f31a9461aac2726 (patch) | |
tree | 8df2ea572c26ecf3f4e0c37208c5556281a47221 /src/script/cpp_api | |
parent | 1e5f2e0f133af42764dcd9386ccd59f4bf948328 (diff) | |
download | minetest-22ad820aa459e055fde817d94f31a9461aac2726.tar.gz minetest-22ad820aa459e055fde817d94f31a9461aac2726.tar.bz2 minetest-22ad820aa459e055fde817d94f31a9461aac2726.zip |
Add node field to PlayerHPChangeReason table (#8368)
Diffstat (limited to 'src/script/cpp_api')
-rw-r--r-- | src/script/cpp_api/s_base.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/script/cpp_api/s_base.cpp b/src/script/cpp_api/s_base.cpp index a8ed902dd..e73f613ce 100644 --- a/src/script/cpp_api/s_base.cpp +++ b/src/script/cpp_api/s_base.cpp @@ -404,6 +404,10 @@ void ScriptApiBase::pushPlayerHPChangeReason(lua_State *L, const PlayerHPChangeR objectrefGetOrCreate(L, reason.object); lua_setfield(L, -2, "object"); } + if (!reason.node.empty()) { + lua_pushstring(L, reason.node.c_str()); + lua_setfield(L, -2, "node"); + } } Server* ScriptApiBase::getServer() |