aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authornumber Zero <silverunicorn2011@yandex.ru>2017-05-11 23:24:12 +0300
committerparamat <mat.gregory@virginmedia.com>2017-07-11 01:02:22 +0100
commitef285b2815962a7a01791059ed984cb12fdba4dd (patch)
treec004c7033590c15532ac4c66ac818b86ebc1f91f /src/script
parentf871852f13db6072b3bffe25826d7520ef031ec0 (diff)
downloadminetest-ef285b2815962a7a01791059ed984cb12fdba4dd.tar.gz
minetest-ef285b2815962a7a01791059ed984cb12fdba4dd.tar.bz2
minetest-ef285b2815962a7a01791059ed984cb12fdba4dd.zip
Add 'plantlike_rooted' drawtype
Useful for underwater plants. Node consists of a base cube plus a plantlike extension that can pass through liquid nodes above without creating air bubbles or interfering with liquid flow. Uses paramtype2 'leveled', param2 defines height of plantlike extension.
Diffstat (limited to 'src/script')
-rw-r--r--src/script/common/c_content.cpp1
-rw-r--r--src/script/cpp_api/s_node.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp
index 3ee6913c9..8d94235ce 100644
--- a/src/script/common/c_content.cpp
+++ b/src/script/common/c_content.cpp
@@ -362,6 +362,7 @@ TileDef read_tiledef(lua_State *L, int index, u8 drawtype)
bool default_culling = true;
switch (drawtype) {
case NDT_PLANTLIKE:
+ case NDT_PLANTLIKE_ROOTED:
case NDT_FIRELIKE:
default_tiling = false;
// "break" is omitted here intentionaly, as PLANTLIKE
diff --git a/src/script/cpp_api/s_node.cpp b/src/script/cpp_api/s_node.cpp
index d1b2723df..aa28e3fb5 100644
--- a/src/script/cpp_api/s_node.cpp
+++ b/src/script/cpp_api/s_node.cpp
@@ -47,6 +47,7 @@ struct EnumString ScriptApiNode::es_DrawType[] =
{NDT_FIRELIKE, "firelike"},
{NDT_GLASSLIKE_FRAMED_OPTIONAL, "glasslike_framed_optional"},
{NDT_MESH, "mesh"},
+ {NDT_PLANTLIKE_ROOTED, "plantlike_rooted"},
{0, NULL},
};