diff options
author | sfan5 <sfan5@live.de> | 2021-01-16 22:16:04 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2021-01-29 17:34:41 +0100 |
commit | edd8c3c664ad005eb32e1968ce80091851ffb817 (patch) | |
tree | af80ed33fa80879ac97c6875fdbb930b857617ad /src/script | |
parent | e6e5910cb432f0fb25a8af3dc6cb9950fd9a05f5 (diff) | |
download | minetest-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.cpp | 5 |
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); |