From d3a3c6ad2cafd95363f47f7d370a45425525fa35 Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Tue, 23 Jan 2018 22:07:06 +0100 Subject: Removed cBlockInfo.m_IsSnowable (#4105) * Removed cBlockInfo.m_IsSnowable * Return IsSnowable from deprecated variable binding m_IsSnowable. --- src/Bindings/DeprecatedBindings.cpp | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'src/Bindings/DeprecatedBindings.cpp') diff --git a/src/Bindings/DeprecatedBindings.cpp b/src/Bindings/DeprecatedBindings.cpp index 031b69356..a4e5c372b 100644 --- a/src/Bindings/DeprecatedBindings.cpp +++ b/src/Bindings/DeprecatedBindings.cpp @@ -347,6 +347,44 @@ static int tolua_set_cBlockInfo_m_PlaceSound(lua_State * tolua_S) +static int tolua_get_cBlockInfo_m_IsSnowable(lua_State * tolua_S) +{ + cLuaState L(tolua_S); + if (!L.CheckParamSelf("const cBlockInfo")) + { + return 0; + } + + const cBlockInfo * Self = nullptr; + L.GetStackValue(1, Self); + + L.Push(cBlockInfo::IsSnowable(Self->m_BlockType)); + LOGWARNING("cBlockInfo.m_IsSnowable is deprecated"); + L.LogStackTrace(0); + return 1; +} + + + + + +static int tolua_set_cBlockInfo_m_IsSnowable(lua_State * tolua_S) +{ + cLuaState L(tolua_S); + if (!L.CheckParamSelf("cBlockInfo")) + { + return 0; + } + + LOGWARNING("cBlockInfo.m_IsSnowable is deprecated in favour of cBlockInfo::IsSnowable()"); + L.LogStackTrace(0); + return 0; +} + + + + + static int tolua_get_cItem_m_Lore(lua_State * tolua_S) { // Maintain legacy m_Lore variable as Lore table split by ` (grave-accent) @@ -550,6 +588,7 @@ void DeprecatedBindings::Bind(lua_State * tolua_S) tolua_beginmodule(tolua_S, "cBlockInfo"); tolua_function(tolua_S, "GetPlaceSound", tolua_cBlockInfo_GetPlaceSound); tolua_variable(tolua_S, "m_PlaceSound", tolua_get_cBlockInfo_m_PlaceSound, tolua_set_cBlockInfo_m_PlaceSound); + tolua_variable(tolua_S, "m_IsSnowable", tolua_get_cBlockInfo_m_IsSnowable, tolua_set_cBlockInfo_m_IsSnowable); tolua_endmodule(tolua_S); tolua_beginmodule(tolua_S, "cItem"); -- cgit v1.2.3