summaryrefslogtreecommitdiffstats
path: root/source/Bindings.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-06-02 23:44:24 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-06-02 23:44:24 +0200
commitd2b3011c05890652b0aa09f6e128004056a98258 (patch)
tree8297f8386096a624f7762f6bb36d7170742952d5 /source/Bindings.cpp
parentEnchantments are now stored in Anvil world and in player inventory (diff)
downloadcuberite-d2b3011c05890652b0aa09f6e128004056a98258.tar
cuberite-d2b3011c05890652b0aa09f6e128004056a98258.tar.gz
cuberite-d2b3011c05890652b0aa09f6e128004056a98258.tar.bz2
cuberite-d2b3011c05890652b0aa09f6e128004056a98258.tar.lz
cuberite-d2b3011c05890652b0aa09f6e128004056a98258.tar.xz
cuberite-d2b3011c05890652b0aa09f6e128004056a98258.tar.zst
cuberite-d2b3011c05890652b0aa09f6e128004056a98258.zip
Diffstat (limited to '')
-rw-r--r--source/Bindings.cpp34
1 files changed, 33 insertions, 1 deletions
diff --git a/source/Bindings.cpp b/source/Bindings.cpp
index 50f417cc1..f4d24529d 100644
--- a/source/Bindings.cpp
+++ b/source/Bindings.cpp
@@ -1,6 +1,6 @@
/*
** Lua binding: AllToLua
-** Generated automatically by tolua++-1.0.92 on 06/02/13 12:36:50.
+** Generated automatically by tolua++-1.0.92 on 06/02/13 23:42:02.
*/
#ifndef __cplusplus
@@ -14145,6 +14145,37 @@ static int tolua_AllToLua_cEnchantments_IsEmpty00(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
+/* method: StringToEnchantmentID of class cEnchantments */
+#ifndef TOLUA_DISABLE_tolua_AllToLua_cEnchantments_StringToEnchantmentID00
+static int tolua_AllToLua_cEnchantments_StringToEnchantmentID00(lua_State* tolua_S)
+{
+#ifndef TOLUA_RELEASE
+ tolua_Error tolua_err;
+ if (
+ !tolua_isusertable(tolua_S,1,"cEnchantments",0,&tolua_err) ||
+ !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
+ !tolua_isnoobj(tolua_S,3,&tolua_err)
+ )
+ goto tolua_lerror;
+ else
+#endif
+ {
+ const AString a_EnchantmentName = ((const AString) tolua_tocppstring(tolua_S,2,0));
+ {
+ int tolua_ret = (int) cEnchantments::StringToEnchantmentID(a_EnchantmentName);
+ tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
+ tolua_pushcppstring(tolua_S,(const char*)a_EnchantmentName);
+ }
+ }
+ return 2;
+#ifndef TOLUA_RELEASE
+ tolua_lerror:
+ tolua_error(tolua_S,"#ferror in function 'StringToEnchantmentID'.",&tolua_err);
+ return 0;
+#endif
+}
+#endif //#ifndef TOLUA_DISABLE
+
/* method: new of class cItem */
#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_new00
static int tolua_AllToLua_cItem_new00(lua_State* tolua_S)
@@ -27701,6 +27732,7 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
tolua_function(tolua_S,"SetLevel",tolua_AllToLua_cEnchantments_SetLevel00);
tolua_function(tolua_S,"Clear",tolua_AllToLua_cEnchantments_Clear00);
tolua_function(tolua_S,"IsEmpty",tolua_AllToLua_cEnchantments_IsEmpty00);
+ tolua_function(tolua_S,"StringToEnchantmentID",tolua_AllToLua_cEnchantments_StringToEnchantmentID00);
tolua_endmodule(tolua_S);
#ifdef __cplusplus
tolua_cclass(tolua_S,"cItem","cItem","",tolua_collect_cItem);