summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-27 08:57:35 +0200
committermadmaxoft <github@xoft.cz>2013-08-27 08:57:35 +0200
commitcdd0eba1b5fdad85c22a2e50683904f85e8b1eb6 (patch)
treea437bc457c2855dbab2859bc93f71e3aa739fa6c
parentFixed ProtoProxy compilation, added client Kick handling. (diff)
downloadcuberite-cdd0eba1b5fdad85c22a2e50683904f85e8b1eb6.tar
cuberite-cdd0eba1b5fdad85c22a2e50683904f85e8b1eb6.tar.gz
cuberite-cdd0eba1b5fdad85c22a2e50683904f85e8b1eb6.tar.bz2
cuberite-cdd0eba1b5fdad85c22a2e50683904f85e8b1eb6.tar.lz
cuberite-cdd0eba1b5fdad85c22a2e50683904f85e8b1eb6.tar.xz
cuberite-cdd0eba1b5fdad85c22a2e50683904f85e8b1eb6.tar.zst
cuberite-cdd0eba1b5fdad85c22a2e50683904f85e8b1eb6.zip
-rw-r--r--source/Bindings.cpp182
-rw-r--r--source/Bindings.h2
-rw-r--r--source/Defines.h10
3 files changed, 192 insertions, 2 deletions
diff --git a/source/Bindings.cpp b/source/Bindings.cpp
index 7bcf81b52..a9964b1a1 100644
--- a/source/Bindings.cpp
+++ b/source/Bindings.cpp
@@ -1,6 +1,6 @@
/*
** Lua binding: AllToLua
-** Generated automatically by tolua++-1.0.92 on 08/25/13 15:54:49.
+** Generated automatically by tolua++-1.0.92 on 08/27/13 08:55:56.
*/
#ifndef __cplusplus
@@ -3075,6 +3075,182 @@ static int tolua_set_AllToLua_g_BlockOneHitDig(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
+/* get function: g_BlockPistonBreakable */
+#ifndef TOLUA_DISABLE_tolua_get_AllToLua_g_BlockPistonBreakable
+static int tolua_get_AllToLua_g_BlockPistonBreakable(lua_State* tolua_S)
+{
+ int tolua_index;
+#ifndef TOLUA_RELEASE
+ {
+ tolua_Error tolua_err;
+ if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
+ tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err);
+ }
+#endif
+ tolua_index = (int)tolua_tonumber(tolua_S,2,0);
+#ifndef TOLUA_RELEASE
+ if (tolua_index<0 || tolua_index>=256)
+ tolua_error(tolua_S,"array indexing out of range.",NULL);
+#endif
+ tolua_pushboolean(tolua_S,(bool)g_BlockPistonBreakable[tolua_index]);
+ return 1;
+}
+#endif //#ifndef TOLUA_DISABLE
+
+/* set function: g_BlockPistonBreakable */
+#ifndef TOLUA_DISABLE_tolua_set_AllToLua_g_BlockPistonBreakable
+static int tolua_set_AllToLua_g_BlockPistonBreakable(lua_State* tolua_S)
+{
+ int tolua_index;
+#ifndef TOLUA_RELEASE
+ {
+ tolua_Error tolua_err;
+ if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
+ tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err);
+ }
+#endif
+ tolua_index = (int)tolua_tonumber(tolua_S,2,0);
+#ifndef TOLUA_RELEASE
+ if (tolua_index<0 || tolua_index>=256)
+ tolua_error(tolua_S,"array indexing out of range.",NULL);
+#endif
+ g_BlockPistonBreakable[tolua_index] = ((bool) tolua_toboolean(tolua_S,3,0));
+ return 0;
+}
+#endif //#ifndef TOLUA_DISABLE
+
+/* get function: g_BlockIsSnowable */
+#ifndef TOLUA_DISABLE_tolua_get_AllToLua_g_BlockIsSnowable
+static int tolua_get_AllToLua_g_BlockIsSnowable(lua_State* tolua_S)
+{
+ int tolua_index;
+#ifndef TOLUA_RELEASE
+ {
+ tolua_Error tolua_err;
+ if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
+ tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err);
+ }
+#endif
+ tolua_index = (int)tolua_tonumber(tolua_S,2,0);
+#ifndef TOLUA_RELEASE
+ if (tolua_index<0 || tolua_index>=256)
+ tolua_error(tolua_S,"array indexing out of range.",NULL);
+#endif
+ tolua_pushboolean(tolua_S,(bool)g_BlockIsSnowable[tolua_index]);
+ return 1;
+}
+#endif //#ifndef TOLUA_DISABLE
+
+/* set function: g_BlockIsSnowable */
+#ifndef TOLUA_DISABLE_tolua_set_AllToLua_g_BlockIsSnowable
+static int tolua_set_AllToLua_g_BlockIsSnowable(lua_State* tolua_S)
+{
+ int tolua_index;
+#ifndef TOLUA_RELEASE
+ {
+ tolua_Error tolua_err;
+ if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
+ tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err);
+ }
+#endif
+ tolua_index = (int)tolua_tonumber(tolua_S,2,0);
+#ifndef TOLUA_RELEASE
+ if (tolua_index<0 || tolua_index>=256)
+ tolua_error(tolua_S,"array indexing out of range.",NULL);
+#endif
+ g_BlockIsSnowable[tolua_index] = ((bool) tolua_toboolean(tolua_S,3,0));
+ return 0;
+}
+#endif //#ifndef TOLUA_DISABLE
+
+/* get function: g_BlockRequiresSpecialTool */
+#ifndef TOLUA_DISABLE_tolua_get_AllToLua_g_BlockRequiresSpecialTool
+static int tolua_get_AllToLua_g_BlockRequiresSpecialTool(lua_State* tolua_S)
+{
+ int tolua_index;
+#ifndef TOLUA_RELEASE
+ {
+ tolua_Error tolua_err;
+ if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
+ tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err);
+ }
+#endif
+ tolua_index = (int)tolua_tonumber(tolua_S,2,0);
+#ifndef TOLUA_RELEASE
+ if (tolua_index<0 || tolua_index>=256)
+ tolua_error(tolua_S,"array indexing out of range.",NULL);
+#endif
+ tolua_pushboolean(tolua_S,(bool)g_BlockRequiresSpecialTool[tolua_index]);
+ return 1;
+}
+#endif //#ifndef TOLUA_DISABLE
+
+/* set function: g_BlockRequiresSpecialTool */
+#ifndef TOLUA_DISABLE_tolua_set_AllToLua_g_BlockRequiresSpecialTool
+static int tolua_set_AllToLua_g_BlockRequiresSpecialTool(lua_State* tolua_S)
+{
+ int tolua_index;
+#ifndef TOLUA_RELEASE
+ {
+ tolua_Error tolua_err;
+ if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
+ tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err);
+ }
+#endif
+ tolua_index = (int)tolua_tonumber(tolua_S,2,0);
+#ifndef TOLUA_RELEASE
+ if (tolua_index<0 || tolua_index>=256)
+ tolua_error(tolua_S,"array indexing out of range.",NULL);
+#endif
+ g_BlockRequiresSpecialTool[tolua_index] = ((bool) tolua_toboolean(tolua_S,3,0));
+ return 0;
+}
+#endif //#ifndef TOLUA_DISABLE
+
+/* get function: g_BlockIsSolid */
+#ifndef TOLUA_DISABLE_tolua_get_AllToLua_g_BlockIsSolid
+static int tolua_get_AllToLua_g_BlockIsSolid(lua_State* tolua_S)
+{
+ int tolua_index;
+#ifndef TOLUA_RELEASE
+ {
+ tolua_Error tolua_err;
+ if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
+ tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err);
+ }
+#endif
+ tolua_index = (int)tolua_tonumber(tolua_S,2,0);
+#ifndef TOLUA_RELEASE
+ if (tolua_index<0 || tolua_index>=256)
+ tolua_error(tolua_S,"array indexing out of range.",NULL);
+#endif
+ tolua_pushboolean(tolua_S,(bool)g_BlockIsSolid[tolua_index]);
+ return 1;
+}
+#endif //#ifndef TOLUA_DISABLE
+
+/* set function: g_BlockIsSolid */
+#ifndef TOLUA_DISABLE_tolua_set_AllToLua_g_BlockIsSolid
+static int tolua_set_AllToLua_g_BlockIsSolid(lua_State* tolua_S)
+{
+ int tolua_index;
+#ifndef TOLUA_RELEASE
+ {
+ tolua_Error tolua_err;
+ if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
+ tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err);
+ }
+#endif
+ tolua_index = (int)tolua_tonumber(tolua_S,2,0);
+#ifndef TOLUA_RELEASE
+ if (tolua_index<0 || tolua_index>=256)
+ tolua_error(tolua_S,"array indexing out of range.",NULL);
+#endif
+ g_BlockIsSolid[tolua_index] = ((bool) tolua_toboolean(tolua_S,3,0));
+ return 0;
+}
+#endif //#ifndef TOLUA_DISABLE
+
/* function: ClickActionToString */
#ifndef TOLUA_DISABLE_tolua_AllToLua_ClickActionToString00
static int tolua_AllToLua_ClickActionToString00(lua_State* tolua_S)
@@ -27678,6 +27854,10 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
tolua_array(tolua_S,"g_BlockSpreadLightFalloff",tolua_get_AllToLua_g_BlockSpreadLightFalloff,tolua_set_AllToLua_g_BlockSpreadLightFalloff);
tolua_array(tolua_S,"g_BlockTransparent",tolua_get_AllToLua_g_BlockTransparent,tolua_set_AllToLua_g_BlockTransparent);
tolua_array(tolua_S,"g_BlockOneHitDig",tolua_get_AllToLua_g_BlockOneHitDig,tolua_set_AllToLua_g_BlockOneHitDig);
+ tolua_array(tolua_S,"g_BlockPistonBreakable",tolua_get_AllToLua_g_BlockPistonBreakable,tolua_set_AllToLua_g_BlockPistonBreakable);
+ tolua_array(tolua_S,"g_BlockIsSnowable",tolua_get_AllToLua_g_BlockIsSnowable,tolua_set_AllToLua_g_BlockIsSnowable);
+ tolua_array(tolua_S,"g_BlockRequiresSpecialTool",tolua_get_AllToLua_g_BlockRequiresSpecialTool,tolua_set_AllToLua_g_BlockRequiresSpecialTool);
+ tolua_array(tolua_S,"g_BlockIsSolid",tolua_get_AllToLua_g_BlockIsSolid,tolua_set_AllToLua_g_BlockIsSolid);
tolua_constant(tolua_S,"BLOCK_FACE_NONE",BLOCK_FACE_NONE);
tolua_constant(tolua_S,"BLOCK_FACE_BOTTOM",BLOCK_FACE_BOTTOM);
tolua_constant(tolua_S,"BLOCK_FACE_TOP",BLOCK_FACE_TOP);
diff --git a/source/Bindings.h b/source/Bindings.h
index 97c582582..4c68ffbe9 100644
--- a/source/Bindings.h
+++ b/source/Bindings.h
@@ -1,6 +1,6 @@
/*
** Lua binding: AllToLua
-** Generated automatically by tolua++-1.0.92 on 08/25/13 15:54:49.
+** Generated automatically by tolua++-1.0.92 on 08/27/13 08:55:57.
*/
/* Exported function */
diff --git a/source/Defines.h b/source/Defines.h
index 48a7cfb1e..6bc1a18f6 100644
--- a/source/Defines.h
+++ b/source/Defines.h
@@ -29,6 +29,16 @@ extern bool g_BlockTransparent[];
/// Is a block destroyed after a single hit?
extern bool g_BlockOneHitDig[];
+/// Can a piston break this block?
+extern bool g_BlockPistonBreakable[256];
+
+/// Can this block hold snow atop?
+extern bool g_BlockIsSnowable[256];
+
+extern bool g_BlockRequiresSpecialTool[256];
+
+extern bool g_BlockIsSolid[256];
+