summaryrefslogtreecommitdiff
path: root/src/script/common
diff options
context:
space:
mode:
authorWuzzy <wuzzy2@mail.ru>2020-05-19 21:08:37 +0200
committerGitHub <noreply@github.com>2020-05-19 21:08:37 +0200
commitc94d37827dd3a8be9dcc59bb693032ba7ea07922 (patch)
treeada7fd843d405f8ec6f1c43b749f553f4a215214 /src/script/common
parent7d3972a5049324f776ab008894c34569641f0073 (diff)
downloadminetest-c94d37827dd3a8be9dcc59bb693032ba7ea07922.tar.gz
minetest-c94d37827dd3a8be9dcc59bb693032ba7ea07922.tar.bz2
minetest-c94d37827dd3a8be9dcc59bb693032ba7ea07922.zip
Rework functionality of leveled nodes (#9852)
Co-authored-by: sfan5 <sfan5@live.de> Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
Diffstat (limited to 'src/script/common')
-rw-r--r--src/script/common/c_content.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp
index de9634c42..116a59c09 100644
--- a/src/script/common/c_content.cpp
+++ b/src/script/common/c_content.cpp
@@ -694,6 +694,8 @@ ContentFeatures read_content_features(lua_State *L, int index)
f.liquid_range = getintfield_default(L, index,
"liquid_range", f.liquid_range);
f.leveled = getintfield_default(L, index, "leveled", f.leveled);
+ f.leveled_max = getintfield_default(L, index,
+ "leveled_max", f.leveled_max);
getboolfield(L, index, "liquid_renewable", f.liquid_renewable);
f.drowning = getintfield_default(L, index,
@@ -860,6 +862,8 @@ void push_content_features(lua_State *L, const ContentFeatures &c)
lua_setfield(L, -2, "post_effect_color");
lua_pushnumber(L, c.leveled);
lua_setfield(L, -2, "leveled");
+ lua_pushnumber(L, c.leveled_max);
+ lua_setfield(L, -2, "leveled_max");
lua_pushboolean(L, c.sunlight_propagates);
lua_setfield(L, -2, "sunlight_propagates");
lua_pushnumber(L, c.light_source);