aboutsummaryrefslogtreecommitdiff
path: root/src/script/cpp_api
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2021-01-17 01:56:50 +0100
committersfan5 <sfan5@live.de>2021-01-29 17:34:41 +0100
commit83229921e5f378625d9ef63ede3dffbe778e1798 (patch)
tree8189436795cad017e2eb858b5d2cc23c16a55f46 /src/script/cpp_api
parentedd8c3c664ad005eb32e1968ce80091851ffb817 (diff)
downloadminetest-83229921e5f378625d9ef63ede3dffbe778e1798.tar.gz
minetest-83229921e5f378625d9ef63ede3dffbe778e1798.tar.bz2
minetest-83229921e5f378625d9ef63ede3dffbe778e1798.zip
Rework use_texture_alpha to provide three opaque/clip/blend modes
The change that turns nodeboxes and meshes opaque when possible is kept, as is the compatibility code that warns modders to adjust their nodedefs.
Diffstat (limited to 'src/script/cpp_api')
-rw-r--r--src/script/cpp_api/s_node.cpp8
-rw-r--r--src/script/cpp_api/s_node.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/script/cpp_api/s_node.cpp b/src/script/cpp_api/s_node.cpp
index e0f9bcd78..269ebacb2 100644
--- a/src/script/cpp_api/s_node.cpp
+++ b/src/script/cpp_api/s_node.cpp
@@ -93,6 +93,14 @@ struct EnumString ScriptApiNode::es_NodeBoxType[] =
{0, NULL},
};
+struct EnumString ScriptApiNode::es_TextureAlphaMode[] =
+ {
+ {ALPHAMODE_OPAQUE, "opaque"},
+ {ALPHAMODE_CLIP, "clip"},
+ {ALPHAMODE_BLEND, "blend"},
+ {0, NULL},
+ };
+
bool ScriptApiNode::node_on_punch(v3s16 p, MapNode node,
ServerActiveObject *puncher, const PointedThing &pointed)
{
diff --git a/src/script/cpp_api/s_node.h b/src/script/cpp_api/s_node.h
index 81b44f0f0..3f771c838 100644
--- a/src/script/cpp_api/s_node.h
+++ b/src/script/cpp_api/s_node.h
@@ -54,4 +54,5 @@ public:
static struct EnumString es_ContentParamType2[];
static struct EnumString es_LiquidType[];
static struct EnumString es_NodeBoxType[];
+ static struct EnumString es_TextureAlphaMode[];
};