diff options
author | Bond-009 <bond.009@outlook.com> | 2018-01-23 22:07:06 +0100 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2018-01-23 22:07:06 +0100 |
commit | d3a3c6ad2cafd95363f47f7d370a45425525fa35 (patch) | |
tree | 2395ab1c30413a7fc828a3f6da9726f9733d8d18 /src/Bindings/DeprecatedBindings.cpp | |
parent | Fix android build (#4169) (diff) | |
download | cuberite-d3a3c6ad2cafd95363f47f7d370a45425525fa35.tar cuberite-d3a3c6ad2cafd95363f47f7d370a45425525fa35.tar.gz cuberite-d3a3c6ad2cafd95363f47f7d370a45425525fa35.tar.bz2 cuberite-d3a3c6ad2cafd95363f47f7d370a45425525fa35.tar.lz cuberite-d3a3c6ad2cafd95363f47f7d370a45425525fa35.tar.xz cuberite-d3a3c6ad2cafd95363f47f7d370a45425525fa35.tar.zst cuberite-d3a3c6ad2cafd95363f47f7d370a45425525fa35.zip |
Diffstat (limited to 'src/Bindings/DeprecatedBindings.cpp')
-rw-r--r-- | src/Bindings/DeprecatedBindings.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
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"); |