summaryrefslogtreecommitdiffstats
path: root/src/Bindings/DeprecatedBindings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Bindings/DeprecatedBindings.cpp')
-rw-r--r--src/Bindings/DeprecatedBindings.cpp117
1 files changed, 117 insertions, 0 deletions
diff --git a/src/Bindings/DeprecatedBindings.cpp b/src/Bindings/DeprecatedBindings.cpp
index bb59fca7c..3ae1fd990 100644
--- a/src/Bindings/DeprecatedBindings.cpp
+++ b/src/Bindings/DeprecatedBindings.cpp
@@ -291,6 +291,114 @@ tolua_lerror:
+static int tolua_cBlockInfo_GetPlaceSound(lua_State * tolua_S)
+{
+ cLuaState L(tolua_S);
+ if (
+ !L.CheckParamStaticSelf("cBlockInfo") ||
+ !L.CheckParamNumber(2)
+ )
+ {
+ return 0;
+ }
+
+ L.Push("");
+ LOGWARNING("cBlockInfo:GetPlaceSound() is deprecated");
+ L.LogStackTrace(0);
+ return 1;
+}
+
+
+
+
+
+static int tolua_get_cBlockInfo_m_PlaceSound(lua_State * tolua_S)
+{
+ cLuaState L(tolua_S);
+ if (!L.CheckParamSelf("const cBlockInfo"))
+ {
+ return 0;
+ }
+
+ L.Push("");
+ LOGWARNING("cBlockInfo.m_PlaceSound is deprecated");
+ L.LogStackTrace(0);
+ return 1;
+}
+
+
+
+
+
+static int tolua_set_cBlockInfo_m_PlaceSound(lua_State * tolua_S)
+{
+ cLuaState L(tolua_S);
+ if (!L.CheckParamSelf("cBlockInfo"))
+ {
+ return 0;
+ }
+
+ LOGWARNING("cBlockInfo.m_PlaceSound is deprecated");
+ 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)
+ cLuaState L(tolua_S);
+ if (!L.CheckParamSelf("const cItem"))
+ {
+ return 0;
+ }
+
+ const cItem * Self = nullptr;
+ L.GetStackValue(1, Self);
+
+ AString LoreString = StringJoin(Self->m_LoreTable, "`");
+
+ L.Push(LoreString);
+
+ LOGWARNING("cItem.m_Lore is deprecated, use cItem.m_LoreTable instead");
+ L.LogStackTrace(0);
+ return 1;
+}
+
+
+
+
+
+static int tolua_set_cItem_m_Lore(lua_State * tolua_S)
+{
+ // Maintain legacy m_Lore variable as Lore table split by ` (grave-accent)
+ cLuaState L(tolua_S);
+ if (
+ !L.CheckParamSelf("cItem") ||
+ !L.CheckParamString(2)
+ )
+ {
+ return 0;
+ }
+
+ cItem * Self = nullptr;
+ AString LoreString;
+ L.GetStackValues(1, Self, LoreString);
+
+ Self->m_LoreTable = StringSplit(LoreString, "`");
+
+ LOGWARNING("cItem.m_Lore is deprecated, use cItem.m_LoreTable instead");
+ L.LogStackTrace(0);
+ return 0;
+}
+
+
+
+
+
/* method: Trace of class cTracer */
static int tolua_cTracer_Trace(lua_State * a_LuaState)
{
@@ -439,6 +547,15 @@ void DeprecatedBindings::Bind(lua_State * tolua_S)
tolua_function(tolua_S, "StringToMobType", tolua_AllToLua_StringToMobType00);
+ 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_endmodule(tolua_S);
+
+ tolua_beginmodule(tolua_S, "cItem");
+ tolua_variable(tolua_S, "m_Lore", tolua_get_cItem_m_Lore, tolua_set_cItem_m_Lore);
+ tolua_endmodule(tolua_S);
+
tolua_beginmodule(tolua_S, "cTracer");
tolua_function(tolua_S, "Trace", tolua_cTracer_Trace);
tolua_endmodule(tolua_S);