aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2021-01-16 22:16:04 +0100
committersfan5 <sfan5@live.de>2021-01-29 17:34:41 +0100
commitedd8c3c664ad005eb32e1968ce80091851ffb817 (patch)
treeaf80ed33fa80879ac97c6875fdbb930b857617ad /src/script
parente6e5910cb432f0fb25a8af3dc6cb9950fd9a05f5 (diff)
downloadminetest-edd8c3c664ad005eb32e1968ce80091851ffb817.tar.gz
minetest-edd8c3c664ad005eb32e1968ce80091851ffb817.tar.bz2
minetest-edd8c3c664ad005eb32e1968ce80091851ffb817.zip
Drop never documented 'alpha' property from nodedef
Includes minimal support code for practical reasons. We'll need it for a slightly different purpose next commit.
Diffstat (limited to 'src/script')
-rw-r--r--src/script/common/c_content.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp
index 4316f412d..5d29422af 100644
--- a/src/script/common/c_content.cpp
+++ b/src/script/common/c_content.cpp
@@ -618,7 +618,10 @@ void read_content_features(lua_State *L, ContentFeatures &f, int index)
}
lua_pop(L, 1);
- f.alpha = getintfield_default(L, index, "alpha", 255);
+ warn_if_field_exists(L, index, "alpha",
+ "Obsolete, only limited compatibility provided");
+ if (getintfield_default(L, index, "alpha", 255) != 255)
+ f.alpha = 0;
bool usealpha = getboolfield_default(L, index,
"use_texture_alpha", false);