From edd8c3c664ad005eb32e1968ce80091851ffb817 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sat, 16 Jan 2021 22:16:04 +0100 Subject: 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. --- src/script/common/c_content.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/script/common') 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); -- cgit v1.2.3