From 6835f21b8b69c2c43b9a5b96b70f923a1fd9aa07 Mon Sep 17 00:00:00 2001 From: "nielsbreu@gmail.com" Date: Sun, 9 Jun 2013 17:38:10 +0000 Subject: Added SetTicksUntilWeatherChange/GetTicksUntilWeatherChange. to set/get the amount of ticks before the weather changes. Added SendBlockChange to Lua to create "fake" blocks git-svn-id: http://mc-server.googlecode.com/svn/trunk@1572 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Bindings.cpp | 9537 ++++++++++++++++++------------------------------- source/Bindings.h | 2 +- source/ClientHandle.h | 2 +- source/World.h | 10 +- 4 files changed, 3549 insertions(+), 6002 deletions(-) diff --git a/source/Bindings.cpp b/source/Bindings.cpp index bd4abb140..9fd31297c 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/04/13 21:16:57. +** Generated automatically by tolua++-1.0.92 on 06/09/13 19:37:21. */ #ifndef __cplusplus @@ -16,6 +16,10 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S); #include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules #include "tolua_base.h" #include "ChunkDef.h" +#include "Torch.h" +#include "Stairs.h" +#include "Ladder.h" +#include "Vine.h" #include "../iniFile/iniFile.h" #include "BlockID.h" #include "Defines.h" @@ -32,15 +36,9 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S); #include "Server.h" #include "World.h" #include "Inventory.h" -#include "Enchantments.h" #include "Item.h" #include "ItemGrid.h" -#include "BlockEntities/BlockEntity.h" -#include "BlockEntities/BlockEntityWithItems.h" -#include "BlockEntities/ChestEntity.h" -#include "BlockEntities/DropSpenserEntity.h" -#include "BlockEntities/DispenserEntity.h" -#include "BlockEntities/DropperEntity.h" +#include "ChestEntity.h" #include "WebAdmin.h" #include "WebPlugin.h" #include "Pickup.h" @@ -55,8 +53,6 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S); #include "BlockArea.h" #include "Generating/ChunkDesc.h" #include "CraftingRecipes.h" -#include "UI/Window.h" -#include "LuaWindow.h" /* function to release collected object via destructor */ #ifdef __cplusplus @@ -75,79 +71,44 @@ static int tolua_collect_Vector3f (lua_State* tolua_S) return 0; } -static int tolua_collect_cChestEntity (lua_State* tolua_S) -{ - cChestEntity* self = (cChestEntity*) tolua_tousertype(tolua_S,1,0); - Mtolua_delete(self); - return 0; -} - -static int tolua_collect_cDispenserEntity (lua_State* tolua_S) -{ - cDispenserEntity* self = (cDispenserEntity*) tolua_tousertype(tolua_S,1,0); - Mtolua_delete(self); - return 0; -} - -static int tolua_collect_cCuboid (lua_State* tolua_S) -{ - cCuboid* self = (cCuboid*) tolua_tousertype(tolua_S,1,0); - Mtolua_delete(self); - return 0; -} - -static int tolua_collect_cBlockEntity (lua_State* tolua_S) -{ - cBlockEntity* self = (cBlockEntity*) tolua_tousertype(tolua_S,1,0); - Mtolua_delete(self); - return 0; -} - -static int tolua_collect_cBlockArea (lua_State* tolua_S) -{ - cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); - Mtolua_delete(self); - return 0; -} - -static int tolua_collect_cEnchantments (lua_State* tolua_S) +static int tolua_collect_cIniFile (lua_State* tolua_S) { - cEnchantments* self = (cEnchantments*) tolua_tousertype(tolua_S,1,0); + cIniFile* self = (cIniFile*) tolua_tousertype(tolua_S,1,0); Mtolua_delete(self); return 0; } -static int tolua_collect_cLuaWindow (lua_State* tolua_S) +static int tolua_collect_cPickup (lua_State* tolua_S) { - cLuaWindow* self = (cLuaWindow*) tolua_tousertype(tolua_S,1,0); + cPickup* self = (cPickup*) tolua_tousertype(tolua_S,1,0); Mtolua_delete(self); return 0; } -static int tolua_collect_cDropperEntity (lua_State* tolua_S) +static int tolua_collect_cItems (lua_State* tolua_S) { - cDropperEntity* self = (cDropperEntity*) tolua_tousertype(tolua_S,1,0); + cItems* self = (cItems*) tolua_tousertype(tolua_S,1,0); Mtolua_delete(self); return 0; } -static int tolua_collect_cPickup (lua_State* tolua_S) +static int tolua_collect_cChestEntity (lua_State* tolua_S) { - cPickup* self = (cPickup*) tolua_tousertype(tolua_S,1,0); + cChestEntity* self = (cChestEntity*) tolua_tousertype(tolua_S,1,0); Mtolua_delete(self); return 0; } -static int tolua_collect_cItems (lua_State* tolua_S) +static int tolua_collect_cCraftingGrid (lua_State* tolua_S) { - cItems* self = (cItems*) tolua_tousertype(tolua_S,1,0); + cCraftingGrid* self = (cCraftingGrid*) tolua_tousertype(tolua_S,1,0); Mtolua_delete(self); return 0; } -static int tolua_collect_cCraftingGrid (lua_State* tolua_S) +static int tolua_collect_cCuboid (lua_State* tolua_S) { - cCraftingGrid* self = (cCraftingGrid*) tolua_tousertype(tolua_S,1,0); + cCuboid* self = (cCuboid*) tolua_tousertype(tolua_S,1,0); Mtolua_delete(self); return 0; } @@ -159,9 +120,9 @@ static int tolua_collect_Vector3i (lua_State* tolua_S) return 0; } -static int tolua_collect_cIniFile (lua_State* tolua_S) +static int tolua_collect_cBlockArea (lua_State* tolua_S) { - cIniFile* self = (cIniFile*) tolua_tousertype(tolua_S,1,0); + cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); Mtolua_delete(self); return 0; } @@ -187,61 +148,266 @@ static void tolua_reg_types (lua_State* tolua_S) { tolua_usertype(tolua_S,"TakeDamageInfo"); tolua_usertype(tolua_S,"cCraftingRecipe"); - tolua_usertype(tolua_S,"cEntity"); + tolua_usertype(tolua_S,"cPlugin_NewLua"); tolua_usertype(tolua_S,"cStringMap"); tolua_usertype(tolua_S,"cItemGrid"); tolua_usertype(tolua_S,"cBlockArea"); - tolua_usertype(tolua_S,"cEnchantments"); - tolua_usertype(tolua_S,"cLuaWindow"); tolua_usertype(tolua_S,"cInventory"); tolua_usertype(tolua_S,"cRoot"); - tolua_usertype(tolua_S,"cWindow"); - tolua_usertype(tolua_S,"cCraftingGrid"); tolua_usertype(tolua_S,"cPickup"); tolua_usertype(tolua_S,"cItems"); - tolua_usertype(tolua_S,"cGroup"); tolua_usertype(tolua_S,"cClientHandle"); tolua_usertype(tolua_S,"cChunkDesc"); tolua_usertype(tolua_S,"cFurnaceRecipe"); - tolua_usertype(tolua_S,"cTracer"); + tolua_usertype(tolua_S,"cCraftingGrid"); tolua_usertype(tolua_S,"cChatColor"); - tolua_usertype(tolua_S,"cCuboid"); - tolua_usertype(tolua_S,"Vector3i"); + tolua_usertype(tolua_S,"cGroup"); + tolua_usertype(tolua_S,"cTracer"); tolua_usertype(tolua_S,"Lua__cWebPlugin"); tolua_usertype(tolua_S,"Lua__cPawn"); - tolua_usertype(tolua_S,"cPlugin_NewLua"); + tolua_usertype(tolua_S,"cCuboid"); tolua_usertype(tolua_S,"cItem"); tolua_usertype(tolua_S,"Vector3f"); - tolua_usertype(tolua_S,"cWebAdmin"); - tolua_usertype(tolua_S,"cDropSpenserEntity"); - tolua_usertype(tolua_S,"Lua__cPlayer"); + tolua_usertype(tolua_S,"Vector3i"); tolua_usertype(tolua_S,"cCraftingRecipes"); + tolua_usertype(tolua_S,"Lua__cPlayer"); + tolua_usertype(tolua_S,"cStairs"); tolua_usertype(tolua_S,"cChestEntity"); - tolua_usertype(tolua_S,"cDispenserEntity"); - tolua_usertype(tolua_S,"cItemGrid::cListener"); + tolua_usertype(tolua_S,"cWebAdmin"); + tolua_usertype(tolua_S,"cGroupManager"); tolua_usertype(tolua_S,"cBlockEntity"); - tolua_usertype(tolua_S,"cCriticalSection"); tolua_usertype(tolua_S,"Lua__cPickup"); tolua_usertype(tolua_S,"cWebPlugin"); + tolua_usertype(tolua_S,"cPluginManager"); tolua_usertype(tolua_S,"HTTPRequest"); tolua_usertype(tolua_S,"HTTPFormData"); - tolua_usertype(tolua_S,"cDropperEntity"); - tolua_usertype(tolua_S,"cPluginManager"); + tolua_usertype(tolua_S,"cLadder"); tolua_usertype(tolua_S,"cWorld"); + tolua_usertype(tolua_S,"cEntity"); tolua_usertype(tolua_S,"cIniFile"); tolua_usertype(tolua_S,"cPlugin"); tolua_usertype(tolua_S,"AStringVector"); - tolua_usertype(tolua_S,"cPawn"); + tolua_usertype(tolua_S,"cVine"); tolua_usertype(tolua_S,"cPlayer"); - tolua_usertype(tolua_S,"cGroupManager"); + tolua_usertype(tolua_S,"cTorch"); tolua_usertype(tolua_S,"cBlockEntityWindowOwner"); - tolua_usertype(tolua_S,"cBlockEntityWithItems"); tolua_usertype(tolua_S,"cServer"); - tolua_usertype(tolua_S,"cListeners"); + tolua_usertype(tolua_S,"Lua__cChestEntity"); + tolua_usertype(tolua_S,"cPawn"); tolua_usertype(tolua_S,"Lua__cEntity"); tolua_usertype(tolua_S,"Vector3d"); } +/* method: DirectionToMetaData of class cTorch */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cTorch_DirectionToMetaData00 +static int tolua_AllToLua_cTorch_DirectionToMetaData00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"cTorch",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + char a_Direction = ((char) tolua_tonumber(tolua_S,2,0)); + { + char tolua_ret = (char) cTorch::DirectionToMetaData(a_Direction); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'DirectionToMetaData'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: MetaDataToDirection of class cTorch */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cTorch_MetaDataToDirection00 +static int tolua_AllToLua_cTorch_MetaDataToDirection00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"cTorch",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + char a_MetaData = ((char) tolua_tonumber(tolua_S,2,0)); + { + char tolua_ret = (char) cTorch::MetaDataToDirection(a_MetaData); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'MetaDataToDirection'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: RotationToMetaData of class cStairs */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cStairs_RotationToMetaData00 +static int tolua_AllToLua_cStairs_RotationToMetaData00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"cStairs",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + double a_Rotation = ((double) tolua_tonumber(tolua_S,2,0)); + { + unsigned char tolua_ret = (unsigned char) cStairs::RotationToMetaData(a_Rotation); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'RotationToMetaData'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: DirectionToMetaData of class cLadder */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cLadder_DirectionToMetaData00 +static int tolua_AllToLua_cLadder_DirectionToMetaData00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"cLadder",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + char a_Direction = ((char) tolua_tonumber(tolua_S,2,0)); + { + char tolua_ret = (char) cLadder::DirectionToMetaData(a_Direction); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'DirectionToMetaData'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: MetaDataToDirection of class cLadder */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cLadder_MetaDataToDirection00 +static int tolua_AllToLua_cLadder_MetaDataToDirection00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"cLadder",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + char a_MetaData = ((char) tolua_tonumber(tolua_S,2,0)); + { + char tolua_ret = (char) cLadder::MetaDataToDirection(a_MetaData); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'MetaDataToDirection'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: DirectionToMetaData of class cVine */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cVine_DirectionToMetaData00 +static int tolua_AllToLua_cVine_DirectionToMetaData00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"cVine",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + char a_BlockFace = ((char) tolua_tonumber(tolua_S,2,0)); + { + unsigned char tolua_ret = (unsigned char) cVine::DirectionToMetaData(a_BlockFace); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'DirectionToMetaData'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: MetaDataToDirection of class cVine */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cVine_MetaDataToDirection00 +static int tolua_AllToLua_cVine_MetaDataToDirection00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"cVine",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + unsigned char a_MetaData = (( unsigned char) tolua_tonumber(tolua_S,2,0)); + { + char tolua_ret = (char) cVine::MetaDataToDirection(a_MetaData); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'MetaDataToDirection'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + /* method: new of class cIniFile */ #ifndef TOLUA_DISABLE_tolua_AllToLua_cIniFile_new00 static int tolua_AllToLua_cIniFile_new00(lua_State* tolua_S) @@ -3115,65 +3281,36 @@ static int tolua_AllToLua_ItemCategory_IsBoots00(lua_State* tolua_S) } #endif //#ifndef TOLUA_DISABLE -/* function: ItemCategory::IsArmor */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_ItemCategory_IsArmor00 -static int tolua_AllToLua_ItemCategory_IsArmor00(lua_State* tolua_S) +/* function: GetTime */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_GetTime00 +static int tolua_AllToLua_GetTime00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isnumber(tolua_S,1,0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isnoobj(tolua_S,1,&tolua_err) ) goto tolua_lerror; else #endif { - short a_ItemType = ((short) tolua_tonumber(tolua_S,1,0)); { - bool tolua_ret = (bool) ItemCategory::IsArmor(a_ItemType); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + unsigned int tolua_ret = (unsigned int) GetTime(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsArmor'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetTime'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* function: GetTime */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_GetTime00 -static int tolua_AllToLua_GetTime00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isnoobj(tolua_S,1,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - { - unsigned int tolua_ret = (unsigned int) GetTime(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetTime'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* function: GetChar */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_GetChar00 -static int tolua_AllToLua_GetChar00(lua_State* tolua_S) +/* function: GetChar */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_GetChar00 +static int tolua_AllToLua_GetChar00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; @@ -3613,6 +3750,47 @@ static int tolua_AllToLua_cClientHandle_Kick00(lua_State* tolua_S) } #endif //#ifndef TOLUA_DISABLE +/* method: SendBlockChange of class cClientHandle */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cClientHandle_SendBlockChange00 +static int tolua_AllToLua_cClientHandle_SendBlockChange00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"cClientHandle",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnoobj(tolua_S,7,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + cClientHandle* self = (cClientHandle*) tolua_tousertype(tolua_S,1,0); + int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); + int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); + unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,5,0)); + unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,6,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SendBlockChange'", NULL); +#endif + { + self->SendBlockChange(a_BlockX,a_BlockY,a_BlockZ,a_BlockType,a_BlockMeta); + } + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'SendBlockChange'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + /* method: GetUsername of class cClientHandle */ #ifndef TOLUA_DISABLE_tolua_AllToLua_cClientHandle_GetUsername00 static int tolua_AllToLua_cClientHandle_GetUsername00(lua_State* tolua_S) @@ -4158,38 +4336,6 @@ static int tolua_AllToLua_cEntity_GetHeadYaw00(lua_State* tolua_S) } #endif //#ifndef TOLUA_DISABLE -/* method: GetHeight of class cEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cEntity_GetHeight00 -static int tolua_AllToLua_cEntity_GetHeight00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cEntity",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cEntity* self = (const cEntity*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetHeight'", NULL); -#endif - { - double tolua_ret = (double) self->GetHeight(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetHeight'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - /* method: GetMass of class cEntity */ #ifndef TOLUA_DISABLE_tolua_AllToLua_cEntity_GetMass00 static int tolua_AllToLua_cEntity_GetMass00(lua_State* tolua_S) @@ -4648,38 +4794,6 @@ static int tolua_AllToLua_cEntity_GetSpeedZ00(lua_State* tolua_S) } #endif //#ifndef TOLUA_DISABLE -/* method: GetWidth of class cEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cEntity_GetWidth00 -static int tolua_AllToLua_cEntity_GetWidth00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cEntity",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cEntity* self = (const cEntity*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetWidth'", NULL); -#endif - { - double tolua_ret = (double) self->GetWidth(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetWidth'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - /* method: GetChunkX of class cEntity */ #ifndef TOLUA_DISABLE_tolua_AllToLua_cEntity_GetChunkX00 static int tolua_AllToLua_cEntity_GetChunkX00(lua_State* tolua_S) @@ -4777,39 +4891,6 @@ static int tolua_AllToLua_cEntity_SetHeadYaw00(lua_State* tolua_S) } #endif //#ifndef TOLUA_DISABLE -/* method: SetHeight of class cEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cEntity_SetHeight00 -static int tolua_AllToLua_cEntity_SetHeight00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cEntity",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cEntity* self = (cEntity*) tolua_tousertype(tolua_S,1,0); - double a_Height = ((double) tolua_tonumber(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetHeight'", NULL); -#endif - { - self->SetHeight(a_Height); - } - } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetHeight'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - /* method: SetMass of class cEntity */ #ifndef TOLUA_DISABLE_tolua_AllToLua_cEntity_SetMass00 static int tolua_AllToLua_cEntity_SetMass00(lua_State* tolua_S) @@ -5303,39 +5384,6 @@ static int tolua_AllToLua_cEntity_SetSpeedZ00(lua_State* tolua_S) } #endif //#ifndef TOLUA_DISABLE -/* method: SetWidth of class cEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cEntity_SetWidth00 -static int tolua_AllToLua_cEntity_SetWidth00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cEntity",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cEntity* self = (cEntity*) tolua_tousertype(tolua_S,1,0); - double a_Width = ((double) tolua_tonumber(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetWidth'", NULL); -#endif - { - self->SetWidth(a_Width); - } - } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetWidth'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - /* method: AddPosX of class cEntity */ #ifndef TOLUA_DISABLE_tolua_AllToLua_cEntity_AddPosX00 static int tolua_AllToLua_cEntity_AddPosX00(lua_State* tolua_S) @@ -8050,20 +8098,20 @@ static int tolua_AllToLua_cPlayer_GetEquippedItem00(lua_State* tolua_S) #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cPlayer",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cPlayer",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - const cPlayer* self = (const cPlayer*) tolua_tousertype(tolua_S,1,0); + cPlayer* self = (cPlayer*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetEquippedItem'", NULL); #endif { - const cItem& tolua_ret = (const cItem&) self->GetEquippedItem(); - tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const cItem"); + cItem& tolua_ret = (cItem&) self->GetEquippedItem(); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"cItem"); } } return 1; @@ -8333,106 +8381,6 @@ static int tolua_AllToLua_cPlayer_MoveTo00(lua_State* tolua_S) } #endif //#ifndef TOLUA_DISABLE -/* method: GetWindow of class cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_GetWindow00 -static int tolua_AllToLua_cPlayer_GetWindow00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cPlayer",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cPlayer* self = (cPlayer*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetWindow'", NULL); -#endif - { - cWindow* tolua_ret = (cWindow*) self->GetWindow(); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cWindow"); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetWindow'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: CloseWindow of class cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_CloseWindow00 -static int tolua_AllToLua_cPlayer_CloseWindow00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cPlayer",0,&tolua_err) || - !tolua_isboolean(tolua_S,2,1,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cPlayer* self = (cPlayer*) tolua_tousertype(tolua_S,1,0); - bool a_CanRefuse = ((bool) tolua_toboolean(tolua_S,2,true)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'CloseWindow'", NULL); -#endif - { - self->CloseWindow(a_CanRefuse); - } - } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'CloseWindow'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: CloseWindowIfID of class cPlayer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_CloseWindowIfID00 -static int tolua_AllToLua_cPlayer_CloseWindowIfID00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cPlayer",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isboolean(tolua_S,3,1,&tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cPlayer* self = (cPlayer*) tolua_tousertype(tolua_S,1,0); - char a_WindowID = ((char) tolua_tonumber(tolua_S,2,0)); - bool a_CanRefuse = ((bool) tolua_toboolean(tolua_S,3,true)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'CloseWindowIfID'", NULL); -#endif - { - self->CloseWindowIfID(a_WindowID,a_CanRefuse); - } - } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'CloseWindowIfID'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - /* method: GetClientHandle of class cPlayer */ #ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_GetClientHandle00 static int tolua_AllToLua_cPlayer_GetClientHandle00(lua_State* tolua_S) @@ -10403,8 +10351,40 @@ static int tolua_AllToLua_cWorld_GetTime00(lua_State* tolua_S) } #endif //#ifndef TOLUA_DISABLE -/* method: GetWorldAge of class cWorld */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cWorld_GetWorldAge00 +/* method: GetTicksUntilWeatherChange of class cWorld */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cWorld_GetTicksUntilWeatherChange00 +static int tolua_AllToLua_cWorld_GetTicksUntilWeatherChange00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const cWorld",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const cWorld* self = (const cWorld*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetTicksUntilWeatherChange'", NULL); +#endif + { + int tolua_ret = (int) self->GetTicksUntilWeatherChange(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetTicksUntilWeatherChange'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetWorldAge of class cWorld */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cWorld_GetWorldAge00 static int tolua_AllToLua_cWorld_GetWorldAge00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE @@ -10467,6 +10447,39 @@ static int tolua_AllToLua_cWorld_GetTimeOfDay00(lua_State* tolua_S) } #endif //#ifndef TOLUA_DISABLE +/* method: SetTicksUntilWeatherChange of class cWorld */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cWorld_SetTicksUntilWeatherChange00 +static int tolua_AllToLua_cWorld_SetTicksUntilWeatherChange00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"cWorld",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + cWorld* self = (cWorld*) tolua_tousertype(tolua_S,1,0); + int a_WeatherInterval = ((int) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetTicksUntilWeatherChange'", NULL); +#endif + { + self->SetTicksUntilWeatherChange(a_WeatherInterval); + } + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'SetTicksUntilWeatherChange'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + /* method: SetTimeOfDay of class cWorld */ #ifndef TOLUA_DISABLE_tolua_AllToLua_cWorld_SetTimeOfDay00 static int tolua_AllToLua_cWorld_SetTimeOfDay00(lua_State* tolua_S) @@ -10793,6 +10806,72 @@ static int tolua_AllToLua_cWorld_SetMaxPlayers00(lua_State* tolua_S) } #endif //#ifndef TOLUA_DISABLE +/* method: AddPlayer of class cWorld */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cWorld_AddPlayer00 +static int tolua_AllToLua_cWorld_AddPlayer00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"cWorld",0,&tolua_err) || + !tolua_isusertype(tolua_S,2,"cPlayer",0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + cWorld* self = (cWorld*) tolua_tousertype(tolua_S,1,0); + cPlayer* a_Player = ((cPlayer*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddPlayer'", NULL); +#endif + { + self->AddPlayer(a_Player); + } + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'AddPlayer'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: RemovePlayer of class cWorld */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cWorld_RemovePlayer00 +static int tolua_AllToLua_cWorld_RemovePlayer00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"cWorld",0,&tolua_err) || + !tolua_isusertype(tolua_S,2,"cPlayer",0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + cWorld* self = (cWorld*) tolua_tousertype(tolua_S,1,0); + cPlayer* a_Player = ((cPlayer*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RemovePlayer'", NULL); +#endif + { + self->RemovePlayer(a_Player); + } + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'RemovePlayer'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + /* method: GetNumPlayers of class cWorld */ #ifndef TOLUA_DISABLE_tolua_AllToLua_cWorld_GetNumPlayers00 static int tolua_AllToLua_cWorld_GetNumPlayers00(lua_State* tolua_S) @@ -12648,224 +12727,217 @@ static int tolua_AllToLua_cInventory_Clear00(lua_State* tolua_S) } #endif //#ifndef TOLUA_DISABLE -/* method: HowManyCanFit of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_HowManyCanFit00 -static int tolua_AllToLua_cInventory_HowManyCanFit00(lua_State* tolua_S) +/* method: AddItem of class cInventory */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_AddItem00 +static int tolua_AllToLua_cInventory_AddItem00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cInventory",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cItem",0,&tolua_err)) || - !tolua_isboolean(tolua_S,3,0,&tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"cItem",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { cInventory* self = (cInventory*) tolua_tousertype(tolua_S,1,0); - const cItem* a_ItemStack = ((const cItem*) tolua_tousertype(tolua_S,2,0)); - bool a_ConsiderEmptySlots = ((bool) tolua_toboolean(tolua_S,3,0)); + cItem* a_Item = ((cItem*) tolua_tousertype(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HowManyCanFit'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddItem'", NULL); #endif { - int tolua_ret = (int) self->HowManyCanFit(*a_ItemStack,a_ConsiderEmptySlots); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + bool tolua_ret = (bool) self->AddItem(*a_Item); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'HowManyCanFit'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'AddItem'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: HowManyCanFit of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_HowManyCanFit01 -static int tolua_AllToLua_cInventory_HowManyCanFit01(lua_State* tolua_S) +/* method: AddItemAnyAmount of class cInventory */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_AddItemAnyAmount00 +static int tolua_AllToLua_cInventory_AddItemAnyAmount00(lua_State* tolua_S) { +#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cInventory",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cItem",0,&tolua_err)) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isboolean(tolua_S,5,0,&tolua_err) || - !tolua_isnoobj(tolua_S,6,&tolua_err) + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"cItem",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else +#endif { cInventory* self = (cInventory*) tolua_tousertype(tolua_S,1,0); - const cItem* a_ItemStack = ((const cItem*) tolua_tousertype(tolua_S,2,0)); - int a_BeginSlotNum = ((int) tolua_tonumber(tolua_S,3,0)); - int a_EndSlotNum = ((int) tolua_tonumber(tolua_S,4,0)); - bool a_ConsiderEmptySlots = ((bool) tolua_toboolean(tolua_S,5,0)); + cItem* a_Item = ((cItem*) tolua_tousertype(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HowManyCanFit'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddItemAnyAmount'", NULL); #endif { - int tolua_ret = (int) self->HowManyCanFit(*a_ItemStack,a_BeginSlotNum,a_EndSlotNum,a_ConsiderEmptySlots); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + bool tolua_ret = (bool) self->AddItemAnyAmount(*a_Item); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } return 1; -tolua_lerror: - return tolua_AllToLua_cInventory_HowManyCanFit00(tolua_S); +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'AddItemAnyAmount'.",&tolua_err); + return 0; +#endif } #endif //#ifndef TOLUA_DISABLE -/* method: AddItem of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_AddItem00 -static int tolua_AllToLua_cInventory_AddItem00(lua_State* tolua_S) +/* method: RemoveItem of class cInventory */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_RemoveItem00 +static int tolua_AllToLua_cInventory_RemoveItem00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cInventory",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cItem",0,&tolua_err)) || - !tolua_isboolean(tolua_S,3,1,&tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"cItem",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { cInventory* self = (cInventory*) tolua_tousertype(tolua_S,1,0); - const cItem* a_ItemStack = ((const cItem*) tolua_tousertype(tolua_S,2,0)); - bool a_AllowNewStacks = ((bool) tolua_toboolean(tolua_S,3,true)); + cItem* a_Item = ((cItem*) tolua_tousertype(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddItem'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RemoveItem'", NULL); #endif { - int tolua_ret = (int) self->AddItem(*a_ItemStack,a_AllowNewStacks); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + bool tolua_ret = (bool) self->RemoveItem(*a_Item); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'AddItem'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'RemoveItem'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: AddItems of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_AddItems00 -static int tolua_AllToLua_cInventory_AddItems00(lua_State* tolua_S) +/* method: GetSlot of class cInventory */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_GetSlot00 +static int tolua_AllToLua_cInventory_GetSlot00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cInventory",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"cItems",0,&tolua_err)) || - !tolua_isboolean(tolua_S,3,0,&tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { cInventory* self = (cInventory*) tolua_tousertype(tolua_S,1,0); - cItems* a_ItemStackList = ((cItems*) tolua_tousertype(tolua_S,2,0)); - bool a_AllowNewStacks = ((bool) tolua_toboolean(tolua_S,3,0)); + int a_SlotNum = ((int) tolua_tonumber(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddItems'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSlot'", NULL); #endif { - int tolua_ret = (int) self->AddItems(*a_ItemStackList,a_AllowNewStacks); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + cItem* tolua_ret = (cItem*) self->GetSlot(a_SlotNum); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"cItem"); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'AddItems'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetSlot'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: RemoveOneEquippedItem of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_RemoveOneEquippedItem00 -static int tolua_AllToLua_cInventory_RemoveOneEquippedItem00(lua_State* tolua_S) +/* method: GetFromHotBar of class cInventory */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_GetFromHotBar00 +static int tolua_AllToLua_cInventory_GetFromHotBar00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cInventory",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { cInventory* self = (cInventory*) tolua_tousertype(tolua_S,1,0); + int a_HotBarSlotNum = ((int) tolua_tonumber(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RemoveOneEquippedItem'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetFromHotBar'", NULL); #endif { - bool tolua_ret = (bool) self->RemoveOneEquippedItem(); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + cItem* tolua_ret = (cItem*) self->GetFromHotBar(a_HotBarSlotNum); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"cItem"); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'RemoveOneEquippedItem'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetFromHotBar'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: HowManyItems of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_HowManyItems00 -static int tolua_AllToLua_cInventory_HowManyItems00(lua_State* tolua_S) +/* method: GetEquippedItem of class cInventory */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_GetEquippedItem00 +static int tolua_AllToLua_cInventory_GetEquippedItem00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cInventory",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cItem",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { cInventory* self = (cInventory*) tolua_tousertype(tolua_S,1,0); - const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HowManyItems'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetEquippedItem'", NULL); #endif { - int tolua_ret = (int) self->HowManyItems(*a_Item); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + cItem& tolua_ret = (cItem&) self->GetEquippedItem(); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"cItem"); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'HowManyItems'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetEquippedItem'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: HasItems of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_HasItems00 -static int tolua_AllToLua_cInventory_HasItems00(lua_State* tolua_S) +/* method: SetEquippedSlot of class cInventory */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_SetEquippedSlot00 +static int tolua_AllToLua_cInventory_SetEquippedSlot00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cInventory",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cItem",0,&tolua_err)) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; @@ -12873,27 +12945,26 @@ static int tolua_AllToLua_cInventory_HasItems00(lua_State* tolua_S) #endif { cInventory* self = (cInventory*) tolua_tousertype(tolua_S,1,0); - const cItem* a_ItemStack = ((const cItem*) tolua_tousertype(tolua_S,2,0)); + int a_SlotNum = ((int) tolua_tonumber(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HasItems'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetEquippedSlot'", NULL); #endif { - bool tolua_ret = (bool) self->HasItems(*a_ItemStack); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + self->SetEquippedSlot(a_SlotNum); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'HasItems'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetEquippedSlot'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetArmorGrid of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_GetArmorGrid00 -static int tolua_AllToLua_cInventory_GetArmorGrid00(lua_State* tolua_S) +/* method: GetEquippedSlot of class cInventory */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_GetEquippedSlot00 +static int tolua_AllToLua_cInventory_GetEquippedSlot00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; @@ -12907,159 +12978,158 @@ static int tolua_AllToLua_cInventory_GetArmorGrid00(lua_State* tolua_S) { cInventory* self = (cInventory*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetArmorGrid'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetEquippedSlot'", NULL); #endif { - cItemGrid& tolua_ret = (cItemGrid&) self->GetArmorGrid(); - tolua_pushusertype(tolua_S,(void*)&tolua_ret,"cItemGrid"); + short tolua_ret = (short) self->GetEquippedSlot(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetArmorGrid'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetEquippedSlot'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetInventoryGrid of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_GetInventoryGrid00 -static int tolua_AllToLua_cInventory_GetInventoryGrid00(lua_State* tolua_S) +/* method: GetEquippedHelmet of class cInventory */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_GetEquippedHelmet00 +static int tolua_AllToLua_cInventory_GetEquippedHelmet00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cInventory",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"const cInventory",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cInventory* self = (cInventory*) tolua_tousertype(tolua_S,1,0); + const cInventory* self = (const cInventory*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetInventoryGrid'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetEquippedHelmet'", NULL); #endif { - cItemGrid& tolua_ret = (cItemGrid&) self->GetInventoryGrid(); - tolua_pushusertype(tolua_S,(void*)&tolua_ret,"cItemGrid"); + const cItem& tolua_ret = (const cItem&) self->GetEquippedHelmet(); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const cItem"); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetInventoryGrid'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetEquippedHelmet'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetHotbarGrid of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_GetHotbarGrid00 -static int tolua_AllToLua_cInventory_GetHotbarGrid00(lua_State* tolua_S) +/* method: GetEquippedChestplate of class cInventory */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_GetEquippedChestplate00 +static int tolua_AllToLua_cInventory_GetEquippedChestplate00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cInventory",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"const cInventory",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cInventory* self = (cInventory*) tolua_tousertype(tolua_S,1,0); + const cInventory* self = (const cInventory*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetHotbarGrid'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetEquippedChestplate'", NULL); #endif { - cItemGrid& tolua_ret = (cItemGrid&) self->GetHotbarGrid(); - tolua_pushusertype(tolua_S,(void*)&tolua_ret,"cItemGrid"); + const cItem& tolua_ret = (const cItem&) self->GetEquippedChestplate(); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const cItem"); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetHotbarGrid'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetEquippedChestplate'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetOwner of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_GetOwner00 -static int tolua_AllToLua_cInventory_GetOwner00(lua_State* tolua_S) +/* method: GetEquippedLeggings of class cInventory */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_GetEquippedLeggings00 +static int tolua_AllToLua_cInventory_GetEquippedLeggings00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cInventory",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"const cInventory",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cInventory* self = (cInventory*) tolua_tousertype(tolua_S,1,0); + const cInventory* self = (const cInventory*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetOwner'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetEquippedLeggings'", NULL); #endif { - cPlayer& tolua_ret = (cPlayer&) self->GetOwner(); - tolua_pushusertype(tolua_S,(void*)&tolua_ret,"cPlayer"); + const cItem& tolua_ret = (const cItem&) self->GetEquippedLeggings(); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const cItem"); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetOwner'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetEquippedLeggings'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: CopyToItems of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_CopyToItems00 -static int tolua_AllToLua_cInventory_CopyToItems00(lua_State* tolua_S) +/* method: GetEquippedBoots of class cInventory */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_GetEquippedBoots00 +static int tolua_AllToLua_cInventory_GetEquippedBoots00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cInventory",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"cItems",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cInventory",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cInventory* self = (cInventory*) tolua_tousertype(tolua_S,1,0); - cItems* a_Items = ((cItems*) tolua_tousertype(tolua_S,2,0)); + const cInventory* self = (const cInventory*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'CopyToItems'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetEquippedBoots'", NULL); #endif { - self->CopyToItems(*a_Items); + const cItem& tolua_ret = (const cItem&) self->GetEquippedBoots(); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const cItem"); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'CopyToItems'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetEquippedBoots'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetSlot of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_GetSlot00 -static int tolua_AllToLua_cInventory_GetSlot00(lua_State* tolua_S) +/* method: SendSlot of class cInventory */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_SendSlot00 +static int tolua_AllToLua_cInventory_SendSlot00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cInventory",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cInventory",0,&tolua_err) || !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnoobj(tolua_S,3,&tolua_err) ) @@ -13067,570 +13137,555 @@ static int tolua_AllToLua_cInventory_GetSlot00(lua_State* tolua_S) else #endif { - const cInventory* self = (const cInventory*) tolua_tousertype(tolua_S,1,0); + cInventory* self = (cInventory*) tolua_tousertype(tolua_S,1,0); int a_SlotNum = ((int) tolua_tonumber(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSlot'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SendSlot'", NULL); #endif { - const cItem& tolua_ret = (const cItem&) self->GetSlot(a_SlotNum); - tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const cItem"); + self->SendSlot(a_SlotNum); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetSlot'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SendSlot'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetArmorSlot of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_GetArmorSlot00 -static int tolua_AllToLua_cInventory_GetArmorSlot00(lua_State* tolua_S) +/* method: new of class cItem */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_new00 +static int tolua_AllToLua_cItem_new00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cInventory",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertable(tolua_S,1,"cItem",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,1,&tolua_err) || + !tolua_isnumber(tolua_S,3,1,&tolua_err) || + !tolua_isnumber(tolua_S,4,1,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else #endif { - const cInventory* self = (const cInventory*) tolua_tousertype(tolua_S,1,0); - int a_ArmorSlotNum = ((int) tolua_tonumber(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetArmorSlot'", NULL); -#endif + short a_ItemType = ((short) tolua_tonumber(tolua_S,2,E_ITEM_EMPTY)); + char a_ItemCount = ((char) tolua_tonumber(tolua_S,3,0)); + short a_ItemDamage = ((short) tolua_tonumber(tolua_S,4,0)); { - const cItem& tolua_ret = (const cItem&) self->GetArmorSlot(a_ArmorSlotNum); - tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const cItem"); + cItem* tolua_ret = (cItem*) Mtolua_new((cItem)(a_ItemType,a_ItemCount,a_ItemDamage)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"cItem"); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetArmorSlot'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetInventorySlot of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_GetInventorySlot00 -static int tolua_AllToLua_cInventory_GetInventorySlot00(lua_State* tolua_S) +/* method: new_local of class cItem */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_new00_local +static int tolua_AllToLua_cItem_new00_local(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cInventory",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertable(tolua_S,1,"cItem",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,1,&tolua_err) || + !tolua_isnumber(tolua_S,3,1,&tolua_err) || + !tolua_isnumber(tolua_S,4,1,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else #endif { - const cInventory* self = (const cInventory*) tolua_tousertype(tolua_S,1,0); - int a_InventorySlotNum = ((int) tolua_tonumber(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetInventorySlot'", NULL); -#endif + short a_ItemType = ((short) tolua_tonumber(tolua_S,2,E_ITEM_EMPTY)); + char a_ItemCount = ((char) tolua_tonumber(tolua_S,3,0)); + short a_ItemDamage = ((short) tolua_tonumber(tolua_S,4,0)); { - const cItem& tolua_ret = (const cItem&) self->GetInventorySlot(a_InventorySlotNum); - tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const cItem"); + cItem* tolua_ret = (cItem*) Mtolua_new((cItem)(a_ItemType,a_ItemCount,a_ItemDamage)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"cItem"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetInventorySlot'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetHotbarSlot of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_GetHotbarSlot00 -static int tolua_AllToLua_cInventory_GetHotbarSlot00(lua_State* tolua_S) +/* method: Empty of class cItem */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_Empty00 +static int tolua_AllToLua_cItem_Empty00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cInventory",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertype(tolua_S,1,"cItem",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - const cInventory* self = (const cInventory*) tolua_tousertype(tolua_S,1,0); - int a_HotBarSlotNum = ((int) tolua_tonumber(tolua_S,2,0)); + cItem* self = (cItem*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetHotbarSlot'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Empty'", NULL); #endif { - const cItem& tolua_ret = (const cItem&) self->GetHotbarSlot(a_HotBarSlotNum); - tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const cItem"); + self->Empty(); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetHotbarSlot'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'Empty'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetEquippedItem of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_GetEquippedItem00 -static int tolua_AllToLua_cInventory_GetEquippedItem00(lua_State* tolua_S) +/* method: Clear of class cItem */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_Clear00 +static int tolua_AllToLua_cItem_Clear00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cInventory",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cItem",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - const cInventory* self = (const cInventory*) tolua_tousertype(tolua_S,1,0); + cItem* self = (cItem*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetEquippedItem'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clear'", NULL); #endif { - const cItem& tolua_ret = (const cItem&) self->GetEquippedItem(); - tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const cItem"); + self->Clear(); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetEquippedItem'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'Clear'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetSlot of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_SetSlot00 -static int tolua_AllToLua_cInventory_SetSlot00(lua_State* tolua_S) +/* method: IsEmpty of class cItem */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_IsEmpty00 +static int tolua_AllToLua_cItem_IsEmpty00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cInventory",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const cItem",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,4,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cItem",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cInventory* self = (cInventory*) tolua_tousertype(tolua_S,1,0); - int a_SlotNum = ((int) tolua_tonumber(tolua_S,2,0)); - const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,3,0)); + const cItem* self = (const cItem*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSlot'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsEmpty'", NULL); #endif { - self->SetSlot(a_SlotNum,*a_Item); + bool tolua_ret = (bool) self->IsEmpty(); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetSlot'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'IsEmpty'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetArmorSlot of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_SetArmorSlot00 -static int tolua_AllToLua_cInventory_SetArmorSlot00(lua_State* tolua_S) +/* method: IsEqual of class cItem */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_IsEqual00 +static int tolua_AllToLua_cItem_IsEqual00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cInventory",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const cItem",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,4,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cItem",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cItem",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - cInventory* self = (cInventory*) tolua_tousertype(tolua_S,1,0); - int a_ArmorSlotNum = ((int) tolua_tonumber(tolua_S,2,0)); - const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,3,0)); + const cItem* self = (const cItem*) tolua_tousertype(tolua_S,1,0); + const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetArmorSlot'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsEqual'", NULL); #endif { - self->SetArmorSlot(a_ArmorSlotNum,*a_Item); + bool tolua_ret = (bool) self->IsEqual(*a_Item); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetArmorSlot'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'IsEqual'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetInventorySlot of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_SetInventorySlot00 -static int tolua_AllToLua_cInventory_SetInventorySlot00(lua_State* tolua_S) +/* method: IsSameType of class cItem */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_IsSameType00 +static int tolua_AllToLua_cItem_IsSameType00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cInventory",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const cItem",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,4,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cItem",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cItem",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - cInventory* self = (cInventory*) tolua_tousertype(tolua_S,1,0); - int a_InventorySlotNum = ((int) tolua_tonumber(tolua_S,2,0)); - const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,3,0)); + const cItem* self = (const cItem*) tolua_tousertype(tolua_S,1,0); + const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetInventorySlot'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsSameType'", NULL); #endif { - self->SetInventorySlot(a_InventorySlotNum,*a_Item); + bool tolua_ret = (bool) self->IsSameType(*a_Item); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetInventorySlot'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'IsSameType'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetHotbarSlot of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_SetHotbarSlot00 -static int tolua_AllToLua_cInventory_SetHotbarSlot00(lua_State* tolua_S) +/* method: CopyOne of class cItem */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_CopyOne00 +static int tolua_AllToLua_cItem_CopyOne00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cInventory",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const cItem",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,4,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cItem",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cInventory* self = (cInventory*) tolua_tousertype(tolua_S,1,0); - int a_HotBarSlotNum = ((int) tolua_tonumber(tolua_S,2,0)); - const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,3,0)); + const cItem* self = (const cItem*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetHotbarSlot'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'CopyOne'", NULL); #endif { - self->SetHotbarSlot(a_HotBarSlotNum,*a_Item); + cItem tolua_ret = (cItem) self->CopyOne(); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((cItem)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"cItem"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(cItem)); + tolua_pushusertype(tolua_S,tolua_obj,"cItem"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetHotbarSlot'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'CopyOne'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetEquippedSlotNum of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_SetEquippedSlotNum00 -static int tolua_AllToLua_cInventory_SetEquippedSlotNum00(lua_State* tolua_S) +/* method: GetMaxDamage of class cItem */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_GetMaxDamage00 +static int tolua_AllToLua_cItem_GetMaxDamage00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cInventory",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cItem",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cInventory* self = (cInventory*) tolua_tousertype(tolua_S,1,0); - int a_SlotNum = ((int) tolua_tonumber(tolua_S,2,0)); + const cItem* self = (const cItem*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetEquippedSlotNum'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetMaxDamage'", NULL); #endif { - self->SetEquippedSlotNum(a_SlotNum); + short tolua_ret = (short) self->GetMaxDamage(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetEquippedSlotNum'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetMaxDamage'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetEquippedSlotNum of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_GetEquippedSlotNum00 -static int tolua_AllToLua_cInventory_GetEquippedSlotNum00(lua_State* tolua_S) +/* method: DamageItem of class cItem */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_DamageItem00 +static int tolua_AllToLua_cItem_DamageItem00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cInventory",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cItem",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cInventory* self = (cInventory*) tolua_tousertype(tolua_S,1,0); + cItem* self = (cItem*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetEquippedSlotNum'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DamageItem'", NULL); #endif { - int tolua_ret = (int) self->GetEquippedSlotNum(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + bool tolua_ret = (bool) self->DamageItem(); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetEquippedSlotNum'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'DamageItem'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: DamageItem of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_DamageItem00 -static int tolua_AllToLua_cInventory_DamageItem00(lua_State* tolua_S) +/* method: IsDamageable of class cItem */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_IsDamageable00 +static int tolua_AllToLua_cItem_IsDamageable00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cInventory",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cItem",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cInventory* self = (cInventory*) tolua_tousertype(tolua_S,1,0); - int a_SlotNum = ((int) tolua_tonumber(tolua_S,2,0)); - short a_Amount = ((short) tolua_tonumber(tolua_S,3,0)); + const cItem* self = (const cItem*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DamageItem'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsDamageable'", NULL); #endif { - bool tolua_ret = (bool) self->DamageItem(a_SlotNum,a_Amount); + bool tolua_ret = (bool) self->IsDamageable(); tolua_pushboolean(tolua_S,(bool)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'DamageItem'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'IsDamageable'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: DamageEquippedItem of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_DamageEquippedItem00 -static int tolua_AllToLua_cInventory_DamageEquippedItem00(lua_State* tolua_S) +/* method: IsStackableWith of class cItem */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_IsStackableWith00 +static int tolua_AllToLua_cItem_IsStackableWith00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cInventory",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,1,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cItem",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cItem",0,&tolua_err)) || !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - cInventory* self = (cInventory*) tolua_tousertype(tolua_S,1,0); - short a_Amount = ((short) tolua_tonumber(tolua_S,2,1)); + cItem* self = (cItem*) tolua_tousertype(tolua_S,1,0); + const cItem* a_OtherStack = ((const cItem*) tolua_tousertype(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DamageEquippedItem'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsStackableWith'", NULL); #endif { - bool tolua_ret = (bool) self->DamageEquippedItem(a_Amount); + bool tolua_ret = (bool) self->IsStackableWith(*a_OtherStack); tolua_pushboolean(tolua_S,(bool)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'DamageEquippedItem'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'IsStackableWith'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetEquippedHelmet of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_GetEquippedHelmet00 -static int tolua_AllToLua_cInventory_GetEquippedHelmet00(lua_State* tolua_S) +/* method: IsEnchantable of class cItem */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_IsEnchantable00 +static int tolua_AllToLua_cItem_IsEnchantable00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cInventory",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertable(tolua_S,1,"cItem",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - const cInventory* self = (const cInventory*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetEquippedHelmet'", NULL); -#endif + short a_ItemType = ((short) tolua_tonumber(tolua_S,2,0)); { - const cItem& tolua_ret = (const cItem&) self->GetEquippedHelmet(); - tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const cItem"); + bool tolua_ret = (bool) cItem::IsEnchantable(a_ItemType); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetEquippedHelmet'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'IsEnchantable'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetEquippedChestplate of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_GetEquippedChestplate00 -static int tolua_AllToLua_cInventory_GetEquippedChestplate00(lua_State* tolua_S) +/* get function: m_ItemType of class cItem */ +#ifndef TOLUA_DISABLE_tolua_get_cItem_m_ItemType +static int tolua_get_cItem_m_ItemType(lua_State* tolua_S) { + cItem* self = (cItem*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cInventory",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cInventory* self = (const cInventory*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetEquippedChestplate'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm_ItemType'",NULL); #endif - { - const cItem& tolua_ret = (const cItem&) self->GetEquippedChestplate(); - tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const cItem"); - } - } + tolua_pushnumber(tolua_S,(lua_Number)self->m_ItemType); return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetEquippedChestplate'.",&tolua_err); - return 0; -#endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetEquippedLeggings of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_GetEquippedLeggings00 -static int tolua_AllToLua_cInventory_GetEquippedLeggings00(lua_State* tolua_S) +/* set function: m_ItemType of class cItem */ +#ifndef TOLUA_DISABLE_tolua_set_cItem_m_ItemType +static int tolua_set_cItem_m_ItemType(lua_State* tolua_S) { + cItem* self = (cItem*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cInventory",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm_ItemType'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); #endif - { - const cInventory* self = (const cInventory*) tolua_tousertype(tolua_S,1,0); + self->m_ItemType = ((short) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: m_ItemCount of class cItem */ +#ifndef TOLUA_DISABLE_tolua_get_cItem_m_ItemCount +static int tolua_get_cItem_m_ItemCount(lua_State* tolua_S) +{ + cItem* self = (cItem*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetEquippedLeggings'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm_ItemCount'",NULL); #endif - { - const cItem& tolua_ret = (const cItem&) self->GetEquippedLeggings(); - tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const cItem"); - } - } + tolua_pushnumber(tolua_S,(lua_Number)self->m_ItemCount); return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetEquippedLeggings'.",&tolua_err); - return 0; -#endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetEquippedBoots of class cInventory */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cInventory_GetEquippedBoots00 -static int tolua_AllToLua_cInventory_GetEquippedBoots00(lua_State* tolua_S) +/* set function: m_ItemCount of class cItem */ +#ifndef TOLUA_DISABLE_tolua_set_cItem_m_ItemCount +static int tolua_set_cItem_m_ItemCount(lua_State* tolua_S) { + cItem* self = (cItem*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cInventory",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm_ItemCount'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); #endif - { - const cInventory* self = (const cInventory*) tolua_tousertype(tolua_S,1,0); + self->m_ItemCount = ((char) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: m_ItemDamage of class cItem */ +#ifndef TOLUA_DISABLE_tolua_get_cItem_m_ItemDamage +static int tolua_get_cItem_m_ItemDamage(lua_State* tolua_S) +{ + cItem* self = (cItem*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetEquippedBoots'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm_ItemDamage'",NULL); #endif - { - const cItem& tolua_ret = (const cItem&) self->GetEquippedBoots(); - tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const cItem"); - } - } + tolua_pushnumber(tolua_S,(lua_Number)self->m_ItemDamage); return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: m_ItemDamage of class cItem */ +#ifndef TOLUA_DISABLE_tolua_set_cItem_m_ItemDamage +static int tolua_set_cItem_m_ItemDamage(lua_State* tolua_S) +{ + cItem* self = (cItem*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetEquippedBoots'.",&tolua_err); - return 0; + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm_ItemDamage'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); #endif + self->m_ItemDamage = ((short) tolua_tonumber(tolua_S,2,0)) +; + return 0; } #endif //#ifndef TOLUA_DISABLE -/* method: new of class cEnchantments */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cEnchantments_new00 -static int tolua_AllToLua_cEnchantments_new00(lua_State* tolua_S) +/* method: new of class cItems */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItems_new00 +static int tolua_AllToLua_cItems_new00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertable(tolua_S,1,"cEnchantments",0,&tolua_err) || + !tolua_isusertable(tolua_S,1,"cItems",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; @@ -13638,8 +13693,8 @@ static int tolua_AllToLua_cEnchantments_new00(lua_State* tolua_S) #endif { { - cEnchantments* tolua_ret = (cEnchantments*) Mtolua_new((cEnchantments)()); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cEnchantments"); + cItems* tolua_ret = (cItems*) Mtolua_new((cItems)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"cItems"); } } return 1; @@ -13651,14 +13706,14 @@ static int tolua_AllToLua_cEnchantments_new00(lua_State* tolua_S) } #endif //#ifndef TOLUA_DISABLE -/* method: new_local of class cEnchantments */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cEnchantments_new00_local -static int tolua_AllToLua_cEnchantments_new00_local(lua_State* tolua_S) +/* method: new_local of class cItems */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItems_new00_local +static int tolua_AllToLua_cItems_new00_local(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertable(tolua_S,1,"cEnchantments",0,&tolua_err) || + !tolua_isusertable(tolua_S,1,"cItems",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; @@ -13666,8 +13721,8 @@ static int tolua_AllToLua_cEnchantments_new00_local(lua_State* tolua_S) #endif { { - cEnchantments* tolua_ret = (cEnchantments*) Mtolua_new((cEnchantments)()); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cEnchantments"); + cItems* tolua_ret = (cItems*) Mtolua_new((cItems)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"cItems"); tolua_register_gc(tolua_S,lua_gettop(tolua_S)); } } @@ -13680,209 +13735,156 @@ static int tolua_AllToLua_cEnchantments_new00_local(lua_State* tolua_S) } #endif //#ifndef TOLUA_DISABLE -/* method: new of class cEnchantments */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cEnchantments_new01 -static int tolua_AllToLua_cEnchantments_new01(lua_State* tolua_S) -{ - 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 - { - const AString a_StringSpec = ((const AString) tolua_tocppstring(tolua_S,2,0)); - { - cEnchantments* tolua_ret = (cEnchantments*) Mtolua_new((cEnchantments)(a_StringSpec)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cEnchantments"); - tolua_pushcppstring(tolua_S,(const char*)a_StringSpec); - } - } - return 2; -tolua_lerror: - return tolua_AllToLua_cEnchantments_new00(tolua_S); -} -#endif //#ifndef TOLUA_DISABLE - -/* method: new_local of class cEnchantments */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cEnchantments_new01_local -static int tolua_AllToLua_cEnchantments_new01_local(lua_State* tolua_S) -{ - 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 - { - const AString a_StringSpec = ((const AString) tolua_tocppstring(tolua_S,2,0)); - { - cEnchantments* tolua_ret = (cEnchantments*) Mtolua_new((cEnchantments)(a_StringSpec)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cEnchantments"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); - tolua_pushcppstring(tolua_S,(const char*)a_StringSpec); - } - } - return 2; -tolua_lerror: - return tolua_AllToLua_cEnchantments_new00_local(tolua_S); -} -#endif //#ifndef TOLUA_DISABLE - -/* method: AddFromString of class cEnchantments */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cEnchantments_AddFromString00 -static int tolua_AllToLua_cEnchantments_AddFromString00(lua_State* tolua_S) +/* method: Get of class cItems */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItems_Get00 +static int tolua_AllToLua_cItems_Get00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cEnchantments",0,&tolua_err) || - !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cItems",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - cEnchantments* self = (cEnchantments*) tolua_tousertype(tolua_S,1,0); - const AString a_StringSpec = ((const AString) tolua_tocppstring(tolua_S,2,0)); + cItems* self = (cItems*) tolua_tousertype(tolua_S,1,0); + int a_Idx = ((int) tolua_tonumber(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddFromString'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Get'", NULL); #endif { - self->AddFromString(a_StringSpec); - tolua_pushcppstring(tolua_S,(const char*)a_StringSpec); + cItem& tolua_ret = (cItem&) self->Get(a_Idx); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"cItem"); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'AddFromString'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'Get'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: ToString of class cEnchantments */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cEnchantments_ToString00 -static int tolua_AllToLua_cEnchantments_ToString00(lua_State* tolua_S) +/* method: Set of class cItems */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItems_Set00 +static int tolua_AllToLua_cItems_Set00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cEnchantments",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"cItems",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const cItem",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,4,&tolua_err) ) goto tolua_lerror; else #endif { - const cEnchantments* self = (const cEnchantments*) tolua_tousertype(tolua_S,1,0); + cItems* self = (cItems*) tolua_tousertype(tolua_S,1,0); + int a_Idx = ((int) tolua_tonumber(tolua_S,2,0)); + const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,3,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ToString'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Set'", NULL); #endif { - AString tolua_ret = (AString) self->ToString(); - tolua_pushcppstring(tolua_S,(const char*)tolua_ret); + self->Set(a_Idx,*a_Item); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'ToString'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'Set'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetLevel of class cEnchantments */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cEnchantments_GetLevel00 -static int tolua_AllToLua_cEnchantments_GetLevel00(lua_State* tolua_S) +/* method: Add of class cItems */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItems_Add00 +static int tolua_AllToLua_cItems_Add00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cEnchantments",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cItems",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cItem",0,&tolua_err)) || !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - const cEnchantments* self = (const cEnchantments*) tolua_tousertype(tolua_S,1,0); - int a_EnchantmentID = ((int) tolua_tonumber(tolua_S,2,0)); + cItems* self = (cItems*) tolua_tousertype(tolua_S,1,0); + const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetLevel'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Add'", NULL); #endif { - int tolua_ret = (int) self->GetLevel(a_EnchantmentID); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + self->Add(*a_Item); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetLevel'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'Add'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetLevel of class cEnchantments */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cEnchantments_SetLevel00 -static int tolua_AllToLua_cEnchantments_SetLevel00(lua_State* tolua_S) +/* method: Delete of class cItems */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItems_Delete00 +static int tolua_AllToLua_cItems_Delete00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cEnchantments",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cItems",0,&tolua_err) || !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - cEnchantments* self = (cEnchantments*) tolua_tousertype(tolua_S,1,0); - int a_EnchantmentID = ((int) tolua_tonumber(tolua_S,2,0)); - int a_Level = ((int) tolua_tonumber(tolua_S,3,0)); + cItems* self = (cItems*) tolua_tousertype(tolua_S,1,0); + int a_Idx = ((int) tolua_tonumber(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetLevel'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Delete'", NULL); #endif { - self->SetLevel(a_EnchantmentID,a_Level); + self->Delete(a_Idx); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetLevel'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'Delete'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: Clear of class cEnchantments */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cEnchantments_Clear00 -static int tolua_AllToLua_cEnchantments_Clear00(lua_State* tolua_S) +/* method: Clear of class cItems */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItems_Clear00 +static int tolua_AllToLua_cItems_Clear00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cEnchantments",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cItems",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cEnchantments* self = (cEnchantments*) tolua_tousertype(tolua_S,1,0); + cItems* self = (cItems*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clear'", NULL); #endif @@ -13899,679 +13901,703 @@ static int tolua_AllToLua_cEnchantments_Clear00(lua_State* tolua_S) } #endif //#ifndef TOLUA_DISABLE -/* method: IsEmpty of class cEnchantments */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cEnchantments_IsEmpty00 -static int tolua_AllToLua_cEnchantments_IsEmpty00(lua_State* tolua_S) +/* method: Size of class cItems */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItems_Size00 +static int tolua_AllToLua_cItems_Size00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cEnchantments",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cItems",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - const cEnchantments* self = (const cEnchantments*) tolua_tousertype(tolua_S,1,0); + cItems* self = (cItems*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsEmpty'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Size'", NULL); #endif { - bool tolua_ret = (bool) self->IsEmpty(); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + int tolua_ret = (int) self->Size(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsEmpty'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'Size'.",&tolua_err); return 0; #endif } #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) +/* method: Add of class cItems */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItems_Add01 +static int tolua_AllToLua_cItems_Add01(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) - ) + !tolua_isusertype(tolua_S,1,"cItems",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) + ) goto tolua_lerror; else -#endif { - const AString a_EnchantmentName = ((const AString) tolua_tocppstring(tolua_S,2,0)); + cItems* self = (cItems*) tolua_tousertype(tolua_S,1,0); + ENUM_ITEM_ID a_ItemType = ((ENUM_ITEM_ID) (int) tolua_tonumber(tolua_S,2,0)); + char a_ItemCount = ((char) tolua_tonumber(tolua_S,3,0)); + short a_ItemDamage = ((short) tolua_tonumber(tolua_S,4,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Add'", NULL); +#endif { - int tolua_ret = (int) cEnchantments::StringToEnchantmentID(a_EnchantmentName); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - tolua_pushcppstring(tolua_S,(const char*)a_EnchantmentName); + self->Add(a_ItemType,a_ItemCount,a_ItemDamage); } } - return 2; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'StringToEnchantmentID'.",&tolua_err); return 0; -#endif +tolua_lerror: + return tolua_AllToLua_cItems_Add00(tolua_S); } #endif //#ifndef TOLUA_DISABLE -/* method: operator== of class cEnchantments */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cEnchantments__eq00 -static int tolua_AllToLua_cEnchantments__eq00(lua_State* tolua_S) +/* method: Set of class cItems */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItems_Set01 +static int tolua_AllToLua_cItems_Set01(lua_State* tolua_S) { -#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cEnchantments",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cEnchantments",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertype(tolua_S,1,"cItems",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnoobj(tolua_S,6,&tolua_err) ) goto tolua_lerror; else -#endif { - const cEnchantments* self = (const cEnchantments*) tolua_tousertype(tolua_S,1,0); - const cEnchantments* a_Other = ((const cEnchantments*) tolua_tousertype(tolua_S,2,0)); + cItems* self = (cItems*) tolua_tousertype(tolua_S,1,0); + int a_Idx = ((int) tolua_tonumber(tolua_S,2,0)); + ENUM_ITEM_ID a_ItemType = ((ENUM_ITEM_ID) (int) tolua_tonumber(tolua_S,3,0)); + char a_ItemCount = ((char) tolua_tonumber(tolua_S,4,0)); + short a_ItemDamage = ((short) tolua_tonumber(tolua_S,5,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Set'", NULL); #endif { - bool tolua_ret = (bool) self->operator==(*a_Other); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + self->Set(a_Idx,a_ItemType,a_ItemCount,a_ItemDamage); } } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err); return 0; -#endif +tolua_lerror: + return tolua_AllToLua_cItems_Set00(tolua_S); } #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) +/* method: GetWidth of class cItemGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_GetWidth00 +static int tolua_AllToLua_cItemGrid_GetWidth00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertable(tolua_S,1,"cItem",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"const cItemGrid",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { + const cItemGrid* self = (const cItemGrid*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetWidth'", NULL); +#endif { - cItem* tolua_ret = (cItem*) Mtolua_new((cItem)()); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cItem"); + int tolua_ret = (int) self->GetWidth(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetWidth'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: new_local of class cItem */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_new00_local -static int tolua_AllToLua_cItem_new00_local(lua_State* tolua_S) +/* method: GetHeight of class cItemGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_GetHeight00 +static int tolua_AllToLua_cItemGrid_GetHeight00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertable(tolua_S,1,"cItem",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"const cItemGrid",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { + const cItemGrid* self = (const cItemGrid*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetHeight'", NULL); +#endif { - cItem* tolua_ret = (cItem*) Mtolua_new((cItem)()); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cItem"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + int tolua_ret = (int) self->GetHeight(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetHeight'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: new of class cItem */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_new01 -static int tolua_AllToLua_cItem_new01(lua_State* tolua_S) +/* method: GetNumSlots of class cItemGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_GetNumSlots00 +static int tolua_AllToLua_cItemGrid_GetNumSlots00(lua_State* tolua_S) { +#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertable(tolua_S,1,"cItem",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,1,&tolua_err) || - !tolua_isnumber(tolua_S,4,1,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cItemGrid",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else +#endif { - short a_ItemType = ((short) tolua_tonumber(tolua_S,2,0)); - char a_ItemCount = ((char) tolua_tonumber(tolua_S,3,1)); - short a_ItemDamage = ((short) tolua_tonumber(tolua_S,4,0)); + const cItemGrid* self = (const cItemGrid*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetNumSlots'", NULL); +#endif { - cItem* tolua_ret = (cItem*) Mtolua_new((cItem)(a_ItemType,a_ItemCount,a_ItemDamage)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cItem"); + int tolua_ret = (int) self->GetNumSlots(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; -tolua_lerror: - return tolua_AllToLua_cItem_new00(tolua_S); +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetNumSlots'.",&tolua_err); + return 0; +#endif } #endif //#ifndef TOLUA_DISABLE -/* method: new_local of class cItem */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_new01_local -static int tolua_AllToLua_cItem_new01_local(lua_State* tolua_S) +/* method: GetSlotNum of class cItemGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_GetSlotNum00 +static int tolua_AllToLua_cItemGrid_GetSlotNum00(lua_State* tolua_S) { +#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertable(tolua_S,1,"cItem",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"const cItemGrid",0,&tolua_err) || !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,1,&tolua_err) || - !tolua_isnumber(tolua_S,4,1,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnoobj(tolua_S,4,&tolua_err) ) goto tolua_lerror; else +#endif { - short a_ItemType = ((short) tolua_tonumber(tolua_S,2,0)); - char a_ItemCount = ((char) tolua_tonumber(tolua_S,3,1)); - short a_ItemDamage = ((short) tolua_tonumber(tolua_S,4,0)); + const cItemGrid* self = (const cItemGrid*) tolua_tousertype(tolua_S,1,0); + int a_X = ((int) tolua_tonumber(tolua_S,2,0)); + int a_Y = ((int) tolua_tonumber(tolua_S,3,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSlotNum'", NULL); +#endif { - cItem* tolua_ret = (cItem*) Mtolua_new((cItem)(a_ItemType,a_ItemCount,a_ItemDamage)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cItem"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + int tolua_ret = (int) self->GetSlotNum(a_X,a_Y); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; -tolua_lerror: - return tolua_AllToLua_cItem_new00_local(tolua_S); +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetSlotNum'.",&tolua_err); + return 0; +#endif } #endif //#ifndef TOLUA_DISABLE -/* method: new of class cItem */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_new02 -static int tolua_AllToLua_cItem_new02(lua_State* tolua_S) +/* method: GetSlot of class cItemGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_GetSlot00 +static int tolua_AllToLua_cItemGrid_GetSlot00(lua_State* tolua_S) { +#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertable(tolua_S,1,"cItem",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"const cItemGrid",0,&tolua_err) || !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_iscppstring(tolua_S,5,0,&tolua_err) || - !tolua_isnoobj(tolua_S,6,&tolua_err) + !tolua_isnoobj(tolua_S,4,&tolua_err) ) goto tolua_lerror; else +#endif { - short a_ItemType = ((short) tolua_tonumber(tolua_S,2,0)); - char a_ItemCount = ((char) tolua_tonumber(tolua_S,3,0)); - short a_ItemDamage = ((short) tolua_tonumber(tolua_S,4,0)); - const AString a_Enchantments = ((const AString) tolua_tocppstring(tolua_S,5,0)); + const cItemGrid* self = (const cItemGrid*) tolua_tousertype(tolua_S,1,0); + int a_X = ((int) tolua_tonumber(tolua_S,2,0)); + int a_Y = ((int) tolua_tonumber(tolua_S,3,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSlot'", NULL); +#endif { - cItem* tolua_ret = (cItem*) Mtolua_new((cItem)(a_ItemType,a_ItemCount,a_ItemDamage,a_Enchantments)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cItem"); - tolua_pushcppstring(tolua_S,(const char*)a_Enchantments); + const cItem& tolua_ret = (const cItem&) self->GetSlot(a_X,a_Y); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const cItem"); } } - return 2; -tolua_lerror: - return tolua_AllToLua_cItem_new01(tolua_S); + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetSlot'.",&tolua_err); + return 0; +#endif } #endif //#ifndef TOLUA_DISABLE -/* method: new_local of class cItem */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_new02_local -static int tolua_AllToLua_cItem_new02_local(lua_State* tolua_S) +/* method: GetSlot of class cItemGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_GetSlot01 +static int tolua_AllToLua_cItemGrid_GetSlot01(lua_State* tolua_S) { tolua_Error tolua_err; if ( - !tolua_isusertable(tolua_S,1,"cItem",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_iscppstring(tolua_S,5,0,&tolua_err) || - !tolua_isnoobj(tolua_S,6,&tolua_err) + !tolua_isnoobj(tolua_S,4,&tolua_err) ) goto tolua_lerror; else { - short a_ItemType = ((short) tolua_tonumber(tolua_S,2,0)); - char a_ItemCount = ((char) tolua_tonumber(tolua_S,3,0)); - short a_ItemDamage = ((short) tolua_tonumber(tolua_S,4,0)); - const AString a_Enchantments = ((const AString) tolua_tocppstring(tolua_S,5,0)); + cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); + int a_X = ((int) tolua_tonumber(tolua_S,2,0)); + int a_Y = ((int) tolua_tonumber(tolua_S,3,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSlot'", NULL); +#endif { - cItem* tolua_ret = (cItem*) Mtolua_new((cItem)(a_ItemType,a_ItemCount,a_ItemDamage,a_Enchantments)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cItem"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); - tolua_pushcppstring(tolua_S,(const char*)a_Enchantments); + cItem& tolua_ret = (cItem&) self->GetSlot(a_X,a_Y); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"cItem"); } } - return 2; + return 1; tolua_lerror: - return tolua_AllToLua_cItem_new01_local(tolua_S); + return tolua_AllToLua_cItemGrid_GetSlot00(tolua_S); } #endif //#ifndef TOLUA_DISABLE -/* method: new of class cItem */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_new03 -static int tolua_AllToLua_cItem_new03(lua_State* tolua_S) +/* method: GetSlot of class cItemGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_GetSlot02 +static int tolua_AllToLua_cItemGrid_GetSlot02(lua_State* tolua_S) { tolua_Error tolua_err; if ( - !tolua_isusertable(tolua_S,1,"cItem",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cItem",0,&tolua_err)) || + !tolua_isusertype(tolua_S,1,"const cItemGrid",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else { - const cItem* a_CopyFrom = ((const cItem*) tolua_tousertype(tolua_S,2,0)); + const cItemGrid* self = (const cItemGrid*) tolua_tousertype(tolua_S,1,0); + int a_SlotNum = ((int) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSlot'", NULL); +#endif { - cItem* tolua_ret = (cItem*) Mtolua_new((cItem)(*a_CopyFrom)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cItem"); + const cItem& tolua_ret = (const cItem&) self->GetSlot(a_SlotNum); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const cItem"); } } return 1; tolua_lerror: - return tolua_AllToLua_cItem_new02(tolua_S); + return tolua_AllToLua_cItemGrid_GetSlot01(tolua_S); } #endif //#ifndef TOLUA_DISABLE -/* method: new_local of class cItem */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_new03_local -static int tolua_AllToLua_cItem_new03_local(lua_State* tolua_S) +/* method: GetSlot of class cItemGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_GetSlot03 +static int tolua_AllToLua_cItemGrid_GetSlot03(lua_State* tolua_S) { tolua_Error tolua_err; if ( - !tolua_isusertable(tolua_S,1,"cItem",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cItem",0,&tolua_err)) || + !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else { - const cItem* a_CopyFrom = ((const cItem*) tolua_tousertype(tolua_S,2,0)); + cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); + int a_SlotNum = ((int) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSlot'", NULL); +#endif { - cItem* tolua_ret = (cItem*) Mtolua_new((cItem)(*a_CopyFrom)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cItem"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + cItem& tolua_ret = (cItem&) self->GetSlot(a_SlotNum); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"cItem"); } } return 1; tolua_lerror: - return tolua_AllToLua_cItem_new02_local(tolua_S); + return tolua_AllToLua_cItemGrid_GetSlot02(tolua_S); } #endif //#ifndef TOLUA_DISABLE -/* method: Empty of class cItem */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_Empty00 -static int tolua_AllToLua_cItem_Empty00(lua_State* tolua_S) +/* method: SetSlot of class cItemGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_SetSlot00 +static int tolua_AllToLua_cItemGrid_SetSlot00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cItem",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const cItem",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else #endif { - cItem* self = (cItem*) tolua_tousertype(tolua_S,1,0); + cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); + int a_X = ((int) tolua_tonumber(tolua_S,2,0)); + int a_Y = ((int) tolua_tonumber(tolua_S,3,0)); + const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,4,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Empty'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSlot'", NULL); #endif { - self->Empty(); + self->SetSlot(a_X,a_Y,*a_Item); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Empty'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetSlot'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: Clear of class cItem */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_Clear00 -static int tolua_AllToLua_cItem_Clear00(lua_State* tolua_S) +/* method: SetSlot of class cItemGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_SetSlot01 +static int tolua_AllToLua_cItemGrid_SetSlot01(lua_State* tolua_S) { -#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cItem",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnoobj(tolua_S,7,&tolua_err) ) goto tolua_lerror; else -#endif { - cItem* self = (cItem*) tolua_tousertype(tolua_S,1,0); + cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); + int a_X = ((int) tolua_tonumber(tolua_S,2,0)); + int a_Y = ((int) tolua_tonumber(tolua_S,3,0)); + short a_ItemType = ((short) tolua_tonumber(tolua_S,4,0)); + char a_ItemCount = ((char) tolua_tonumber(tolua_S,5,0)); + short a_ItemDamage = ((short) tolua_tonumber(tolua_S,6,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clear'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSlot'", NULL); #endif { - self->Clear(); + self->SetSlot(a_X,a_Y,a_ItemType,a_ItemCount,a_ItemDamage); } } return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Clear'.",&tolua_err); - return 0; -#endif +tolua_lerror: + return tolua_AllToLua_cItemGrid_SetSlot00(tolua_S); } #endif //#ifndef TOLUA_DISABLE -/* method: IsEmpty of class cItem */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_IsEmpty00 -static int tolua_AllToLua_cItem_IsEmpty00(lua_State* tolua_S) +/* method: SetSlot of class cItemGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_SetSlot02 +static int tolua_AllToLua_cItemGrid_SetSlot02(lua_State* tolua_S) { -#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cItem",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const cItem",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,4,&tolua_err) ) goto tolua_lerror; else -#endif { - const cItem* self = (const cItem*) tolua_tousertype(tolua_S,1,0); + cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); + int a_SlotNum = ((int) tolua_tonumber(tolua_S,2,0)); + const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,3,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsEmpty'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSlot'", NULL); #endif { - bool tolua_ret = (bool) self->IsEmpty(); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + self->SetSlot(a_SlotNum,*a_Item); } } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsEmpty'.",&tolua_err); return 0; -#endif +tolua_lerror: + return tolua_AllToLua_cItemGrid_SetSlot01(tolua_S); } #endif //#ifndef TOLUA_DISABLE -/* method: IsEqual of class cItem */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_IsEqual00 -static int tolua_AllToLua_cItem_IsEqual00(lua_State* tolua_S) +/* method: SetSlot of class cItemGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_SetSlot03 +static int tolua_AllToLua_cItemGrid_SetSlot03(lua_State* tolua_S) { -#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cItem",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cItem",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnoobj(tolua_S,6,&tolua_err) ) goto tolua_lerror; else -#endif { - const cItem* self = (const cItem*) tolua_tousertype(tolua_S,1,0); - const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,2,0)); + cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); + int a_SlotNum = ((int) tolua_tonumber(tolua_S,2,0)); + short a_ItemType = ((short) tolua_tonumber(tolua_S,3,0)); + char a_ItemCount = ((char) tolua_tonumber(tolua_S,4,0)); + short a_ItemDamage = ((short) tolua_tonumber(tolua_S,5,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsEqual'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSlot'", NULL); #endif { - bool tolua_ret = (bool) self->IsEqual(*a_Item); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + self->SetSlot(a_SlotNum,a_ItemType,a_ItemCount,a_ItemDamage); } } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsEqual'.",&tolua_err); return 0; -#endif +tolua_lerror: + return tolua_AllToLua_cItemGrid_SetSlot02(tolua_S); } #endif //#ifndef TOLUA_DISABLE -/* method: IsSameType of class cItem */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_IsSameType00 -static int tolua_AllToLua_cItem_IsSameType00(lua_State* tolua_S) +/* method: Clear of class cItemGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_Clear00 +static int tolua_AllToLua_cItemGrid_Clear00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cItem",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cItem",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - const cItem* self = (const cItem*) tolua_tousertype(tolua_S,1,0); - const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,2,0)); + cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsSameType'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clear'", NULL); #endif { - bool tolua_ret = (bool) self->IsSameType(*a_Item); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + self->Clear(); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsSameType'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'Clear'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: CopyOne of class cItem */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_CopyOne00 -static int tolua_AllToLua_cItem_CopyOne00(lua_State* tolua_S) +/* method: HowManyCanFit of class cItemGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_HowManyCanFit00 +static int tolua_AllToLua_cItemGrid_HowManyCanFit00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cItem",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cItem",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - const cItem* self = (const cItem*) tolua_tousertype(tolua_S,1,0); + cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); + const cItem* a_ItemStack = ((const cItem*) tolua_tousertype(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'CopyOne'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HowManyCanFit'", NULL); #endif { - cItem tolua_ret = (cItem) self->CopyOne(); - { -#ifdef __cplusplus - void* tolua_obj = Mtolua_new((cItem)(tolua_ret)); - tolua_pushusertype(tolua_S,tolua_obj,"cItem"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); -#else - void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(cItem)); - tolua_pushusertype(tolua_S,tolua_obj,"cItem"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); -#endif - } + int tolua_ret = (int) self->HowManyCanFit(*a_ItemStack); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'CopyOne'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'HowManyCanFit'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetMaxDamage of class cItem */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_GetMaxDamage00 -static int tolua_AllToLua_cItem_GetMaxDamage00(lua_State* tolua_S) +/* method: AddItem of class cItemGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_AddItem00 +static int tolua_AllToLua_cItemGrid_AddItem00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cItem",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"cItem",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - const cItem* self = (const cItem*) tolua_tousertype(tolua_S,1,0); + cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); + cItem* a_ItemStack = ((cItem*) tolua_tousertype(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetMaxDamage'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddItem'", NULL); #endif { - short tolua_ret = (short) self->GetMaxDamage(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + bool tolua_ret = (bool) self->AddItem(*a_ItemStack); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetMaxDamage'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'AddItem'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: DamageItem of class cItem */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_DamageItem00 -static int tolua_AllToLua_cItem_DamageItem00(lua_State* tolua_S) +/* method: AddItems of class cItemGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_AddItems00 +static int tolua_AllToLua_cItemGrid_AddItems00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cItem",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,1,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"cItems",0,&tolua_err)) || !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - cItem* self = (cItem*) tolua_tousertype(tolua_S,1,0); - short a_Amount = ((short) tolua_tonumber(tolua_S,2,1)); + cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); + cItems* a_ItemStackList = ((cItems*) tolua_tousertype(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DamageItem'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddItems'", NULL); #endif { - bool tolua_ret = (bool) self->DamageItem(a_Amount); + bool tolua_ret = (bool) self->AddItems(*a_ItemStackList); tolua_pushboolean(tolua_S,(bool)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'DamageItem'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'AddItems'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: IsDamageable of class cItem */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_IsDamageable00 -static int tolua_AllToLua_cItem_IsDamageable00(lua_State* tolua_S) +/* method: GetFirstEmptySlot of class cItemGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_GetFirstEmptySlot00 +static int tolua_AllToLua_cItemGrid_GetFirstEmptySlot00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cItem",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"const cItemGrid",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - const cItem* self = (const cItem*) tolua_tousertype(tolua_S,1,0); + const cItemGrid* self = (const cItemGrid*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsDamageable'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetFirstEmptySlot'", NULL); #endif { - bool tolua_ret = (bool) self->IsDamageable(); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + int tolua_ret = (int) self->GetFirstEmptySlot(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsDamageable'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetFirstEmptySlot'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: IsStackableWith of class cItem */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_IsStackableWith00 -static int tolua_AllToLua_cItem_IsStackableWith00(lua_State* tolua_S) +/* method: GetLastEmptySlot of class cItemGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_GetLastEmptySlot00 +static int tolua_AllToLua_cItemGrid_GetLastEmptySlot00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cItem",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cItem",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cItemGrid",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - const cItem* self = (const cItem*) tolua_tousertype(tolua_S,1,0); - const cItem* a_OtherStack = ((const cItem*) tolua_tousertype(tolua_S,2,0)); + const cItemGrid* self = (const cItemGrid*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsStackableWith'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetLastEmptySlot'", NULL); #endif { - bool tolua_ret = (bool) self->IsStackableWith(*a_OtherStack); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + int tolua_ret = (int) self->GetLastEmptySlot(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsStackableWith'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetLastEmptySlot'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: IsEnchantable of class cItem */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItem_IsEnchantable00 -static int tolua_AllToLua_cItem_IsEnchantable00(lua_State* tolua_S) +/* method: GetNextEmptySlot of class cItemGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_GetNextEmptySlot00 +static int tolua_AllToLua_cItemGrid_GetNextEmptySlot00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertable(tolua_S,1,"cItem",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"const cItemGrid",0,&tolua_err) || !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnoobj(tolua_S,3,&tolua_err) ) @@ -14579,158 +14605,81 @@ static int tolua_AllToLua_cItem_IsEnchantable00(lua_State* tolua_S) else #endif { - short a_ItemType = ((short) tolua_tonumber(tolua_S,2,0)); + const cItemGrid* self = (const cItemGrid*) tolua_tousertype(tolua_S,1,0); + int a_StartFrom = ((int) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetNextEmptySlot'", NULL); +#endif { - bool tolua_ret = (bool) cItem::IsEnchantable(a_ItemType); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + int tolua_ret = (int) self->GetNextEmptySlot(a_StartFrom); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsEnchantable'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetNextEmptySlot'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* get function: m_ItemType of class cItem */ -#ifndef TOLUA_DISABLE_tolua_get_cItem_m_ItemType -static int tolua_get_cItem_m_ItemType(lua_State* tolua_S) -{ - cItem* self = (cItem*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm_ItemType'",NULL); -#endif - tolua_pushnumber(tolua_S,(lua_Number)self->m_ItemType); - return 1; -} -#endif //#ifndef TOLUA_DISABLE - -/* set function: m_ItemType of class cItem */ -#ifndef TOLUA_DISABLE_tolua_set_cItem_m_ItemType -static int tolua_set_cItem_m_ItemType(lua_State* tolua_S) -{ - cItem* self = (cItem*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm_ItemType'",NULL); - if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) - tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); -#endif - self->m_ItemType = ((short) tolua_tonumber(tolua_S,2,0)) -; - return 0; -} -#endif //#ifndef TOLUA_DISABLE - -/* get function: m_ItemCount of class cItem */ -#ifndef TOLUA_DISABLE_tolua_get_cItem_m_ItemCount -static int tolua_get_cItem_m_ItemCount(lua_State* tolua_S) +/* method: CopyToItems of class cItemGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_CopyToItems00 +static int tolua_AllToLua_cItemGrid_CopyToItems00(lua_State* tolua_S) { - cItem* self = (cItem*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm_ItemCount'",NULL); + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const cItemGrid",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"cItems",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else #endif - tolua_pushnumber(tolua_S,(lua_Number)self->m_ItemCount); - return 1; -} -#endif //#ifndef TOLUA_DISABLE - -/* set function: m_ItemCount of class cItem */ -#ifndef TOLUA_DISABLE_tolua_set_cItem_m_ItemCount -static int tolua_set_cItem_m_ItemCount(lua_State* tolua_S) -{ - cItem* self = (cItem*) tolua_tousertype(tolua_S,1,0); + { + const cItemGrid* self = (const cItemGrid*) tolua_tousertype(tolua_S,1,0); + cItems* a_Items = ((cItems*) tolua_tousertype(tolua_S,2,0)); #ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm_ItemCount'",NULL); - if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) - tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'CopyToItems'", NULL); #endif - self->m_ItemCount = ((char) tolua_tonumber(tolua_S,2,0)) -; + { + self->CopyToItems(*a_Items); + } + } return 0; -} -#endif //#ifndef TOLUA_DISABLE - -/* get function: m_ItemDamage of class cItem */ -#ifndef TOLUA_DISABLE_tolua_get_cItem_m_ItemDamage -static int tolua_get_cItem_m_ItemDamage(lua_State* tolua_S) -{ - cItem* self = (cItem*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm_ItemDamage'",NULL); -#endif - tolua_pushnumber(tolua_S,(lua_Number)self->m_ItemDamage); - return 1; -} -#endif //#ifndef TOLUA_DISABLE - -/* set function: m_ItemDamage of class cItem */ -#ifndef TOLUA_DISABLE_tolua_set_cItem_m_ItemDamage -static int tolua_set_cItem_m_ItemDamage(lua_State* tolua_S) -{ - cItem* self = (cItem*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm_ItemDamage'",NULL); - if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) - tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); -#endif - self->m_ItemDamage = ((short) tolua_tonumber(tolua_S,2,0)) -; + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'CopyToItems'.",&tolua_err); return 0; -} -#endif //#ifndef TOLUA_DISABLE - -/* get function: m_Enchantments of class cItem */ -#ifndef TOLUA_DISABLE_tolua_get_cItem_m_Enchantments -static int tolua_get_cItem_m_Enchantments(lua_State* tolua_S) -{ - cItem* self = (cItem*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm_Enchantments'",NULL); -#endif - tolua_pushusertype(tolua_S,(void*)&self->m_Enchantments,"cEnchantments"); - return 1; -} -#endif //#ifndef TOLUA_DISABLE - -/* set function: m_Enchantments of class cItem */ -#ifndef TOLUA_DISABLE_tolua_set_cItem_m_Enchantments -static int tolua_set_cItem_m_Enchantments(lua_State* tolua_S) -{ - cItem* self = (cItem*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm_Enchantments'",NULL); - if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"cEnchantments",0,&tolua_err))) - tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); #endif - self->m_Enchantments = *((cEnchantments*) tolua_tousertype(tolua_S,2,0)) -; - return 0; } #endif //#ifndef TOLUA_DISABLE -/* method: new of class cItems */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItems_new00 -static int tolua_AllToLua_cItems_new00(lua_State* tolua_S) +/* method: new of class cChestEntity */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChestEntity_new00 +static int tolua_AllToLua_cChestEntity_new00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertable(tolua_S,1,"cItems",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertable(tolua_S,1,"cChestEntity",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else #endif { + int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); + int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); { - cItems* tolua_ret = (cItems*) Mtolua_new((cItems)()); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cItems"); + cChestEntity* tolua_ret = (cChestEntity*) Mtolua_new((cChestEntity)(a_BlockX,a_BlockY,a_BlockZ)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"cChestEntity"); } } return 1; @@ -14742,23 +14691,29 @@ static int tolua_AllToLua_cItems_new00(lua_State* tolua_S) } #endif //#ifndef TOLUA_DISABLE -/* method: new_local of class cItems */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItems_new00_local -static int tolua_AllToLua_cItems_new00_local(lua_State* tolua_S) +/* method: new_local of class cChestEntity */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChestEntity_new00_local +static int tolua_AllToLua_cChestEntity_new00_local(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertable(tolua_S,1,"cItems",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertable(tolua_S,1,"cChestEntity",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else #endif { + int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); + int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); { - cItems* tolua_ret = (cItems*) Mtolua_new((cItems)()); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cItems"); + cChestEntity* tolua_ret = (cChestEntity*) Mtolua_new((cChestEntity)(a_BlockX,a_BlockY,a_BlockZ)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"cChestEntity"); tolua_register_gc(tolua_S,lua_gettop(tolua_S)); } } @@ -14771,14 +14726,14 @@ static int tolua_AllToLua_cItems_new00_local(lua_State* tolua_S) } #endif //#ifndef TOLUA_DISABLE -/* method: Get of class cItems */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItems_Get00 -static int tolua_AllToLua_cItems_Get00(lua_State* tolua_S) +/* method: GetSlot of class cChestEntity */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChestEntity_GetSlot00 +static int tolua_AllToLua_cChestEntity_GetSlot00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cItems",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"const cChestEntity",0,&tolua_err) || !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnoobj(tolua_S,3,&tolua_err) ) @@ -14786,33 +14741,33 @@ static int tolua_AllToLua_cItems_Get00(lua_State* tolua_S) else #endif { - cItems* self = (cItems*) tolua_tousertype(tolua_S,1,0); - int a_Idx = ((int) tolua_tonumber(tolua_S,2,0)); + const cChestEntity* self = (const cChestEntity*) tolua_tousertype(tolua_S,1,0); + int a_Slot = ((int) tolua_tonumber(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Get'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSlot'", NULL); #endif { - cItem* tolua_ret = (cItem*) self->Get(a_Idx); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cItem"); + const cItem& tolua_ret = (const cItem&) self->GetSlot(a_Slot); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const cItem"); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Get'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetSlot'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: Set of class cItems */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItems_Set00 -static int tolua_AllToLua_cItems_Set00(lua_State* tolua_S) +/* method: SetSlot of class cChestEntity */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChestEntity_SetSlot00 +static int tolua_AllToLua_cChestEntity_SetSlot00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cItems",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cChestEntity",0,&tolua_err) || !tolua_isnumber(tolua_S,2,0,&tolua_err) || (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const cItem",0,&tolua_err)) || !tolua_isnoobj(tolua_S,4,&tolua_err) @@ -14821,1943 +14776,198 @@ static int tolua_AllToLua_cItems_Set00(lua_State* tolua_S) else #endif { - cItems* self = (cItems*) tolua_tousertype(tolua_S,1,0); - int a_Idx = ((int) tolua_tonumber(tolua_S,2,0)); + cChestEntity* self = (cChestEntity*) tolua_tousertype(tolua_S,1,0); + int a_Slot = ((int) tolua_tonumber(tolua_S,2,0)); const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,3,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Set'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSlot'", NULL); #endif { - self->Set(a_Idx,*a_Item); + self->SetSlot(a_Slot,*a_Item); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Set'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetSlot'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: Add of class cItems */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItems_Add00 -static int tolua_AllToLua_cItems_Add00(lua_State* tolua_S) +/* method: UsedBy of class cChestEntity */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChestEntity_UsedBy00 +static int tolua_AllToLua_cChestEntity_UsedBy00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cItems",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cItem",0,&tolua_err)) || + !tolua_isusertype(tolua_S,1,"cChestEntity",0,&tolua_err) || + !tolua_isusertype(tolua_S,2,"cPlayer",0,&tolua_err) || !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - cItems* self = (cItems*) tolua_tousertype(tolua_S,1,0); - const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,2,0)); + cChestEntity* self = (cChestEntity*) tolua_tousertype(tolua_S,1,0); + cPlayer* a_Player = ((cPlayer*) tolua_tousertype(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Add'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'UsedBy'", NULL); #endif { - self->Add(*a_Item); + self->UsedBy(a_Player); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Add'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'UsedBy'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: Delete of class cItems */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItems_Delete00 -static int tolua_AllToLua_cItems_Delete00(lua_State* tolua_S) +/* method: GetContents of class cChestEntity */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChestEntity_GetContents00 +static int tolua_AllToLua_cChestEntity_GetContents00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cItems",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertype(tolua_S,1,"cChestEntity",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cItems* self = (cItems*) tolua_tousertype(tolua_S,1,0); - int a_Idx = ((int) tolua_tonumber(tolua_S,2,0)); + cChestEntity* self = (cChestEntity*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Delete'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetContents'", NULL); #endif { - self->Delete(a_Idx); + cItemGrid& tolua_ret = (cItemGrid&) self->GetContents(); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"cItemGrid"); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Delete'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetContents'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: Clear of class cItems */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItems_Clear00 -static int tolua_AllToLua_cItems_Clear00(lua_State* tolua_S) +/* get function: __cBlockEntityWindowOwner__ of class cChestEntity */ +#ifndef TOLUA_DISABLE_tolua_get_cChestEntity___cBlockEntityWindowOwner__ +static int tolua_get_cChestEntity___cBlockEntityWindowOwner__(lua_State* tolua_S) +{ + cChestEntity* self = (cChestEntity*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable '__cBlockEntityWindowOwner__'",NULL); +#endif +#ifdef __cplusplus + tolua_pushusertype(tolua_S,(void*)static_cast(self), "cBlockEntityWindowOwner"); +#else + tolua_pushusertype(tolua_S,(void*)((cBlockEntityWindowOwner*)self), "cBlockEntityWindowOwner"); +#endif + return 1; +} +#endif //#ifndef TOLUA_DISABLE + + class Lua__cChestEntity : public cChestEntity, public ToluaBase { +public: + void UsedBy( cPlayer* a_Player) { + if (push_method("UsedBy", tolua_AllToLua_cChestEntity_UsedBy00)) { + tolua_pushusertype(lua_state, (void*)a_Player, "cPlayer"); + ToluaBase::dbcall(lua_state, 2, 0); + } else { + return ( void ) cChestEntity:: UsedBy(a_Player); + }; + }; + + void cChestEntity__UsedBy( cPlayer* a_Player) { + return ( void )cChestEntity::UsedBy(a_Player); + }; + Lua__cChestEntity( int a_BlockX, int a_BlockY, int a_BlockZ): cChestEntity(a_BlockX,a_BlockY,a_BlockZ){}; +}; + +/* method: tolua__set_instance of class Lua__cChestEntity */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cChestEntity_tolua__set_instance00 +static int tolua_AllToLua_Lua__cChestEntity_tolua__set_instance00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cItems",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"Lua__cChestEntity",0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - cItems* self = (cItems*) tolua_tousertype(tolua_S,1,0); + Lua__cChestEntity* self = (Lua__cChestEntity*) tolua_tousertype(tolua_S,1,0); + lua_State* L = tolua_S; + lua_Object lo = ((lua_Object) tolua_tovalue(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clear'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'tolua__set_instance'", NULL); #endif { - self->Clear(); + self->tolua__set_instance(L,lo); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Clear'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'tolua__set_instance'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: Size of class cItems */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItems_Size00 -static int tolua_AllToLua_cItems_Size00(lua_State* tolua_S) +/* method: cChestEntity__UsedBy of class Lua__cChestEntity */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cChestEntity_cChestEntity__UsedBy00 +static int tolua_AllToLua_Lua__cChestEntity_cChestEntity__UsedBy00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cItems",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cItems* self = (cItems*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Size'", NULL); -#endif - { - int tolua_ret = (int) self->Size(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Size'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: Set of class cItems */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItems_Set01 -static int tolua_AllToLua_cItems_Set01(lua_State* tolua_S) -{ - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cItems",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnoobj(tolua_S,6,&tolua_err) - ) - goto tolua_lerror; - else - { - cItems* self = (cItems*) tolua_tousertype(tolua_S,1,0); - int a_Idx = ((int) tolua_tonumber(tolua_S,2,0)); - ENUM_ITEM_ID a_ItemType = ((ENUM_ITEM_ID) (int) tolua_tonumber(tolua_S,3,0)); - char a_ItemCount = ((char) tolua_tonumber(tolua_S,4,0)); - short a_ItemDamage = ((short) tolua_tonumber(tolua_S,5,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Set'", NULL); -#endif - { - self->Set(a_Idx,a_ItemType,a_ItemCount,a_ItemDamage); - } - } - return 0; -tolua_lerror: - return tolua_AllToLua_cItems_Set00(tolua_S); -} -#endif //#ifndef TOLUA_DISABLE - -/* method: Add of class cItems */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItems_Add01 -static int tolua_AllToLua_cItems_Add01(lua_State* tolua_S) -{ - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cItems",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) - ) - goto tolua_lerror; - else - { - cItems* self = (cItems*) tolua_tousertype(tolua_S,1,0); - ENUM_ITEM_ID a_ItemType = ((ENUM_ITEM_ID) (int) tolua_tonumber(tolua_S,2,0)); - char a_ItemCount = ((char) tolua_tonumber(tolua_S,3,0)); - short a_ItemDamage = ((short) tolua_tonumber(tolua_S,4,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Add'", NULL); -#endif - { - self->Add(a_ItemType,a_ItemCount,a_ItemDamage); - } - } - return 0; -tolua_lerror: - return tolua_AllToLua_cItems_Add00(tolua_S); -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetWidth of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_GetWidth00 -static int tolua_AllToLua_cItemGrid_GetWidth00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cItemGrid",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cItemGrid* self = (const cItemGrid*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetWidth'", NULL); -#endif - { - int tolua_ret = (int) self->GetWidth(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetWidth'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetHeight of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_GetHeight00 -static int tolua_AllToLua_cItemGrid_GetHeight00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cItemGrid",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cItemGrid* self = (const cItemGrid*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetHeight'", NULL); -#endif - { - int tolua_ret = (int) self->GetHeight(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetHeight'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetNumSlots of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_GetNumSlots00 -static int tolua_AllToLua_cItemGrid_GetNumSlots00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cItemGrid",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cItemGrid* self = (const cItemGrid*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetNumSlots'", NULL); -#endif - { - int tolua_ret = (int) self->GetNumSlots(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetNumSlots'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetSlotNum of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_GetSlotNum00 -static int tolua_AllToLua_cItemGrid_GetSlotNum00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cItemGrid",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cItemGrid* self = (const cItemGrid*) tolua_tousertype(tolua_S,1,0); - int a_X = ((int) tolua_tonumber(tolua_S,2,0)); - int a_Y = ((int) tolua_tonumber(tolua_S,3,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSlotNum'", NULL); -#endif - { - int tolua_ret = (int) self->GetSlotNum(a_X,a_Y); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetSlotNum'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetSlot of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_GetSlot00 -static int tolua_AllToLua_cItemGrid_GetSlot00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cItemGrid",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cItemGrid* self = (const cItemGrid*) tolua_tousertype(tolua_S,1,0); - int a_X = ((int) tolua_tonumber(tolua_S,2,0)); - int a_Y = ((int) tolua_tonumber(tolua_S,3,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSlot'", NULL); -#endif - { - const cItem& tolua_ret = (const cItem&) self->GetSlot(a_X,a_Y); - tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const cItem"); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetSlot'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetSlot of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_GetSlot01 -static int tolua_AllToLua_cItemGrid_GetSlot01(lua_State* tolua_S) -{ - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cItemGrid",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else - { - const cItemGrid* self = (const cItemGrid*) tolua_tousertype(tolua_S,1,0); - int a_SlotNum = ((int) tolua_tonumber(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSlot'", NULL); -#endif - { - const cItem& tolua_ret = (const cItem&) self->GetSlot(a_SlotNum); - tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const cItem"); - } - } - return 1; -tolua_lerror: - return tolua_AllToLua_cItemGrid_GetSlot00(tolua_S); -} -#endif //#ifndef TOLUA_DISABLE - -/* method: SetSlot of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_SetSlot00 -static int tolua_AllToLua_cItemGrid_SetSlot00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const cItem",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,5,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); - int a_X = ((int) tolua_tonumber(tolua_S,2,0)); - int a_Y = ((int) tolua_tonumber(tolua_S,3,0)); - const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,4,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSlot'", NULL); -#endif - { - self->SetSlot(a_X,a_Y,*a_Item); - } - } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetSlot'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: SetSlot of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_SetSlot01 -static int tolua_AllToLua_cItemGrid_SetSlot01(lua_State* tolua_S) -{ - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnoobj(tolua_S,7,&tolua_err) - ) - goto tolua_lerror; - else - { - cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); - int a_X = ((int) tolua_tonumber(tolua_S,2,0)); - int a_Y = ((int) tolua_tonumber(tolua_S,3,0)); - short a_ItemType = ((short) tolua_tonumber(tolua_S,4,0)); - char a_ItemCount = ((char) tolua_tonumber(tolua_S,5,0)); - short a_ItemDamage = ((short) tolua_tonumber(tolua_S,6,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSlot'", NULL); -#endif - { - self->SetSlot(a_X,a_Y,a_ItemType,a_ItemCount,a_ItemDamage); - } - } - return 0; -tolua_lerror: - return tolua_AllToLua_cItemGrid_SetSlot00(tolua_S); -} -#endif //#ifndef TOLUA_DISABLE - -/* method: SetSlot of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_SetSlot02 -static int tolua_AllToLua_cItemGrid_SetSlot02(lua_State* tolua_S) -{ - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const cItem",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,4,&tolua_err) - ) - goto tolua_lerror; - else - { - cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); - int a_SlotNum = ((int) tolua_tonumber(tolua_S,2,0)); - const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,3,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSlot'", NULL); -#endif - { - self->SetSlot(a_SlotNum,*a_Item); - } - } - return 0; -tolua_lerror: - return tolua_AllToLua_cItemGrid_SetSlot01(tolua_S); -} -#endif //#ifndef TOLUA_DISABLE - -/* method: SetSlot of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_SetSlot03 -static int tolua_AllToLua_cItemGrid_SetSlot03(lua_State* tolua_S) -{ - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnoobj(tolua_S,6,&tolua_err) - ) - goto tolua_lerror; - else - { - cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); - int a_SlotNum = ((int) tolua_tonumber(tolua_S,2,0)); - short a_ItemType = ((short) tolua_tonumber(tolua_S,3,0)); - char a_ItemCount = ((char) tolua_tonumber(tolua_S,4,0)); - short a_ItemDamage = ((short) tolua_tonumber(tolua_S,5,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSlot'", NULL); -#endif - { - self->SetSlot(a_SlotNum,a_ItemType,a_ItemCount,a_ItemDamage); - } - } - return 0; -tolua_lerror: - return tolua_AllToLua_cItemGrid_SetSlot02(tolua_S); -} -#endif //#ifndef TOLUA_DISABLE - -/* method: EmptySlot of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_EmptySlot00 -static int tolua_AllToLua_cItemGrid_EmptySlot00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); - int a_X = ((int) tolua_tonumber(tolua_S,2,0)); - int a_Y = ((int) tolua_tonumber(tolua_S,3,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'EmptySlot'", NULL); -#endif - { - self->EmptySlot(a_X,a_Y); - } - } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'EmptySlot'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: EmptySlot of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_EmptySlot01 -static int tolua_AllToLua_cItemGrid_EmptySlot01(lua_State* tolua_S) -{ - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else - { - cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); - int a_SlotNum = ((int) tolua_tonumber(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'EmptySlot'", NULL); -#endif - { - self->EmptySlot(a_SlotNum); - } - } - return 0; -tolua_lerror: - return tolua_AllToLua_cItemGrid_EmptySlot00(tolua_S); -} -#endif //#ifndef TOLUA_DISABLE - -/* method: Clear of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_Clear00 -static int tolua_AllToLua_cItemGrid_Clear00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clear'", NULL); -#endif - { - self->Clear(); - } - } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Clear'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: HowManyCanFit of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_HowManyCanFit00 -static int tolua_AllToLua_cItemGrid_HowManyCanFit00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cItem",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); - const cItem* a_ItemStack = ((const cItem*) tolua_tousertype(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HowManyCanFit'", NULL); -#endif - { - int tolua_ret = (int) self->HowManyCanFit(*a_ItemStack); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'HowManyCanFit'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: AddItem of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_AddItem00 -static int tolua_AllToLua_cItemGrid_AddItem00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"cItem",0,&tolua_err)) || - !tolua_isboolean(tolua_S,3,1,&tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); - cItem* a_ItemStack = ((cItem*) tolua_tousertype(tolua_S,2,0)); - bool a_AllowNewStacks = ((bool) tolua_toboolean(tolua_S,3,true)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddItem'", NULL); -#endif - { - int tolua_ret = (int) self->AddItem(*a_ItemStack,a_AllowNewStacks); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'AddItem'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: AddItems of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_AddItems00 -static int tolua_AllToLua_cItemGrid_AddItems00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"cItems",0,&tolua_err)) || - !tolua_isboolean(tolua_S,3,1,&tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); - cItems* a_ItemStackList = ((cItems*) tolua_tousertype(tolua_S,2,0)); - bool a_AllowNewStacks = ((bool) tolua_toboolean(tolua_S,3,true)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddItems'", NULL); -#endif - { - int tolua_ret = (int) self->AddItems(*a_ItemStackList,a_AllowNewStacks); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'AddItems'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: ChangeSlotCount of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_ChangeSlotCount00 -static int tolua_AllToLua_cItemGrid_ChangeSlotCount00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); - int a_SlotNum = ((int) tolua_tonumber(tolua_S,2,0)); - int a_AddToCount = ((int) tolua_tonumber(tolua_S,3,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ChangeSlotCount'", NULL); -#endif - { - int tolua_ret = (int) self->ChangeSlotCount(a_SlotNum,a_AddToCount); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'ChangeSlotCount'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: ChangeSlotCount of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_ChangeSlotCount01 -static int tolua_AllToLua_cItemGrid_ChangeSlotCount01(lua_State* tolua_S) -{ - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) - ) - goto tolua_lerror; - else - { - cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); - int a_X = ((int) tolua_tonumber(tolua_S,2,0)); - int a_Y = ((int) tolua_tonumber(tolua_S,3,0)); - int a_AddToCount = ((int) tolua_tonumber(tolua_S,4,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ChangeSlotCount'", NULL); -#endif - { - int tolua_ret = (int) self->ChangeSlotCount(a_X,a_Y,a_AddToCount); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -tolua_lerror: - return tolua_AllToLua_cItemGrid_ChangeSlotCount00(tolua_S); -} -#endif //#ifndef TOLUA_DISABLE - -/* method: RemoveOneItem of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_RemoveOneItem00 -static int tolua_AllToLua_cItemGrid_RemoveOneItem00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); - int a_SlotNum = ((int) tolua_tonumber(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RemoveOneItem'", NULL); -#endif - { - cItem tolua_ret = (cItem) self->RemoveOneItem(a_SlotNum); - { -#ifdef __cplusplus - void* tolua_obj = Mtolua_new((cItem)(tolua_ret)); - tolua_pushusertype(tolua_S,tolua_obj,"cItem"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); -#else - void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(cItem)); - tolua_pushusertype(tolua_S,tolua_obj,"cItem"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); -#endif - } - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'RemoveOneItem'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: RemoveOneItem of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_RemoveOneItem01 -static int tolua_AllToLua_cItemGrid_RemoveOneItem01(lua_State* tolua_S) -{ - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) - ) - goto tolua_lerror; - else - { - cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); - int a_X = ((int) tolua_tonumber(tolua_S,2,0)); - int a_Y = ((int) tolua_tonumber(tolua_S,3,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RemoveOneItem'", NULL); -#endif - { - cItem tolua_ret = (cItem) self->RemoveOneItem(a_X,a_Y); - { -#ifdef __cplusplus - void* tolua_obj = Mtolua_new((cItem)(tolua_ret)); - tolua_pushusertype(tolua_S,tolua_obj,"cItem"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); -#else - void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(cItem)); - tolua_pushusertype(tolua_S,tolua_obj,"cItem"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); -#endif - } - } - } - return 1; -tolua_lerror: - return tolua_AllToLua_cItemGrid_RemoveOneItem00(tolua_S); -} -#endif //#ifndef TOLUA_DISABLE - -/* method: HowManyItems of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_HowManyItems00 -static int tolua_AllToLua_cItemGrid_HowManyItems00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cItem",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); - const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HowManyItems'", NULL); -#endif - { - int tolua_ret = (int) self->HowManyItems(*a_Item); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'HowManyItems'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: HasItems of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_HasItems00 -static int tolua_AllToLua_cItemGrid_HasItems00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cItem",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); - const cItem* a_ItemStack = ((const cItem*) tolua_tousertype(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HasItems'", NULL); -#endif - { - bool tolua_ret = (bool) self->HasItems(*a_ItemStack); - tolua_pushboolean(tolua_S,(bool)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'HasItems'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetFirstEmptySlot of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_GetFirstEmptySlot00 -static int tolua_AllToLua_cItemGrid_GetFirstEmptySlot00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cItemGrid",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cItemGrid* self = (const cItemGrid*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetFirstEmptySlot'", NULL); -#endif - { - int tolua_ret = (int) self->GetFirstEmptySlot(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetFirstEmptySlot'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetFirstUsedSlot of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_GetFirstUsedSlot00 -static int tolua_AllToLua_cItemGrid_GetFirstUsedSlot00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cItemGrid",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cItemGrid* self = (const cItemGrid*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetFirstUsedSlot'", NULL); -#endif - { - int tolua_ret = (int) self->GetFirstUsedSlot(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetFirstUsedSlot'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetLastEmptySlot of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_GetLastEmptySlot00 -static int tolua_AllToLua_cItemGrid_GetLastEmptySlot00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cItemGrid",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cItemGrid* self = (const cItemGrid*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetLastEmptySlot'", NULL); -#endif - { - int tolua_ret = (int) self->GetLastEmptySlot(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetLastEmptySlot'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetLastUsedSlot of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_GetLastUsedSlot00 -static int tolua_AllToLua_cItemGrid_GetLastUsedSlot00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cItemGrid",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cItemGrid* self = (const cItemGrid*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetLastUsedSlot'", NULL); -#endif - { - int tolua_ret = (int) self->GetLastUsedSlot(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetLastUsedSlot'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetNextEmptySlot of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_GetNextEmptySlot00 -static int tolua_AllToLua_cItemGrid_GetNextEmptySlot00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cItemGrid",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cItemGrid* self = (const cItemGrid*) tolua_tousertype(tolua_S,1,0); - int a_StartFrom = ((int) tolua_tonumber(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetNextEmptySlot'", NULL); -#endif - { - int tolua_ret = (int) self->GetNextEmptySlot(a_StartFrom); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetNextEmptySlot'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetNextUsedSlot of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_GetNextUsedSlot00 -static int tolua_AllToLua_cItemGrid_GetNextUsedSlot00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cItemGrid",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cItemGrid* self = (const cItemGrid*) tolua_tousertype(tolua_S,1,0); - int a_StartFrom = ((int) tolua_tonumber(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetNextUsedSlot'", NULL); -#endif - { - int tolua_ret = (int) self->GetNextUsedSlot(a_StartFrom); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetNextUsedSlot'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: CopyToItems of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_CopyToItems00 -static int tolua_AllToLua_cItemGrid_CopyToItems00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cItemGrid",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"cItems",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cItemGrid* self = (const cItemGrid*) tolua_tousertype(tolua_S,1,0); - cItems* a_Items = ((cItems*) tolua_tousertype(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'CopyToItems'", NULL); -#endif - { - self->CopyToItems(*a_Items); - } - } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'CopyToItems'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: DamageItem of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_DamageItem00 -static int tolua_AllToLua_cItemGrid_DamageItem00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); - int a_SlotNum = ((int) tolua_tonumber(tolua_S,2,0)); - short a_Amount = ((short) tolua_tonumber(tolua_S,3,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DamageItem'", NULL); -#endif - { - bool tolua_ret = (bool) self->DamageItem(a_SlotNum,a_Amount); - tolua_pushboolean(tolua_S,(bool)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'DamageItem'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: DamageItem of class cItemGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cItemGrid_DamageItem01 -static int tolua_AllToLua_cItemGrid_DamageItem01(lua_State* tolua_S) -{ - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cItemGrid",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) - ) - goto tolua_lerror; - else - { - cItemGrid* self = (cItemGrid*) tolua_tousertype(tolua_S,1,0); - int a_X = ((int) tolua_tonumber(tolua_S,2,0)); - int a_Y = ((int) tolua_tonumber(tolua_S,3,0)); - short a_Amount = ((short) tolua_tonumber(tolua_S,4,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DamageItem'", NULL); -#endif - { - bool tolua_ret = (bool) self->DamageItem(a_X,a_Y,a_Amount); - tolua_pushboolean(tolua_S,(bool)tolua_ret); - } - } - return 1; -tolua_lerror: - return tolua_AllToLua_cItemGrid_DamageItem00(tolua_S); -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetPosX of class cBlockEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockEntity_GetPosX00 -static int tolua_AllToLua_cBlockEntity_GetPosX00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cBlockEntity",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cBlockEntity* self = (const cBlockEntity*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetPosX'", NULL); -#endif - { - int tolua_ret = (int) self->GetPosX(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetPosX'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetPosY of class cBlockEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockEntity_GetPosY00 -static int tolua_AllToLua_cBlockEntity_GetPosY00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cBlockEntity",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cBlockEntity* self = (const cBlockEntity*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetPosY'", NULL); -#endif - { - int tolua_ret = (int) self->GetPosY(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetPosY'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetPosZ of class cBlockEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockEntity_GetPosZ00 -static int tolua_AllToLua_cBlockEntity_GetPosZ00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cBlockEntity",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cBlockEntity* self = (const cBlockEntity*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetPosZ'", NULL); -#endif - { - int tolua_ret = (int) self->GetPosZ(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetPosZ'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetBlockType of class cBlockEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockEntity_GetBlockType00 -static int tolua_AllToLua_cBlockEntity_GetBlockType00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cBlockEntity",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cBlockEntity* self = (const cBlockEntity*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetBlockType'", NULL); -#endif - { - unsigned char tolua_ret = ( unsigned char) self->GetBlockType(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetBlockType'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetWorld of class cBlockEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockEntity_GetWorld00 -static int tolua_AllToLua_cBlockEntity_GetWorld00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cBlockEntity",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cBlockEntity* self = (const cBlockEntity*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetWorld'", NULL); -#endif - { - cWorld* tolua_ret = (cWorld*) self->GetWorld(); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cWorld"); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetWorld'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetChunkX of class cBlockEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockEntity_GetChunkX00 -static int tolua_AllToLua_cBlockEntity_GetChunkX00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cBlockEntity",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cBlockEntity* self = (const cBlockEntity*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetChunkX'", NULL); -#endif - { - int tolua_ret = (int) self->GetChunkX(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetChunkX'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetChunkZ of class cBlockEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockEntity_GetChunkZ00 -static int tolua_AllToLua_cBlockEntity_GetChunkZ00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cBlockEntity",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cBlockEntity* self = (const cBlockEntity*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetChunkZ'", NULL); -#endif - { - int tolua_ret = (int) self->GetChunkZ(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetChunkZ'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetRelX of class cBlockEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockEntity_GetRelX00 -static int tolua_AllToLua_cBlockEntity_GetRelX00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cBlockEntity",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cBlockEntity* self = (const cBlockEntity*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetRelX'", NULL); -#endif - { - int tolua_ret = (int) self->GetRelX(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetRelX'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetRelZ of class cBlockEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockEntity_GetRelZ00 -static int tolua_AllToLua_cBlockEntity_GetRelZ00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cBlockEntity",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cBlockEntity* self = (const cBlockEntity*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetRelZ'", NULL); -#endif - { - int tolua_ret = (int) self->GetRelZ(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetRelZ'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetSlot of class cBlockEntityWithItems */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockEntityWithItems_GetSlot00 -static int tolua_AllToLua_cBlockEntityWithItems_GetSlot00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cBlockEntityWithItems",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cBlockEntityWithItems* self = (const cBlockEntityWithItems*) tolua_tousertype(tolua_S,1,0); - int a_SlotNum = ((int) tolua_tonumber(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSlot'", NULL); -#endif - { - const cItem& tolua_ret = (const cItem&) self->GetSlot(a_SlotNum); - tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const cItem"); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetSlot'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetSlot of class cBlockEntityWithItems */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockEntityWithItems_GetSlot01 -static int tolua_AllToLua_cBlockEntityWithItems_GetSlot01(lua_State* tolua_S) -{ - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cBlockEntityWithItems",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) - ) - goto tolua_lerror; - else - { - const cBlockEntityWithItems* self = (const cBlockEntityWithItems*) tolua_tousertype(tolua_S,1,0); - int a_X = ((int) tolua_tonumber(tolua_S,2,0)); - int a_Y = ((int) tolua_tonumber(tolua_S,3,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSlot'", NULL); -#endif - { - const cItem& tolua_ret = (const cItem&) self->GetSlot(a_X,a_Y); - tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const cItem"); - } - } - return 1; -tolua_lerror: - return tolua_AllToLua_cBlockEntityWithItems_GetSlot00(tolua_S); -} -#endif //#ifndef TOLUA_DISABLE - -/* method: SetSlot of class cBlockEntityWithItems */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockEntityWithItems_SetSlot00 -static int tolua_AllToLua_cBlockEntityWithItems_SetSlot00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cBlockEntityWithItems",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const cItem",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,4,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cBlockEntityWithItems* self = (cBlockEntityWithItems*) tolua_tousertype(tolua_S,1,0); - int a_SlotNum = ((int) tolua_tonumber(tolua_S,2,0)); - const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,3,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSlot'", NULL); -#endif - { - self->SetSlot(a_SlotNum,*a_Item); - } - } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetSlot'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: SetSlot of class cBlockEntityWithItems */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockEntityWithItems_SetSlot01 -static int tolua_AllToLua_cBlockEntityWithItems_SetSlot01(lua_State* tolua_S) -{ - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cBlockEntityWithItems",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const cItem",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,5,&tolua_err) - ) - goto tolua_lerror; - else - { - cBlockEntityWithItems* self = (cBlockEntityWithItems*) tolua_tousertype(tolua_S,1,0); - int a_X = ((int) tolua_tonumber(tolua_S,2,0)); - int a_Y = ((int) tolua_tonumber(tolua_S,3,0)); - const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,4,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSlot'", NULL); -#endif - { - self->SetSlot(a_X,a_Y,*a_Item); - } - } - return 0; -tolua_lerror: - return tolua_AllToLua_cBlockEntityWithItems_SetSlot00(tolua_S); -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetContents of class cBlockEntityWithItems */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockEntityWithItems_GetContents00 -static int tolua_AllToLua_cBlockEntityWithItems_GetContents00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cBlockEntityWithItems",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cBlockEntityWithItems* self = (cBlockEntityWithItems*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetContents'", NULL); -#endif - { - cItemGrid& tolua_ret = (cItemGrid&) self->GetContents(); - tolua_pushusertype(tolua_S,(void*)&tolua_ret,"cItemGrid"); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetContents'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: new of class cChestEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChestEntity_new00 -static int tolua_AllToLua_cChestEntity_new00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cChestEntity",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); - { - cChestEntity* tolua_ret = (cChestEntity*) Mtolua_new((cChestEntity)(a_BlockX,a_BlockY,a_BlockZ)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cChestEntity"); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: new_local of class cChestEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChestEntity_new00_local -static int tolua_AllToLua_cChestEntity_new00_local(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cChestEntity",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); - { - cChestEntity* tolua_ret = (cChestEntity*) Mtolua_new((cChestEntity)(a_BlockX,a_BlockY,a_BlockZ)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cChestEntity"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* get function: __cBlockEntityWindowOwner__ of class cChestEntity */ -#ifndef TOLUA_DISABLE_tolua_get_cChestEntity___cBlockEntityWindowOwner__ -static int tolua_get_cChestEntity___cBlockEntityWindowOwner__(lua_State* tolua_S) -{ - cChestEntity* self = (cChestEntity*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable '__cBlockEntityWindowOwner__'",NULL); -#endif -#ifdef __cplusplus - tolua_pushusertype(tolua_S,(void*)static_cast(self), "cBlockEntityWindowOwner"); -#else - tolua_pushusertype(tolua_S,(void*)((cBlockEntityWindowOwner*)self), "cBlockEntityWindowOwner"); -#endif - return 1; -} -#endif //#ifndef TOLUA_DISABLE - -/* method: AddDropSpenserDir of class cDropSpenserEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cDropSpenserEntity_AddDropSpenserDir00 -static int tolua_AllToLua_cDropSpenserEntity_AddDropSpenserDir00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cDropSpenserEntity",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnoobj(tolua_S,6,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cDropSpenserEntity* self = (cDropSpenserEntity*) tolua_tousertype(tolua_S,1,0); - int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); - unsigned char a_Direction = (( unsigned char) tolua_tonumber(tolua_S,5,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddDropSpenserDir'", NULL); -#endif - { - self->AddDropSpenserDir(a_BlockX,a_BlockY,a_BlockZ,a_Direction); - tolua_pushnumber(tolua_S,(lua_Number)a_BlockX); - tolua_pushnumber(tolua_S,(lua_Number)a_BlockY); - tolua_pushnumber(tolua_S,(lua_Number)a_BlockZ); - } - } - return 3; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'AddDropSpenserDir'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: Activate of class cDropSpenserEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cDropSpenserEntity_Activate00 -static int tolua_AllToLua_cDropSpenserEntity_Activate00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cDropSpenserEntity",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cDropSpenserEntity* self = (cDropSpenserEntity*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Activate'", NULL); -#endif - { - self->Activate(); - } - } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Activate'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: SetRedstonePower of class cDropSpenserEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cDropSpenserEntity_SetRedstonePower00 -static int tolua_AllToLua_cDropSpenserEntity_SetRedstonePower00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cDropSpenserEntity",0,&tolua_err) || - !tolua_isboolean(tolua_S,2,0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"Lua__cChestEntity",0,&tolua_err) || + !tolua_isusertype(tolua_S,2,"cPlayer",0,&tolua_err) || !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - cDropSpenserEntity* self = (cDropSpenserEntity*) tolua_tousertype(tolua_S,1,0); - bool a_IsPowered = ((bool) tolua_toboolean(tolua_S,2,0)); + Lua__cChestEntity* self = (Lua__cChestEntity*) tolua_tousertype(tolua_S,1,0); + cPlayer* a_Player = ((cPlayer*) tolua_tousertype(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetRedstonePower'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'cChestEntity__UsedBy'", NULL); #endif { - self->SetRedstonePower(a_IsPowered); + self->cChestEntity__UsedBy(a_Player); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetRedstonePower'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'cChestEntity__UsedBy'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* get function: __cBlockEntityWindowOwner__ of class cDropSpenserEntity */ -#ifndef TOLUA_DISABLE_tolua_get_cDropSpenserEntity___cBlockEntityWindowOwner__ -static int tolua_get_cDropSpenserEntity___cBlockEntityWindowOwner__(lua_State* tolua_S) -{ - cDropSpenserEntity* self = (cDropSpenserEntity*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable '__cBlockEntityWindowOwner__'",NULL); -#endif -#ifdef __cplusplus - tolua_pushusertype(tolua_S,(void*)static_cast(self), "cBlockEntityWindowOwner"); -#else - tolua_pushusertype(tolua_S,(void*)((cBlockEntityWindowOwner*)self), "cBlockEntityWindowOwner"); -#endif - return 1; -} -#endif //#ifndef TOLUA_DISABLE - -/* method: new of class cDispenserEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cDispenserEntity_new00 -static int tolua_AllToLua_cDispenserEntity_new00(lua_State* tolua_S) +/* method: new of class Lua__cChestEntity */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cChestEntity_new00 +static int tolua_AllToLua_Lua__cChestEntity_new00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertable(tolua_S,1,"cDispenserEntity",0,&tolua_err) || + !tolua_isusertable(tolua_S,1,"Lua__cChestEntity",0,&tolua_err) || !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || !tolua_isnumber(tolua_S,4,0,&tolua_err) || @@ -16771,8 +14981,8 @@ static int tolua_AllToLua_cDispenserEntity_new00(lua_State* tolua_S) int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); { - cDispenserEntity* tolua_ret = (cDispenserEntity*) Mtolua_new((cDispenserEntity)(a_BlockX,a_BlockY,a_BlockZ)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cDispenserEntity"); + Lua__cChestEntity* tolua_ret = (Lua__cChestEntity*) Mtolua_new((Lua__cChestEntity)(a_BlockX,a_BlockY,a_BlockZ)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"Lua__cChestEntity"); } } return 1; @@ -16784,14 +14994,14 @@ static int tolua_AllToLua_cDispenserEntity_new00(lua_State* tolua_S) } #endif //#ifndef TOLUA_DISABLE -/* method: new_local of class cDispenserEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cDispenserEntity_new00_local -static int tolua_AllToLua_cDispenserEntity_new00_local(lua_State* tolua_S) +/* method: new_local of class Lua__cChestEntity */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_Lua__cChestEntity_new00_local +static int tolua_AllToLua_Lua__cChestEntity_new00_local(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertable(tolua_S,1,"cDispenserEntity",0,&tolua_err) || + !tolua_isusertable(tolua_S,1,"Lua__cChestEntity",0,&tolua_err) || !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || !tolua_isnumber(tolua_S,4,0,&tolua_err) || @@ -16805,8 +15015,8 @@ static int tolua_AllToLua_cDispenserEntity_new00_local(lua_State* tolua_S) int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); { - cDispenserEntity* tolua_ret = (cDispenserEntity*) Mtolua_new((cDispenserEntity)(a_BlockX,a_BlockY,a_BlockZ)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cDispenserEntity"); + Lua__cChestEntity* tolua_ret = (Lua__cChestEntity*) Mtolua_new((Lua__cChestEntity)(a_BlockX,a_BlockY,a_BlockZ)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"Lua__cChestEntity"); tolua_register_gc(tolua_S,lua_gettop(tolua_S)); } } @@ -16819,74 +15029,17 @@ static int tolua_AllToLua_cDispenserEntity_new00_local(lua_State* tolua_S) } #endif //#ifndef TOLUA_DISABLE -/* method: new of class cDropperEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cDropperEntity_new00 -static int tolua_AllToLua_cDropperEntity_new00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cDropperEntity",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); - { - cDropperEntity* tolua_ret = (cDropperEntity*) Mtolua_new((cDropperEntity)(a_BlockX,a_BlockY,a_BlockZ)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cDropperEntity"); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE -/* method: new_local of class cDropperEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cDropperEntity_new00_local -static int tolua_AllToLua_cDropperEntity_new00_local(lua_State* tolua_S) +/* function to release collected object via destructor */ +#ifdef __cplusplus + +static int tolua_collect_Lua__cChestEntity (lua_State* tolua_S) { -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cDropperEntity",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); - { - cDropperEntity* tolua_ret = (cDropperEntity*) Mtolua_new((cDropperEntity)(a_BlockX,a_BlockY,a_BlockZ)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cDropperEntity"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); - return 0; -#endif + Lua__cChestEntity* self = (Lua__cChestEntity*) tolua_tousertype(tolua_S,1,0); + delete self; + return 0; } -#endif //#ifndef TOLUA_DISABLE +#endif /* get function: Name of class HTTPFormData */ #ifndef TOLUA_DISABLE_tolua_get_HTTPFormData_Name @@ -20456,679 +18609,414 @@ static int tolua_set_cCuboid_p2(lua_State* tolua_S) if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3i",0,&tolua_err))) tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); #endif - self->p2 = *((Vector3i*) tolua_tousertype(tolua_S,2,0)) -; - return 0; -} -#endif //#ifndef TOLUA_DISABLE - -/* method: new of class cCuboid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_new00 -static int tolua_AllToLua_cCuboid_new00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cCuboid",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - { - cCuboid* tolua_ret = (cCuboid*) Mtolua_new((cCuboid)()); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cCuboid"); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: new_local of class cCuboid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_new00_local -static int tolua_AllToLua_cCuboid_new00_local(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cCuboid",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - { - cCuboid* tolua_ret = (cCuboid*) Mtolua_new((cCuboid)()); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cCuboid"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: new of class cCuboid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_new01 -static int tolua_AllToLua_cCuboid_new01(lua_State* tolua_S) -{ - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cCuboid",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cCuboid",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else - { - const cCuboid* a_Cuboid = ((const cCuboid*) tolua_tousertype(tolua_S,2,0)); - { - cCuboid* tolua_ret = (cCuboid*) Mtolua_new((cCuboid)(*a_Cuboid)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cCuboid"); - } - } - return 1; -tolua_lerror: - return tolua_AllToLua_cCuboid_new00(tolua_S); -} -#endif //#ifndef TOLUA_DISABLE - -/* method: new_local of class cCuboid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_new01_local -static int tolua_AllToLua_cCuboid_new01_local(lua_State* tolua_S) -{ - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cCuboid",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cCuboid",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else - { - const cCuboid* a_Cuboid = ((const cCuboid*) tolua_tousertype(tolua_S,2,0)); - { - cCuboid* tolua_ret = (cCuboid*) Mtolua_new((cCuboid)(*a_Cuboid)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cCuboid"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); - } - } - return 1; -tolua_lerror: - return tolua_AllToLua_cCuboid_new00_local(tolua_S); + self->p2 = *((Vector3i*) tolua_tousertype(tolua_S,2,0)) +; + return 0; } #endif //#ifndef TOLUA_DISABLE /* method: new of class cCuboid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_new02 -static int tolua_AllToLua_cCuboid_new02(lua_State* tolua_S) +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_new00 +static int tolua_AllToLua_cCuboid_new00(lua_State* tolua_S) { +#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertable(tolua_S,1,"cCuboid",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3i",0,&tolua_err)) || - (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3i",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,4,&tolua_err) + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else +#endif { - const Vector3i* a_p1 = ((const Vector3i*) tolua_tousertype(tolua_S,2,0)); - const Vector3i* a_p2 = ((const Vector3i*) tolua_tousertype(tolua_S,3,0)); { - cCuboid* tolua_ret = (cCuboid*) Mtolua_new((cCuboid)(*a_p1,*a_p2)); + cCuboid* tolua_ret = (cCuboid*) Mtolua_new((cCuboid)()); tolua_pushusertype(tolua_S,(void*)tolua_ret,"cCuboid"); } } return 1; -tolua_lerror: - return tolua_AllToLua_cCuboid_new01(tolua_S); +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif } #endif //#ifndef TOLUA_DISABLE /* method: new_local of class cCuboid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_new02_local -static int tolua_AllToLua_cCuboid_new02_local(lua_State* tolua_S) +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_new00_local +static int tolua_AllToLua_cCuboid_new00_local(lua_State* tolua_S) { +#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertable(tolua_S,1,"cCuboid",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3i",0,&tolua_err)) || - (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3i",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,4,&tolua_err) + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else +#endif { - const Vector3i* a_p1 = ((const Vector3i*) tolua_tousertype(tolua_S,2,0)); - const Vector3i* a_p2 = ((const Vector3i*) tolua_tousertype(tolua_S,3,0)); { - cCuboid* tolua_ret = (cCuboid*) Mtolua_new((cCuboid)(*a_p1,*a_p2)); + cCuboid* tolua_ret = (cCuboid*) Mtolua_new((cCuboid)()); tolua_pushusertype(tolua_S,(void*)tolua_ret,"cCuboid"); tolua_register_gc(tolua_S,lua_gettop(tolua_S)); } } return 1; -tolua_lerror: - return tolua_AllToLua_cCuboid_new01_local(tolua_S); +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif } #endif //#ifndef TOLUA_DISABLE /* method: new of class cCuboid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_new03 -static int tolua_AllToLua_cCuboid_new03(lua_State* tolua_S) +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_new01 +static int tolua_AllToLua_cCuboid_new01(lua_State* tolua_S) { tolua_Error tolua_err; if ( !tolua_isusertable(tolua_S,1,"cCuboid",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cCuboid",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else { - int a_X1 = ((int) tolua_tonumber(tolua_S,2,0)); - int a_Y1 = ((int) tolua_tonumber(tolua_S,3,0)); - int a_Z1 = ((int) tolua_tonumber(tolua_S,4,0)); + const cCuboid* a_Cuboid = ((const cCuboid*) tolua_tousertype(tolua_S,2,0)); { - cCuboid* tolua_ret = (cCuboid*) Mtolua_new((cCuboid)(a_X1,a_Y1,a_Z1)); + cCuboid* tolua_ret = (cCuboid*) Mtolua_new((cCuboid)(*a_Cuboid)); tolua_pushusertype(tolua_S,(void*)tolua_ret,"cCuboid"); } } return 1; tolua_lerror: - return tolua_AllToLua_cCuboid_new02(tolua_S); + return tolua_AllToLua_cCuboid_new00(tolua_S); } #endif //#ifndef TOLUA_DISABLE /* method: new_local of class cCuboid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_new03_local -static int tolua_AllToLua_cCuboid_new03_local(lua_State* tolua_S) +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_new01_local +static int tolua_AllToLua_cCuboid_new01_local(lua_State* tolua_S) { tolua_Error tolua_err; if ( !tolua_isusertable(tolua_S,1,"cCuboid",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cCuboid",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else { - int a_X1 = ((int) tolua_tonumber(tolua_S,2,0)); - int a_Y1 = ((int) tolua_tonumber(tolua_S,3,0)); - int a_Z1 = ((int) tolua_tonumber(tolua_S,4,0)); + const cCuboid* a_Cuboid = ((const cCuboid*) tolua_tousertype(tolua_S,2,0)); { - cCuboid* tolua_ret = (cCuboid*) Mtolua_new((cCuboid)(a_X1,a_Y1,a_Z1)); + cCuboid* tolua_ret = (cCuboid*) Mtolua_new((cCuboid)(*a_Cuboid)); tolua_pushusertype(tolua_S,(void*)tolua_ret,"cCuboid"); tolua_register_gc(tolua_S,lua_gettop(tolua_S)); } } return 1; tolua_lerror: - return tolua_AllToLua_cCuboid_new02_local(tolua_S); + return tolua_AllToLua_cCuboid_new00_local(tolua_S); } #endif //#ifndef TOLUA_DISABLE /* method: new of class cCuboid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_new04 -static int tolua_AllToLua_cCuboid_new04(lua_State* tolua_S) +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_new02 +static int tolua_AllToLua_cCuboid_new02(lua_State* tolua_S) { tolua_Error tolua_err; if ( !tolua_isusertable(tolua_S,1,"cCuboid",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnumber(tolua_S,7,0,&tolua_err) || - !tolua_isnoobj(tolua_S,8,&tolua_err) + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3i",0,&tolua_err)) || + (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3i",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,4,&tolua_err) ) goto tolua_lerror; else { - int a_X1 = ((int) tolua_tonumber(tolua_S,2,0)); - int a_Y1 = ((int) tolua_tonumber(tolua_S,3,0)); - int a_Z1 = ((int) tolua_tonumber(tolua_S,4,0)); - int a_X2 = ((int) tolua_tonumber(tolua_S,5,0)); - int a_Y2 = ((int) tolua_tonumber(tolua_S,6,0)); - int a_Z2 = ((int) tolua_tonumber(tolua_S,7,0)); + const Vector3i* a_p1 = ((const Vector3i*) tolua_tousertype(tolua_S,2,0)); + const Vector3i* a_p2 = ((const Vector3i*) tolua_tousertype(tolua_S,3,0)); { - cCuboid* tolua_ret = (cCuboid*) Mtolua_new((cCuboid)(a_X1,a_Y1,a_Z1,a_X2,a_Y2,a_Z2)); + cCuboid* tolua_ret = (cCuboid*) Mtolua_new((cCuboid)(*a_p1,*a_p2)); tolua_pushusertype(tolua_S,(void*)tolua_ret,"cCuboid"); } } return 1; tolua_lerror: - return tolua_AllToLua_cCuboid_new03(tolua_S); + return tolua_AllToLua_cCuboid_new01(tolua_S); } #endif //#ifndef TOLUA_DISABLE /* method: new_local of class cCuboid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_new04_local -static int tolua_AllToLua_cCuboid_new04_local(lua_State* tolua_S) +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_new02_local +static int tolua_AllToLua_cCuboid_new02_local(lua_State* tolua_S) { tolua_Error tolua_err; if ( !tolua_isusertable(tolua_S,1,"cCuboid",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnumber(tolua_S,7,0,&tolua_err) || - !tolua_isnoobj(tolua_S,8,&tolua_err) - ) - goto tolua_lerror; - else - { - int a_X1 = ((int) tolua_tonumber(tolua_S,2,0)); - int a_Y1 = ((int) tolua_tonumber(tolua_S,3,0)); - int a_Z1 = ((int) tolua_tonumber(tolua_S,4,0)); - int a_X2 = ((int) tolua_tonumber(tolua_S,5,0)); - int a_Y2 = ((int) tolua_tonumber(tolua_S,6,0)); - int a_Z2 = ((int) tolua_tonumber(tolua_S,7,0)); - { - cCuboid* tolua_ret = (cCuboid*) Mtolua_new((cCuboid)(a_X1,a_Y1,a_Z1,a_X2,a_Y2,a_Z2)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cCuboid"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); - } - } - return 1; -tolua_lerror: - return tolua_AllToLua_cCuboid_new03_local(tolua_S); -} -#endif //#ifndef TOLUA_DISABLE - -/* method: Assign of class cCuboid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_Assign00 -static int tolua_AllToLua_cCuboid_Assign00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cCuboid",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnumber(tolua_S,7,0,&tolua_err) || - !tolua_isnoobj(tolua_S,8,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cCuboid* self = (cCuboid*) tolua_tousertype(tolua_S,1,0); - int a_X1 = ((int) tolua_tonumber(tolua_S,2,0)); - int a_Y1 = ((int) tolua_tonumber(tolua_S,3,0)); - int a_Z1 = ((int) tolua_tonumber(tolua_S,4,0)); - int a_X2 = ((int) tolua_tonumber(tolua_S,5,0)); - int a_Y2 = ((int) tolua_tonumber(tolua_S,6,0)); - int a_Z2 = ((int) tolua_tonumber(tolua_S,7,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Assign'", NULL); -#endif - { - self->Assign(a_X1,a_Y1,a_Z1,a_X2,a_Y2,a_Z2); - } - } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Assign'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: Sort of class cCuboid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_Sort00 -static int tolua_AllToLua_cCuboid_Sort00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cCuboid",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cCuboid* self = (cCuboid*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Sort'", NULL); -#endif - { - self->Sort(); - } - } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Sort'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: DifX of class cCuboid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_DifX00 -static int tolua_AllToLua_cCuboid_DifX00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cCuboid",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cCuboid* self = (const cCuboid*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DifX'", NULL); -#endif - { - int tolua_ret = (int) self->DifX(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'DifX'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: DifY of class cCuboid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_DifY00 -static int tolua_AllToLua_cCuboid_DifY00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cCuboid",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3i",0,&tolua_err)) || + (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3i",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,4,&tolua_err) ) goto tolua_lerror; else -#endif { - const cCuboid* self = (const cCuboid*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DifY'", NULL); -#endif + const Vector3i* a_p1 = ((const Vector3i*) tolua_tousertype(tolua_S,2,0)); + const Vector3i* a_p2 = ((const Vector3i*) tolua_tousertype(tolua_S,3,0)); { - int tolua_ret = (int) self->DifY(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + cCuboid* tolua_ret = (cCuboid*) Mtolua_new((cCuboid)(*a_p1,*a_p2)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"cCuboid"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); } } return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'DifY'.",&tolua_err); - return 0; -#endif +tolua_lerror: + return tolua_AllToLua_cCuboid_new01_local(tolua_S); } #endif //#ifndef TOLUA_DISABLE -/* method: DifZ of class cCuboid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_DifZ00 -static int tolua_AllToLua_cCuboid_DifZ00(lua_State* tolua_S) +/* method: new of class cCuboid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_new03 +static int tolua_AllToLua_cCuboid_new03(lua_State* tolua_S) { -#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cCuboid",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertable(tolua_S,1,"cCuboid",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else -#endif { - const cCuboid* self = (const cCuboid*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DifZ'", NULL); -#endif + int a_X1 = ((int) tolua_tonumber(tolua_S,2,0)); + int a_Y1 = ((int) tolua_tonumber(tolua_S,3,0)); + int a_Z1 = ((int) tolua_tonumber(tolua_S,4,0)); { - int tolua_ret = (int) self->DifZ(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + cCuboid* tolua_ret = (cCuboid*) Mtolua_new((cCuboid)(a_X1,a_Y1,a_Z1)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"cCuboid"); } } return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'DifZ'.",&tolua_err); - return 0; -#endif +tolua_lerror: + return tolua_AllToLua_cCuboid_new02(tolua_S); } #endif //#ifndef TOLUA_DISABLE -/* method: DoesIntersect of class cCuboid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_DoesIntersect00 -static int tolua_AllToLua_cCuboid_DoesIntersect00(lua_State* tolua_S) +/* method: new_local of class cCuboid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_new03_local +static int tolua_AllToLua_cCuboid_new03_local(lua_State* tolua_S) { -#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cCuboid",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cCuboid",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertable(tolua_S,1,"cCuboid",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else -#endif { - const cCuboid* self = (const cCuboid*) tolua_tousertype(tolua_S,1,0); - const cCuboid* a_Other = ((const cCuboid*) tolua_tousertype(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DoesIntersect'", NULL); -#endif + int a_X1 = ((int) tolua_tonumber(tolua_S,2,0)); + int a_Y1 = ((int) tolua_tonumber(tolua_S,3,0)); + int a_Z1 = ((int) tolua_tonumber(tolua_S,4,0)); { - bool tolua_ret = (bool) self->DoesIntersect(*a_Other); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + cCuboid* tolua_ret = (cCuboid*) Mtolua_new((cCuboid)(a_X1,a_Y1,a_Z1)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"cCuboid"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); } } return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'DoesIntersect'.",&tolua_err); - return 0; -#endif +tolua_lerror: + return tolua_AllToLua_cCuboid_new02_local(tolua_S); } #endif //#ifndef TOLUA_DISABLE -/* method: IsInside of class cCuboid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_IsInside00 -static int tolua_AllToLua_cCuboid_IsInside00(lua_State* tolua_S) +/* method: new of class cCuboid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_new04 +static int tolua_AllToLua_cCuboid_new04(lua_State* tolua_S) { -#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cCuboid",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3i",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertable(tolua_S,1,"cCuboid",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnumber(tolua_S,7,0,&tolua_err) || + !tolua_isnoobj(tolua_S,8,&tolua_err) ) goto tolua_lerror; else -#endif { - const cCuboid* self = (const cCuboid*) tolua_tousertype(tolua_S,1,0); - const Vector3i* v = ((const Vector3i*) tolua_tousertype(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInside'", NULL); -#endif + int a_X1 = ((int) tolua_tonumber(tolua_S,2,0)); + int a_Y1 = ((int) tolua_tonumber(tolua_S,3,0)); + int a_Z1 = ((int) tolua_tonumber(tolua_S,4,0)); + int a_X2 = ((int) tolua_tonumber(tolua_S,5,0)); + int a_Y2 = ((int) tolua_tonumber(tolua_S,6,0)); + int a_Z2 = ((int) tolua_tonumber(tolua_S,7,0)); { - bool tolua_ret = (bool) self->IsInside(*v); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + cCuboid* tolua_ret = (cCuboid*) Mtolua_new((cCuboid)(a_X1,a_Y1,a_Z1,a_X2,a_Y2,a_Z2)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"cCuboid"); } } return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsInside'.",&tolua_err); - return 0; -#endif +tolua_lerror: + return tolua_AllToLua_cCuboid_new03(tolua_S); } #endif //#ifndef TOLUA_DISABLE -/* method: IsInside of class cCuboid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_IsInside01 -static int tolua_AllToLua_cCuboid_IsInside01(lua_State* tolua_S) +/* method: new_local of class cCuboid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_new04_local +static int tolua_AllToLua_cCuboid_new04_local(lua_State* tolua_S) { tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cCuboid",0,&tolua_err) || + !tolua_isusertable(tolua_S,1,"cCuboid",0,&tolua_err) || !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnumber(tolua_S,7,0,&tolua_err) || + !tolua_isnoobj(tolua_S,8,&tolua_err) ) goto tolua_lerror; else { - const cCuboid* self = (const cCuboid*) tolua_tousertype(tolua_S,1,0); - int a_X = ((int) tolua_tonumber(tolua_S,2,0)); - int a_Y = ((int) tolua_tonumber(tolua_S,3,0)); - int a_Z = ((int) tolua_tonumber(tolua_S,4,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInside'", NULL); -#endif + int a_X1 = ((int) tolua_tonumber(tolua_S,2,0)); + int a_Y1 = ((int) tolua_tonumber(tolua_S,3,0)); + int a_Z1 = ((int) tolua_tonumber(tolua_S,4,0)); + int a_X2 = ((int) tolua_tonumber(tolua_S,5,0)); + int a_Y2 = ((int) tolua_tonumber(tolua_S,6,0)); + int a_Z2 = ((int) tolua_tonumber(tolua_S,7,0)); { - bool tolua_ret = (bool) self->IsInside(a_X,a_Y,a_Z); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + cCuboid* tolua_ret = (cCuboid*) Mtolua_new((cCuboid)(a_X1,a_Y1,a_Z1,a_X2,a_Y2,a_Z2)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"cCuboid"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); } } return 1; tolua_lerror: - return tolua_AllToLua_cCuboid_IsInside00(tolua_S); + return tolua_AllToLua_cCuboid_new03_local(tolua_S); } #endif //#ifndef TOLUA_DISABLE -/* method: IsInside of class cCuboid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_IsInside02 -static int tolua_AllToLua_cCuboid_IsInside02(lua_State* tolua_S) +/* method: Assign of class cCuboid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_Assign00 +static int tolua_AllToLua_cCuboid_Assign00(lua_State* tolua_S) { +#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cCuboid",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3d",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertype(tolua_S,1,"cCuboid",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnumber(tolua_S,7,0,&tolua_err) || + !tolua_isnoobj(tolua_S,8,&tolua_err) ) goto tolua_lerror; else +#endif { - const cCuboid* self = (const cCuboid*) tolua_tousertype(tolua_S,1,0); - const Vector3d* v = ((const Vector3d*) tolua_tousertype(tolua_S,2,0)); + cCuboid* self = (cCuboid*) tolua_tousertype(tolua_S,1,0); + int a_X1 = ((int) tolua_tonumber(tolua_S,2,0)); + int a_Y1 = ((int) tolua_tonumber(tolua_S,3,0)); + int a_Z1 = ((int) tolua_tonumber(tolua_S,4,0)); + int a_X2 = ((int) tolua_tonumber(tolua_S,5,0)); + int a_Y2 = ((int) tolua_tonumber(tolua_S,6,0)); + int a_Z2 = ((int) tolua_tonumber(tolua_S,7,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInside'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Assign'", NULL); #endif { - bool tolua_ret = (bool) self->IsInside(*v); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + self->Assign(a_X1,a_Y1,a_Z1,a_X2,a_Y2,a_Z2); } } - return 1; -tolua_lerror: - return tolua_AllToLua_cCuboid_IsInside01(tolua_S); + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'Assign'.",&tolua_err); + return 0; +#endif } #endif //#ifndef TOLUA_DISABLE -/* method: IsCompletelyInside of class cCuboid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_IsCompletelyInside00 -static int tolua_AllToLua_cCuboid_IsCompletelyInside00(lua_State* tolua_S) +/* method: Sort of class cCuboid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_Sort00 +static int tolua_AllToLua_cCuboid_Sort00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cCuboid",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cCuboid",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertype(tolua_S,1,"cCuboid",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - const cCuboid* self = (const cCuboid*) tolua_tousertype(tolua_S,1,0); - const cCuboid* a_Outer = ((const cCuboid*) tolua_tousertype(tolua_S,2,0)); + cCuboid* self = (cCuboid*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsCompletelyInside'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Sort'", NULL); #endif { - bool tolua_ret = (bool) self->IsCompletelyInside(*a_Outer); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + self->Sort(); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsCompletelyInside'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'Sort'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: Move of class cCuboid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_Move00 -static int tolua_AllToLua_cCuboid_Move00(lua_State* tolua_S) +/* method: DifX of class cCuboid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_DifX00 +static int tolua_AllToLua_cCuboid_DifX00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cCuboid",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cCuboid",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cCuboid* self = (cCuboid*) tolua_tousertype(tolua_S,1,0); - int a_OfsX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_OfsY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_OfsZ = ((int) tolua_tonumber(tolua_S,4,0)); + const cCuboid* self = (const cCuboid*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Move'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DifX'", NULL); #endif { - self->Move(a_OfsX,a_OfsY,a_OfsZ); + int tolua_ret = (int) self->DifX(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Move'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'DifX'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: IsSorted of class cCuboid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_IsSorted00 -static int tolua_AllToLua_cCuboid_IsSorted00(lua_State* tolua_S) +/* method: DifY of class cCuboid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_DifY00 +static int tolua_AllToLua_cCuboid_DifY00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; @@ -21142,1102 +19030,994 @@ static int tolua_AllToLua_cCuboid_IsSorted00(lua_State* tolua_S) { const cCuboid* self = (const cCuboid*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsSorted'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DifY'", NULL); #endif { - bool tolua_ret = (bool) self->IsSorted(); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + int tolua_ret = (int) self->DifY(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsSorted'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'DifY'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: new of class cTracer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cTracer_new00 -static int tolua_AllToLua_cTracer_new00(lua_State* tolua_S) +/* method: DifZ of class cCuboid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_DifZ00 +static int tolua_AllToLua_cCuboid_DifZ00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertable(tolua_S,1,"cTracer",0,&tolua_err) || - !tolua_isusertype(tolua_S,2,"cWorld",0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cCuboid",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cWorld* a_World = ((cWorld*) tolua_tousertype(tolua_S,2,0)); + const cCuboid* self = (const cCuboid*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DifZ'", NULL); +#endif { - cTracer* tolua_ret = (cTracer*) Mtolua_new((cTracer)(a_World)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cTracer"); + int tolua_ret = (int) self->DifZ(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'DifZ'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: new_local of class cTracer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cTracer_new00_local -static int tolua_AllToLua_cTracer_new00_local(lua_State* tolua_S) +/* method: DoesIntersect of class cCuboid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_DoesIntersect00 +static int tolua_AllToLua_cCuboid_DoesIntersect00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertable(tolua_S,1,"cTracer",0,&tolua_err) || - !tolua_isusertype(tolua_S,2,"cWorld",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"const cCuboid",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cCuboid",0,&tolua_err)) || !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - cWorld* a_World = ((cWorld*) tolua_tousertype(tolua_S,2,0)); + const cCuboid* self = (const cCuboid*) tolua_tousertype(tolua_S,1,0); + const cCuboid* a_Other = ((const cCuboid*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DoesIntersect'", NULL); +#endif { - cTracer* tolua_ret = (cTracer*) Mtolua_new((cTracer)(a_World)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cTracer"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + bool tolua_ret = (bool) self->DoesIntersect(*a_Other); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'DoesIntersect'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: delete of class cTracer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cTracer_delete00 -static int tolua_AllToLua_cTracer_delete00(lua_State* tolua_S) +/* method: IsInside of class cCuboid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_IsInside00 +static int tolua_AllToLua_cCuboid_IsInside00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cTracer",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cCuboid",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3i",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - cTracer* self = (cTracer*) tolua_tousertype(tolua_S,1,0); + const cCuboid* self = (const cCuboid*) tolua_tousertype(tolua_S,1,0); + const Vector3i* v = ((const Vector3i*) tolua_tousertype(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'delete'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInside'", NULL); #endif - Mtolua_delete(self); + { + bool tolua_ret = (bool) self->IsInside(*v); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'delete'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'IsInside'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: Trace of class cTracer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cTracer_Trace00 -static int tolua_AllToLua_cTracer_Trace00(lua_State* tolua_S) +/* method: IsInside of class cCuboid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_IsInside01 +static int tolua_AllToLua_cCuboid_IsInside01(lua_State* tolua_S) { -#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cTracer",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3f",0,&tolua_err)) || - (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3f",0,&tolua_err)) || + !tolua_isusertype(tolua_S,1,"const cCuboid",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || !tolua_isnumber(tolua_S,4,0,&tolua_err) || !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else -#endif { - cTracer* self = (cTracer*) tolua_tousertype(tolua_S,1,0); - const Vector3f* a_Start = ((const Vector3f*) tolua_tousertype(tolua_S,2,0)); - const Vector3f* a_Direction = ((const Vector3f*) tolua_tousertype(tolua_S,3,0)); - int a_Distance = ((int) tolua_tonumber(tolua_S,4,0)); + const cCuboid* self = (const cCuboid*) tolua_tousertype(tolua_S,1,0); + int a_X = ((int) tolua_tonumber(tolua_S,2,0)); + int a_Y = ((int) tolua_tonumber(tolua_S,3,0)); + int a_Z = ((int) tolua_tonumber(tolua_S,4,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Trace'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInside'", NULL); #endif { - int tolua_ret = (int) self->Trace(*a_Start,*a_Direction,a_Distance); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + bool tolua_ret = (bool) self->IsInside(a_X,a_Y,a_Z); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Trace'.",&tolua_err); - return 0; -#endif +tolua_lerror: + return tolua_AllToLua_cCuboid_IsInside00(tolua_S); } #endif //#ifndef TOLUA_DISABLE -/* method: SetValues of class cTracer */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cTracer_SetValues00 -static int tolua_AllToLua_cTracer_SetValues00(lua_State* tolua_S) +/* method: IsInside of class cCuboid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_IsInside02 +static int tolua_AllToLua_cCuboid_IsInside02(lua_State* tolua_S) { -#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cTracer",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3f",0,&tolua_err)) || - (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3f",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,4,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cCuboid",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3d",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else -#endif { - cTracer* self = (cTracer*) tolua_tousertype(tolua_S,1,0); - const Vector3f* a_Start = ((const Vector3f*) tolua_tousertype(tolua_S,2,0)); - const Vector3f* a_Direction = ((const Vector3f*) tolua_tousertype(tolua_S,3,0)); + const cCuboid* self = (const cCuboid*) tolua_tousertype(tolua_S,1,0); + const Vector3d* v = ((const Vector3d*) tolua_tousertype(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetValues'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInside'", NULL); #endif { - self->SetValues(*a_Start,*a_Direction); + bool tolua_ret = (bool) self->IsInside(*v); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetValues'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* get function: BlockHitPosition of class cTracer */ -#ifndef TOLUA_DISABLE_tolua_get_cTracer_BlockHitPosition -static int tolua_get_cTracer_BlockHitPosition(lua_State* tolua_S) -{ - cTracer* self = (cTracer*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'BlockHitPosition'",NULL); -#endif - tolua_pushusertype(tolua_S,(void*)&self->BlockHitPosition,"Vector3f"); return 1; +tolua_lerror: + return tolua_AllToLua_cCuboid_IsInside01(tolua_S); } #endif //#ifndef TOLUA_DISABLE -/* set function: BlockHitPosition of class cTracer */ -#ifndef TOLUA_DISABLE_tolua_set_cTracer_BlockHitPosition -static int tolua_set_cTracer_BlockHitPosition(lua_State* tolua_S) +/* method: IsCompletelyInside of class cCuboid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_IsCompletelyInside00 +static int tolua_AllToLua_cCuboid_IsCompletelyInside00(lua_State* tolua_S) { - cTracer* self = (cTracer*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'BlockHitPosition'",NULL); - if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3f",0,&tolua_err))) - tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const cCuboid",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cCuboid",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else #endif - self->BlockHitPosition = *((Vector3f*) tolua_tousertype(tolua_S,2,0)) -; - return 0; -} -#endif //#ifndef TOLUA_DISABLE - -/* get function: HitNormal of class cTracer */ -#ifndef TOLUA_DISABLE_tolua_get_cTracer_HitNormal -static int tolua_get_cTracer_HitNormal(lua_State* tolua_S) -{ - cTracer* self = (cTracer*) tolua_tousertype(tolua_S,1,0); + { + const cCuboid* self = (const cCuboid*) tolua_tousertype(tolua_S,1,0); + const cCuboid* a_Outer = ((const cCuboid*) tolua_tousertype(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'HitNormal'",NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsCompletelyInside'", NULL); #endif - tolua_pushusertype(tolua_S,(void*)&self->HitNormal,"Vector3f"); + { + bool tolua_ret = (bool) self->IsCompletelyInside(*a_Outer); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } return 1; -} -#endif //#ifndef TOLUA_DISABLE - -/* set function: HitNormal of class cTracer */ -#ifndef TOLUA_DISABLE_tolua_set_cTracer_HitNormal -static int tolua_set_cTracer_HitNormal(lua_State* tolua_S) -{ - cTracer* self = (cTracer*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'HitNormal'",NULL); - if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3f",0,&tolua_err))) - tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); -#endif - self->HitNormal = *((Vector3f*) tolua_tousertype(tolua_S,2,0)) -; + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'IsCompletelyInside'.",&tolua_err); return 0; -} -#endif //#ifndef TOLUA_DISABLE - -/* get function: RealHit of class cTracer */ -#ifndef TOLUA_DISABLE_tolua_get_cTracer_RealHit -static int tolua_get_cTracer_RealHit(lua_State* tolua_S) -{ - cTracer* self = (cTracer*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'RealHit'",NULL); -#endif - tolua_pushusertype(tolua_S,(void*)&self->RealHit,"Vector3f"); - return 1; -} -#endif //#ifndef TOLUA_DISABLE - -/* set function: RealHit of class cTracer */ -#ifndef TOLUA_DISABLE_tolua_set_cTracer_RealHit -static int tolua_set_cTracer_RealHit(lua_State* tolua_S) -{ - cTracer* self = (cTracer*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'RealHit'",NULL); - if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3f",0,&tolua_err))) - tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); #endif - self->RealHit = *((Vector3f*) tolua_tousertype(tolua_S,2,0)) -; - return 0; } #endif //#ifndef TOLUA_DISABLE -/* method: SetName of class cGroup */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cGroup_SetName00 -static int tolua_AllToLua_cGroup_SetName00(lua_State* tolua_S) +/* method: Move of class cCuboid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_Move00 +static int tolua_AllToLua_cCuboid_Move00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cGroup",0,&tolua_err) || - !tolua_iscppstring(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertype(tolua_S,1,"cCuboid",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else #endif { - cGroup* self = (cGroup*) tolua_tousertype(tolua_S,1,0); - std::string a_Name = ((std::string) tolua_tocppstring(tolua_S,2,0)); + cCuboid* self = (cCuboid*) tolua_tousertype(tolua_S,1,0); + int a_OfsX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_OfsY = ((int) tolua_tonumber(tolua_S,3,0)); + int a_OfsZ = ((int) tolua_tonumber(tolua_S,4,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetName'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Move'", NULL); #endif { - self->SetName(a_Name); + self->Move(a_OfsX,a_OfsY,a_OfsZ); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetName'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'Move'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetName of class cGroup */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cGroup_GetName00 -static int tolua_AllToLua_cGroup_GetName00(lua_State* tolua_S) +/* method: IsSorted of class cCuboid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCuboid_IsSorted00 +static int tolua_AllToLua_cCuboid_IsSorted00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cGroup",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"const cCuboid",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - const cGroup* self = (const cGroup*) tolua_tousertype(tolua_S,1,0); + const cCuboid* self = (const cCuboid*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetName'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsSorted'", NULL); #endif { - const std::string tolua_ret = (const std::string) self->GetName(); - tolua_pushcppstring(tolua_S,(const char*)tolua_ret); + bool tolua_ret = (bool) self->IsSorted(); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetName'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'IsSorted'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetColor of class cGroup */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cGroup_SetColor00 -static int tolua_AllToLua_cGroup_SetColor00(lua_State* tolua_S) +/* method: new of class cTracer */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cTracer_new00 +static int tolua_AllToLua_cTracer_new00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cGroup",0,&tolua_err) || - !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isusertable(tolua_S,1,"cTracer",0,&tolua_err) || + !tolua_isusertype(tolua_S,2,"cWorld",0,&tolua_err) || !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - cGroup* self = (cGroup*) tolua_tousertype(tolua_S,1,0); - std::string a_Color = ((std::string) tolua_tocppstring(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetColor'", NULL); -#endif + cWorld* a_World = ((cWorld*) tolua_tousertype(tolua_S,2,0)); { - self->SetColor(a_Color); + cTracer* tolua_ret = (cTracer*) Mtolua_new((cTracer)(a_World)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"cTracer"); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetColor'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: AddCommand of class cGroup */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cGroup_AddCommand00 -static int tolua_AllToLua_cGroup_AddCommand00(lua_State* tolua_S) +/* method: new_local of class cTracer */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cTracer_new00_local +static int tolua_AllToLua_cTracer_new00_local(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cGroup",0,&tolua_err) || - !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isusertable(tolua_S,1,"cTracer",0,&tolua_err) || + !tolua_isusertype(tolua_S,2,"cWorld",0,&tolua_err) || !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - cGroup* self = (cGroup*) tolua_tousertype(tolua_S,1,0); - std::string a_Command = ((std::string) tolua_tocppstring(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddCommand'", NULL); -#endif + cWorld* a_World = ((cWorld*) tolua_tousertype(tolua_S,2,0)); { - self->AddCommand(a_Command); + cTracer* tolua_ret = (cTracer*) Mtolua_new((cTracer)(a_World)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"cTracer"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'AddCommand'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: AddPermission of class cGroup */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cGroup_AddPermission00 -static int tolua_AllToLua_cGroup_AddPermission00(lua_State* tolua_S) +/* method: delete of class cTracer */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cTracer_delete00 +static int tolua_AllToLua_cTracer_delete00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cGroup",0,&tolua_err) || - !tolua_iscppstring(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertype(tolua_S,1,"cTracer",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cGroup* self = (cGroup*) tolua_tousertype(tolua_S,1,0); - std::string a_Permission = ((std::string) tolua_tocppstring(tolua_S,2,0)); + cTracer* self = (cTracer*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddPermission'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'delete'", NULL); #endif - { - self->AddPermission(a_Permission); - } + Mtolua_delete(self); } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'AddPermission'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'delete'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: InheritFrom of class cGroup */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cGroup_InheritFrom00 -static int tolua_AllToLua_cGroup_InheritFrom00(lua_State* tolua_S) +/* method: Trace of class cTracer */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cTracer_Trace00 +static int tolua_AllToLua_cTracer_Trace00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cGroup",0,&tolua_err) || - !tolua_isusertype(tolua_S,2,"cGroup",0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertype(tolua_S,1,"cTracer",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3f",0,&tolua_err)) || + (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3f",0,&tolua_err)) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else #endif { - cGroup* self = (cGroup*) tolua_tousertype(tolua_S,1,0); - cGroup* a_Group = ((cGroup*) tolua_tousertype(tolua_S,2,0)); + cTracer* self = (cTracer*) tolua_tousertype(tolua_S,1,0); + const Vector3f* a_Start = ((const Vector3f*) tolua_tousertype(tolua_S,2,0)); + const Vector3f* a_Direction = ((const Vector3f*) tolua_tousertype(tolua_S,3,0)); + int a_Distance = ((int) tolua_tonumber(tolua_S,4,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'InheritFrom'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Trace'", NULL); #endif { - self->InheritFrom(a_Group); + int tolua_ret = (int) self->Trace(*a_Start,*a_Direction,a_Distance); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'InheritFrom'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'Trace'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: HasCommand of class cGroup */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cGroup_HasCommand00 -static int tolua_AllToLua_cGroup_HasCommand00(lua_State* tolua_S) +/* method: SetValues of class cTracer */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cTracer_SetValues00 +static int tolua_AllToLua_cTracer_SetValues00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cGroup",0,&tolua_err) || - !tolua_iscppstring(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertype(tolua_S,1,"cTracer",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3f",0,&tolua_err)) || + (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3f",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,4,&tolua_err) ) goto tolua_lerror; else #endif { - cGroup* self = (cGroup*) tolua_tousertype(tolua_S,1,0); - std::string a_Command = ((std::string) tolua_tocppstring(tolua_S,2,0)); + cTracer* self = (cTracer*) tolua_tousertype(tolua_S,1,0); + const Vector3f* a_Start = ((const Vector3f*) tolua_tousertype(tolua_S,2,0)); + const Vector3f* a_Direction = ((const Vector3f*) tolua_tousertype(tolua_S,3,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HasCommand'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetValues'", NULL); #endif { - bool tolua_ret = (bool) self->HasCommand(a_Command); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + self->SetValues(*a_Start,*a_Direction); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'HasCommand'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetValues'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetColor of class cGroup */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cGroup_GetColor00 -static int tolua_AllToLua_cGroup_GetColor00(lua_State* tolua_S) +/* get function: BlockHitPosition of class cTracer */ +#ifndef TOLUA_DISABLE_tolua_get_cTracer_BlockHitPosition +static int tolua_get_cTracer_BlockHitPosition(lua_State* tolua_S) { + cTracer* self = (cTracer*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cGroup",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cGroup* self = (const cGroup*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetColor'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'BlockHitPosition'",NULL); #endif - { - const AString tolua_ret = (const AString) self->GetColor(); - tolua_pushcppstring(tolua_S,(const char*)tolua_ret); - } - } + tolua_pushusertype(tolua_S,(void*)&self->BlockHitPosition,"Vector3f"); return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: BlockHitPosition of class cTracer */ +#ifndef TOLUA_DISABLE_tolua_set_cTracer_BlockHitPosition +static int tolua_set_cTracer_BlockHitPosition(lua_State* tolua_S) +{ + cTracer* self = (cTracer*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetColor'.",&tolua_err); - return 0; + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'BlockHitPosition'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3f",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); #endif + self->BlockHitPosition = *((Vector3f*) tolua_tousertype(tolua_S,2,0)) +; + return 0; } #endif //#ifndef TOLUA_DISABLE -/* method: new of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_new00 -static int tolua_AllToLua_cBlockArea_new00(lua_State* tolua_S) +/* get function: HitNormal of class cTracer */ +#ifndef TOLUA_DISABLE_tolua_get_cTracer_HitNormal +static int tolua_get_cTracer_HitNormal(lua_State* tolua_S) { + cTracer* self = (cTracer*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'HitNormal'",NULL); #endif - { - { - cBlockArea* tolua_ret = (cBlockArea*) Mtolua_new((cBlockArea)()); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cBlockArea"); - } - } + tolua_pushusertype(tolua_S,(void*)&self->HitNormal,"Vector3f"); return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: HitNormal of class cTracer */ +#ifndef TOLUA_DISABLE_tolua_set_cTracer_HitNormal +static int tolua_set_cTracer_HitNormal(lua_State* tolua_S) +{ + cTracer* self = (cTracer*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'HitNormal'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3f",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->HitNormal = *((Vector3f*) tolua_tousertype(tolua_S,2,0)) +; return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: RealHit of class cTracer */ +#ifndef TOLUA_DISABLE_tolua_get_cTracer_RealHit +static int tolua_get_cTracer_RealHit(lua_State* tolua_S) +{ + cTracer* self = (cTracer*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'RealHit'",NULL); #endif + tolua_pushusertype(tolua_S,(void*)&self->RealHit,"Vector3f"); + return 1; } #endif //#ifndef TOLUA_DISABLE -/* method: new_local of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_new00_local -static int tolua_AllToLua_cBlockArea_new00_local(lua_State* tolua_S) +/* set function: RealHit of class cTracer */ +#ifndef TOLUA_DISABLE_tolua_set_cTracer_RealHit +static int tolua_set_cTracer_RealHit(lua_State* tolua_S) { + cTracer* self = (cTracer*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'RealHit'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3f",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); #endif - { - { - cBlockArea* tolua_ret = (cBlockArea*) Mtolua_new((cBlockArea)()); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cBlockArea"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + self->RealHit = *((Vector3f*) tolua_tousertype(tolua_S,2,0)) +; return 0; -#endif } #endif //#ifndef TOLUA_DISABLE -/* method: delete of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_delete00 -static int tolua_AllToLua_cBlockArea_delete00(lua_State* tolua_S) +/* method: SetName of class cGroup */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cGroup_SetName00 +static int tolua_AllToLua_cGroup_SetName00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"cGroup",0,&tolua_err) || + !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); + cGroup* self = (cGroup*) tolua_tousertype(tolua_S,1,0); + std::string a_Name = ((std::string) tolua_tocppstring(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'delete'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetName'", NULL); #endif - Mtolua_delete(self); + { + self->SetName(a_Name); + } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'delete'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetName'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: Clear of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_Clear00 -static int tolua_AllToLua_cBlockArea_Clear00(lua_State* tolua_S) +/* method: GetName of class cGroup */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cGroup_GetName00 +static int tolua_AllToLua_cGroup_GetName00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"const cGroup",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); + const cGroup* self = (const cGroup*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clear'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetName'", NULL); #endif { - self->Clear(); + const std::string tolua_ret = (const std::string) self->GetName(); + tolua_pushcppstring(tolua_S,(const char*)tolua_ret); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Clear'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetName'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: Create of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_Create00 -static int tolua_AllToLua_cBlockArea_Create00(lua_State* tolua_S) +/* method: SetColor of class cGroup */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cGroup_SetColor00 +static int tolua_AllToLua_cGroup_SetColor00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) + !tolua_isusertype(tolua_S,1,"cGroup",0,&tolua_err) || + !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); - int a_SizeX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_SizeY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_SizeZ = ((int) tolua_tonumber(tolua_S,4,0)); + cGroup* self = (cGroup*) tolua_tousertype(tolua_S,1,0); + std::string a_Color = ((std::string) tolua_tocppstring(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Create'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetColor'", NULL); #endif { - self->Create(a_SizeX,a_SizeY,a_SizeZ); + self->SetColor(a_Color); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Create'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetColor'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: Create of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_Create01 -static int tolua_AllToLua_cBlockArea_Create01(lua_State* tolua_S) +/* method: AddCommand of class cGroup */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cGroup_AddCommand00 +static int tolua_AllToLua_cGroup_AddCommand00(lua_State* tolua_S) { +#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnoobj(tolua_S,6,&tolua_err) + !tolua_isusertype(tolua_S,1,"cGroup",0,&tolua_err) || + !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else +#endif { - cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); - int a_SizeX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_SizeY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_SizeZ = ((int) tolua_tonumber(tolua_S,4,0)); - int a_DataTypes = ((int) tolua_tonumber(tolua_S,5,0)); + cGroup* self = (cGroup*) tolua_tousertype(tolua_S,1,0); + std::string a_Command = ((std::string) tolua_tocppstring(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Create'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddCommand'", NULL); #endif { - self->Create(a_SizeX,a_SizeY,a_SizeZ,a_DataTypes); + self->AddCommand(a_Command); } } return 0; -tolua_lerror: - return tolua_AllToLua_cBlockArea_Create00(tolua_S); +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'AddCommand'.",&tolua_err); + return 0; +#endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetOrigin of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_SetOrigin00 -static int tolua_AllToLua_cBlockArea_SetOrigin00(lua_State* tolua_S) +/* method: AddPermission of class cGroup */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cGroup_AddPermission00 +static int tolua_AllToLua_cGroup_AddPermission00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) + !tolua_isusertype(tolua_S,1,"cGroup",0,&tolua_err) || + !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); - int a_OriginX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_OriginY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_OriginZ = ((int) tolua_tonumber(tolua_S,4,0)); + cGroup* self = (cGroup*) tolua_tousertype(tolua_S,1,0); + std::string a_Permission = ((std::string) tolua_tocppstring(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetOrigin'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddPermission'", NULL); #endif { - self->SetOrigin(a_OriginX,a_OriginY,a_OriginZ); + self->AddPermission(a_Permission); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetOrigin'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'AddPermission'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: Read of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_Read00 -static int tolua_AllToLua_cBlockArea_Read00(lua_State* tolua_S) +/* method: InheritFrom of class cGroup */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cGroup_InheritFrom00 +static int tolua_AllToLua_cGroup_InheritFrom00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isusertype(tolua_S,2,"cWorld",0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnumber(tolua_S,7,0,&tolua_err) || - !tolua_isnumber(tolua_S,8,0,&tolua_err) || - !tolua_isnoobj(tolua_S,9,&tolua_err) + !tolua_isusertype(tolua_S,1,"cGroup",0,&tolua_err) || + !tolua_isusertype(tolua_S,2,"cGroup",0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); - cWorld* a_World = ((cWorld*) tolua_tousertype(tolua_S,2,0)); - int a_MinBlockX = ((int) tolua_tonumber(tolua_S,3,0)); - int a_MaxBlockX = ((int) tolua_tonumber(tolua_S,4,0)); - int a_MinBlockY = ((int) tolua_tonumber(tolua_S,5,0)); - int a_MaxBlockY = ((int) tolua_tonumber(tolua_S,6,0)); - int a_MinBlockZ = ((int) tolua_tonumber(tolua_S,7,0)); - int a_MaxBlockZ = ((int) tolua_tonumber(tolua_S,8,0)); + cGroup* self = (cGroup*) tolua_tousertype(tolua_S,1,0); + cGroup* a_Group = ((cGroup*) tolua_tousertype(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Read'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'InheritFrom'", NULL); #endif { - bool tolua_ret = (bool) self->Read(a_World,a_MinBlockX,a_MaxBlockX,a_MinBlockY,a_MaxBlockY,a_MinBlockZ,a_MaxBlockZ); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + self->InheritFrom(a_Group); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Read'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'InheritFrom'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: Read of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_Read01 -static int tolua_AllToLua_cBlockArea_Read01(lua_State* tolua_S) +/* method: HasCommand of class cGroup */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cGroup_HasCommand00 +static int tolua_AllToLua_cGroup_HasCommand00(lua_State* tolua_S) { +#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isusertype(tolua_S,2,"cWorld",0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnumber(tolua_S,7,0,&tolua_err) || - !tolua_isnumber(tolua_S,8,0,&tolua_err) || - !tolua_isnumber(tolua_S,9,0,&tolua_err) || - !tolua_isnoobj(tolua_S,10,&tolua_err) + !tolua_isusertype(tolua_S,1,"cGroup",0,&tolua_err) || + !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else +#endif { - cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); - cWorld* a_World = ((cWorld*) tolua_tousertype(tolua_S,2,0)); - int a_MinBlockX = ((int) tolua_tonumber(tolua_S,3,0)); - int a_MaxBlockX = ((int) tolua_tonumber(tolua_S,4,0)); - int a_MinBlockY = ((int) tolua_tonumber(tolua_S,5,0)); - int a_MaxBlockY = ((int) tolua_tonumber(tolua_S,6,0)); - int a_MinBlockZ = ((int) tolua_tonumber(tolua_S,7,0)); - int a_MaxBlockZ = ((int) tolua_tonumber(tolua_S,8,0)); - int a_DataTypes = ((int) tolua_tonumber(tolua_S,9,0)); + cGroup* self = (cGroup*) tolua_tousertype(tolua_S,1,0); + std::string a_Command = ((std::string) tolua_tocppstring(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Read'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HasCommand'", NULL); #endif { - bool tolua_ret = (bool) self->Read(a_World,a_MinBlockX,a_MaxBlockX,a_MinBlockY,a_MaxBlockY,a_MinBlockZ,a_MaxBlockZ,a_DataTypes); + bool tolua_ret = (bool) self->HasCommand(a_Command); tolua_pushboolean(tolua_S,(bool)tolua_ret); } } return 1; -tolua_lerror: - return tolua_AllToLua_cBlockArea_Read00(tolua_S); +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'HasCommand'.",&tolua_err); + return 0; +#endif } #endif //#ifndef TOLUA_DISABLE -/* method: Write of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_Write00 -static int tolua_AllToLua_cBlockArea_Write00(lua_State* tolua_S) +/* method: GetColor of class cGroup */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cGroup_GetColor00 +static int tolua_AllToLua_cGroup_GetColor00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isusertype(tolua_S,2,"cWorld",0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnoobj(tolua_S,6,&tolua_err) + if ( + !tolua_isusertype(tolua_S,1,"const cGroup",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); - cWorld* a_World = ((cWorld*) tolua_tousertype(tolua_S,2,0)); - int a_MinBlockX = ((int) tolua_tonumber(tolua_S,3,0)); - int a_MinBlockY = ((int) tolua_tonumber(tolua_S,4,0)); - int a_MinBlockZ = ((int) tolua_tonumber(tolua_S,5,0)); + const cGroup* self = (const cGroup*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Write'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetColor'", NULL); #endif { - bool tolua_ret = (bool) self->Write(a_World,a_MinBlockX,a_MinBlockY,a_MinBlockZ); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + const AString tolua_ret = (const AString) self->GetColor(); + tolua_pushcppstring(tolua_S,(const char*)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Write'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetColor'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: Write of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_Write01 -static int tolua_AllToLua_cBlockArea_Write01(lua_State* tolua_S) +/* method: new of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_new00 +static int tolua_AllToLua_cBlockArea_new00(lua_State* tolua_S) { +#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isusertype(tolua_S,2,"cWorld",0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnoobj(tolua_S,7,&tolua_err) + !tolua_isusertable(tolua_S,1,"cBlockArea",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else - { - cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); - cWorld* a_World = ((cWorld*) tolua_tousertype(tolua_S,2,0)); - int a_MinBlockX = ((int) tolua_tonumber(tolua_S,3,0)); - int a_MinBlockY = ((int) tolua_tonumber(tolua_S,4,0)); - int a_MinBlockZ = ((int) tolua_tonumber(tolua_S,5,0)); - int a_DataTypes = ((int) tolua_tonumber(tolua_S,6,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Write'", NULL); #endif + { { - bool tolua_ret = (bool) self->Write(a_World,a_MinBlockX,a_MinBlockY,a_MinBlockZ,a_DataTypes); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + cBlockArea* tolua_ret = (cBlockArea*) Mtolua_new((cBlockArea)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"cBlockArea"); } } return 1; -tolua_lerror: - return tolua_AllToLua_cBlockArea_Write00(tolua_S); +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif } #endif //#ifndef TOLUA_DISABLE -/* method: CopyTo of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_CopyTo00 -static int tolua_AllToLua_cBlockArea_CopyTo00(lua_State* tolua_S) +/* method: new_local of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_new00_local +static int tolua_AllToLua_cBlockArea_new00_local(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"cBlockArea",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertable(tolua_S,1,"cBlockArea",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); - cBlockArea* a_Into = ((cBlockArea*) tolua_tousertype(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'CopyTo'", NULL); -#endif { - self->CopyTo(*a_Into); + cBlockArea* tolua_ret = (cBlockArea*) Mtolua_new((cBlockArea)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"cBlockArea"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'CopyTo'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: CopyFrom of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_CopyFrom00 -static int tolua_AllToLua_cBlockArea_CopyFrom00(lua_State* tolua_S) +/* method: delete of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_delete00 +static int tolua_AllToLua_cBlockArea_delete00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cBlockArea",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); - const cBlockArea* a_From = ((const cBlockArea*) tolua_tousertype(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'CopyFrom'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'delete'", NULL); #endif - { - self->CopyFrom(*a_From); - } + Mtolua_delete(self); } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'CopyFrom'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'delete'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: DumpToRawFile of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_DumpToRawFile00 -static int tolua_AllToLua_cBlockArea_DumpToRawFile00(lua_State* tolua_S) +/* method: Clear of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_Clear00 +static int tolua_AllToLua_cBlockArea_Clear00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_iscppstring(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); - const AString a_FileName = ((const AString) tolua_tocppstring(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DumpToRawFile'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clear'", NULL); #endif { - self->DumpToRawFile(a_FileName); - tolua_pushcppstring(tolua_S,(const char*)a_FileName); + self->Clear(); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'DumpToRawFile'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'Clear'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: LoadFromSchematicFile of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_LoadFromSchematicFile00 -static int tolua_AllToLua_cBlockArea_LoadFromSchematicFile00(lua_State* tolua_S) +/* method: Create of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_Create00 +static int tolua_AllToLua_cBlockArea_Create00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_iscppstring(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else #endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); - const AString a_FileName = ((const AString) tolua_tocppstring(tolua_S,2,0)); + int a_SizeX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_SizeY = ((int) tolua_tonumber(tolua_S,3,0)); + int a_SizeZ = ((int) tolua_tonumber(tolua_S,4,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'LoadFromSchematicFile'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Create'", NULL); #endif { - bool tolua_ret = (bool) self->LoadFromSchematicFile(a_FileName); - tolua_pushboolean(tolua_S,(bool)tolua_ret); - tolua_pushcppstring(tolua_S,(const char*)a_FileName); + self->Create(a_SizeX,a_SizeY,a_SizeZ); } } - return 2; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'LoadFromSchematicFile'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'Create'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SaveToSchematicFile of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_SaveToSchematicFile00 -static int tolua_AllToLua_cBlockArea_SaveToSchematicFile00(lua_State* tolua_S) +/* method: Create of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_Create01 +static int tolua_AllToLua_cBlockArea_Create01(lua_State* tolua_S) { -#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_iscppstring(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnoobj(tolua_S,6,&tolua_err) ) goto tolua_lerror; else -#endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); - const AString a_FileName = ((const AString) tolua_tocppstring(tolua_S,2,0)); + int a_SizeX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_SizeY = ((int) tolua_tonumber(tolua_S,3,0)); + int a_SizeZ = ((int) tolua_tonumber(tolua_S,4,0)); + int a_DataTypes = ((int) tolua_tonumber(tolua_S,5,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SaveToSchematicFile'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Create'", NULL); #endif { - bool tolua_ret = (bool) self->SaveToSchematicFile(a_FileName); - tolua_pushboolean(tolua_S,(bool)tolua_ret); - tolua_pushcppstring(tolua_S,(const char*)a_FileName); + self->Create(a_SizeX,a_SizeY,a_SizeZ,a_DataTypes); } } - return 2; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SaveToSchematicFile'.",&tolua_err); return 0; -#endif +tolua_lerror: + return tolua_AllToLua_cBlockArea_Create00(tolua_S); } #endif //#ifndef TOLUA_DISABLE -/* method: Crop of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_Crop00 -static int tolua_AllToLua_cBlockArea_Crop00(lua_State* tolua_S) +/* method: SetOrigin of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_SetOrigin00 +static int tolua_AllToLua_cBlockArea_SetOrigin00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; @@ -22246,1198 +20026,1150 @@ static int tolua_AllToLua_cBlockArea_Crop00(lua_State* tolua_S) !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnumber(tolua_S,7,0,&tolua_err) || - !tolua_isnoobj(tolua_S,8,&tolua_err) + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else #endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); - int a_AddMinX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_SubMaxX = ((int) tolua_tonumber(tolua_S,3,0)); - int a_AddMinY = ((int) tolua_tonumber(tolua_S,4,0)); - int a_SubMaxY = ((int) tolua_tonumber(tolua_S,5,0)); - int a_AddMinZ = ((int) tolua_tonumber(tolua_S,6,0)); - int a_SubMaxZ = ((int) tolua_tonumber(tolua_S,7,0)); + int a_OriginX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_OriginY = ((int) tolua_tonumber(tolua_S,3,0)); + int a_OriginZ = ((int) tolua_tonumber(tolua_S,4,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Crop'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetOrigin'", NULL); #endif { - self->Crop(a_AddMinX,a_SubMaxX,a_AddMinY,a_SubMaxY,a_AddMinZ,a_SubMaxZ); + self->SetOrigin(a_OriginX,a_OriginY,a_OriginZ); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Crop'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetOrigin'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: Expand of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_Expand00 -static int tolua_AllToLua_cBlockArea_Expand00(lua_State* tolua_S) +/* method: Read of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_Read00 +static int tolua_AllToLua_cBlockArea_Read00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isusertype(tolua_S,2,"cWorld",0,&tolua_err) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || !tolua_isnumber(tolua_S,4,0,&tolua_err) || !tolua_isnumber(tolua_S,5,0,&tolua_err) || !tolua_isnumber(tolua_S,6,0,&tolua_err) || !tolua_isnumber(tolua_S,7,0,&tolua_err) || - !tolua_isnoobj(tolua_S,8,&tolua_err) + !tolua_isnumber(tolua_S,8,0,&tolua_err) || + !tolua_isnoobj(tolua_S,9,&tolua_err) ) goto tolua_lerror; else #endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); - int a_SubMinX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_AddMaxX = ((int) tolua_tonumber(tolua_S,3,0)); - int a_SubMinY = ((int) tolua_tonumber(tolua_S,4,0)); - int a_AddMaxY = ((int) tolua_tonumber(tolua_S,5,0)); - int a_SubMinZ = ((int) tolua_tonumber(tolua_S,6,0)); - int a_AddMaxZ = ((int) tolua_tonumber(tolua_S,7,0)); + cWorld* a_World = ((cWorld*) tolua_tousertype(tolua_S,2,0)); + int a_MinBlockX = ((int) tolua_tonumber(tolua_S,3,0)); + int a_MaxBlockX = ((int) tolua_tonumber(tolua_S,4,0)); + int a_MinBlockY = ((int) tolua_tonumber(tolua_S,5,0)); + int a_MaxBlockY = ((int) tolua_tonumber(tolua_S,6,0)); + int a_MinBlockZ = ((int) tolua_tonumber(tolua_S,7,0)); + int a_MaxBlockZ = ((int) tolua_tonumber(tolua_S,8,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Expand'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Read'", NULL); #endif { - self->Expand(a_SubMinX,a_AddMaxX,a_SubMinY,a_AddMaxY,a_SubMinZ,a_AddMaxZ); + bool tolua_ret = (bool) self->Read(a_World,a_MinBlockX,a_MaxBlockX,a_MinBlockY,a_MaxBlockY,a_MinBlockZ,a_MaxBlockZ); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Expand'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'Read'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: Merge of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_Merge00 -static int tolua_AllToLua_cBlockArea_Merge00(lua_State* tolua_S) +/* method: Read of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_Read01 +static int tolua_AllToLua_cBlockArea_Read01(lua_State* tolua_S) { -#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cBlockArea",0,&tolua_err)) || + !tolua_isusertype(tolua_S,2,"cWorld",0,&tolua_err) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || !tolua_isnumber(tolua_S,4,0,&tolua_err) || !tolua_isnumber(tolua_S,5,0,&tolua_err) || !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnoobj(tolua_S,7,&tolua_err) + !tolua_isnumber(tolua_S,7,0,&tolua_err) || + !tolua_isnumber(tolua_S,8,0,&tolua_err) || + !tolua_isnumber(tolua_S,9,0,&tolua_err) || + !tolua_isnoobj(tolua_S,10,&tolua_err) ) goto tolua_lerror; else -#endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); - const cBlockArea* a_Src = ((const cBlockArea*) tolua_tousertype(tolua_S,2,0)); - int a_RelX = ((int) tolua_tonumber(tolua_S,3,0)); - int a_RelY = ((int) tolua_tonumber(tolua_S,4,0)); - int a_RelZ = ((int) tolua_tonumber(tolua_S,5,0)); - cBlockArea::eMergeStrategy a_Strategy = ((cBlockArea::eMergeStrategy) (int) tolua_tonumber(tolua_S,6,0)); + cWorld* a_World = ((cWorld*) tolua_tousertype(tolua_S,2,0)); + int a_MinBlockX = ((int) tolua_tonumber(tolua_S,3,0)); + int a_MaxBlockX = ((int) tolua_tonumber(tolua_S,4,0)); + int a_MinBlockY = ((int) tolua_tonumber(tolua_S,5,0)); + int a_MaxBlockY = ((int) tolua_tonumber(tolua_S,6,0)); + int a_MinBlockZ = ((int) tolua_tonumber(tolua_S,7,0)); + int a_MaxBlockZ = ((int) tolua_tonumber(tolua_S,8,0)); + int a_DataTypes = ((int) tolua_tonumber(tolua_S,9,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Read'", NULL); #endif { - self->Merge(*a_Src,a_RelX,a_RelY,a_RelZ,a_Strategy); + bool tolua_ret = (bool) self->Read(a_World,a_MinBlockX,a_MaxBlockX,a_MinBlockY,a_MaxBlockY,a_MinBlockZ,a_MaxBlockZ,a_DataTypes); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Merge'.",&tolua_err); - return 0; -#endif + return 1; +tolua_lerror: + return tolua_AllToLua_cBlockArea_Read00(tolua_S); } #endif //#ifndef TOLUA_DISABLE -/* method: Fill of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_Fill00 -static int tolua_AllToLua_cBlockArea_Fill00(lua_State* tolua_S) +/* method: Write of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_Write00 +static int tolua_AllToLua_cBlockArea_Write00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isusertype(tolua_S,2,"cWorld",0,&tolua_err) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,1,&tolua_err) || - !tolua_isnumber(tolua_S,5,1,&tolua_err) || - !tolua_isnumber(tolua_S,6,1,&tolua_err) || - !tolua_isnoobj(tolua_S,7,&tolua_err) + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnoobj(tolua_S,6,&tolua_err) ) goto tolua_lerror; else #endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); - int a_DataTypes = ((int) tolua_tonumber(tolua_S,2,0)); - unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,3,0)); - unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,4,0)); - unsigned char a_BlockLight = (( unsigned char) tolua_tonumber(tolua_S,5,0)); - unsigned char a_BlockSkyLight = (( unsigned char) tolua_tonumber(tolua_S,6,0x0f)); + cWorld* a_World = ((cWorld*) tolua_tousertype(tolua_S,2,0)); + int a_MinBlockX = ((int) tolua_tonumber(tolua_S,3,0)); + int a_MinBlockY = ((int) tolua_tonumber(tolua_S,4,0)); + int a_MinBlockZ = ((int) tolua_tonumber(tolua_S,5,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Fill'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Write'", NULL); #endif { - self->Fill(a_DataTypes,a_BlockType,a_BlockMeta,a_BlockLight,a_BlockSkyLight); + bool tolua_ret = (bool) self->Write(a_World,a_MinBlockX,a_MinBlockY,a_MinBlockZ); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Fill'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'Write'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: FillRelCuboid of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_FillRelCuboid00 -static int tolua_AllToLua_cBlockArea_FillRelCuboid00(lua_State* tolua_S) +/* method: Write of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_Write01 +static int tolua_AllToLua_cBlockArea_Write01(lua_State* tolua_S) { -#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isusertype(tolua_S,2,"cWorld",0,&tolua_err) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || !tolua_isnumber(tolua_S,4,0,&tolua_err) || !tolua_isnumber(tolua_S,5,0,&tolua_err) || !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnumber(tolua_S,7,0,&tolua_err) || - !tolua_isnumber(tolua_S,8,0,&tolua_err) || - !tolua_isnumber(tolua_S,9,0,&tolua_err) || - !tolua_isnumber(tolua_S,10,1,&tolua_err) || - !tolua_isnumber(tolua_S,11,1,&tolua_err) || - !tolua_isnumber(tolua_S,12,1,&tolua_err) || - !tolua_isnoobj(tolua_S,13,&tolua_err) + !tolua_isnoobj(tolua_S,7,&tolua_err) ) goto tolua_lerror; else -#endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); - int a_MinRelX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_MaxRelX = ((int) tolua_tonumber(tolua_S,3,0)); - int a_MinRelY = ((int) tolua_tonumber(tolua_S,4,0)); - int a_MaxRelY = ((int) tolua_tonumber(tolua_S,5,0)); - int a_MinRelZ = ((int) tolua_tonumber(tolua_S,6,0)); - int a_MaxRelZ = ((int) tolua_tonumber(tolua_S,7,0)); - int a_DataTypes = ((int) tolua_tonumber(tolua_S,8,0)); - unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,9,0)); - unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,10,0)); - unsigned char a_BlockLight = (( unsigned char) tolua_tonumber(tolua_S,11,0)); - unsigned char a_BlockSkyLight = (( unsigned char) tolua_tonumber(tolua_S,12,0x0f)); + cWorld* a_World = ((cWorld*) tolua_tousertype(tolua_S,2,0)); + int a_MinBlockX = ((int) tolua_tonumber(tolua_S,3,0)); + int a_MinBlockY = ((int) tolua_tonumber(tolua_S,4,0)); + int a_MinBlockZ = ((int) tolua_tonumber(tolua_S,5,0)); + int a_DataTypes = ((int) tolua_tonumber(tolua_S,6,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FillRelCuboid'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Write'", NULL); #endif { - self->FillRelCuboid(a_MinRelX,a_MaxRelX,a_MinRelY,a_MaxRelY,a_MinRelZ,a_MaxRelZ,a_DataTypes,a_BlockType,a_BlockMeta,a_BlockLight,a_BlockSkyLight); + bool tolua_ret = (bool) self->Write(a_World,a_MinBlockX,a_MinBlockY,a_MinBlockZ,a_DataTypes); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'FillRelCuboid'.",&tolua_err); - return 0; -#endif + return 1; +tolua_lerror: + return tolua_AllToLua_cBlockArea_Write00(tolua_S); } #endif //#ifndef TOLUA_DISABLE -/* method: RelLine of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_RelLine00 -static int tolua_AllToLua_cBlockArea_RelLine00(lua_State* tolua_S) +/* method: CopyTo of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_CopyTo00 +static int tolua_AllToLua_cBlockArea_CopyTo00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnumber(tolua_S,7,0,&tolua_err) || - !tolua_isnumber(tolua_S,8,0,&tolua_err) || - !tolua_isnumber(tolua_S,9,0,&tolua_err) || - !tolua_isnumber(tolua_S,10,1,&tolua_err) || - !tolua_isnumber(tolua_S,11,1,&tolua_err) || - !tolua_isnumber(tolua_S,12,1,&tolua_err) || - !tolua_isnoobj(tolua_S,13,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"cBlockArea",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); - int a_RelX1 = ((int) tolua_tonumber(tolua_S,2,0)); - int a_RelY1 = ((int) tolua_tonumber(tolua_S,3,0)); - int a_RelZ1 = ((int) tolua_tonumber(tolua_S,4,0)); - int a_RelX2 = ((int) tolua_tonumber(tolua_S,5,0)); - int a_RelY2 = ((int) tolua_tonumber(tolua_S,6,0)); - int a_RelZ2 = ((int) tolua_tonumber(tolua_S,7,0)); - int a_DataTypes = ((int) tolua_tonumber(tolua_S,8,0)); - unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,9,0)); - unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,10,0)); - unsigned char a_BlockLight = (( unsigned char) tolua_tonumber(tolua_S,11,0)); - unsigned char a_BlockSkyLight = (( unsigned char) tolua_tonumber(tolua_S,12,0x0f)); + const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); + cBlockArea* a_Into = ((cBlockArea*) tolua_tousertype(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RelLine'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'CopyTo'", NULL); #endif { - self->RelLine(a_RelX1,a_RelY1,a_RelZ1,a_RelX2,a_RelY2,a_RelZ2,a_DataTypes,a_BlockType,a_BlockMeta,a_BlockLight,a_BlockSkyLight); + self->CopyTo(*a_Into); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'RelLine'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'CopyTo'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: RotateCCW of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_RotateCCW00 -static int tolua_AllToLua_cBlockArea_RotateCCW00(lua_State* tolua_S) +/* method: CopyFrom of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_CopyFrom00 +static int tolua_AllToLua_cBlockArea_CopyFrom00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cBlockArea",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); + const cBlockArea* a_From = ((const cBlockArea*) tolua_tousertype(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RotateCCW'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'CopyFrom'", NULL); #endif { - self->RotateCCW(); + self->CopyFrom(*a_From); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'RotateCCW'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'CopyFrom'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: RotateCW of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_RotateCW00 -static int tolua_AllToLua_cBlockArea_RotateCW00(lua_State* tolua_S) +/* method: DumpToRawFile of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_DumpToRawFile00 +static int tolua_AllToLua_cBlockArea_DumpToRawFile00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); + const AString a_FileName = ((const AString) tolua_tocppstring(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RotateCW'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DumpToRawFile'", NULL); #endif { - self->RotateCW(); + self->DumpToRawFile(a_FileName); + tolua_pushcppstring(tolua_S,(const char*)a_FileName); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'RotateCW'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'DumpToRawFile'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: MirrorXY of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_MirrorXY00 -static int tolua_AllToLua_cBlockArea_MirrorXY00(lua_State* tolua_S) +/* method: LoadFromSchematicFile of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_LoadFromSchematicFile00 +static int tolua_AllToLua_cBlockArea_LoadFromSchematicFile00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); + const AString a_FileName = ((const AString) tolua_tocppstring(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'MirrorXY'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'LoadFromSchematicFile'", NULL); #endif { - self->MirrorXY(); + bool tolua_ret = (bool) self->LoadFromSchematicFile(a_FileName); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + tolua_pushcppstring(tolua_S,(const char*)a_FileName); } } - return 0; + return 2; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'MirrorXY'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'LoadFromSchematicFile'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: MirrorXZ of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_MirrorXZ00 -static int tolua_AllToLua_cBlockArea_MirrorXZ00(lua_State* tolua_S) +/* method: SaveToSchematicFile of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_SaveToSchematicFile00 +static int tolua_AllToLua_cBlockArea_SaveToSchematicFile00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); + const AString a_FileName = ((const AString) tolua_tocppstring(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'MirrorXZ'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SaveToSchematicFile'", NULL); #endif { - self->MirrorXZ(); + bool tolua_ret = (bool) self->SaveToSchematicFile(a_FileName); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + tolua_pushcppstring(tolua_S,(const char*)a_FileName); } } - return 0; + return 2; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'MirrorXZ'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SaveToSchematicFile'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: MirrorYZ of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_MirrorYZ00 -static int tolua_AllToLua_cBlockArea_MirrorYZ00(lua_State* tolua_S) +/* method: Crop of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_Crop00 +static int tolua_AllToLua_cBlockArea_Crop00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnumber(tolua_S,7,0,&tolua_err) || + !tolua_isnoobj(tolua_S,8,&tolua_err) ) goto tolua_lerror; else #endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); + int a_AddMinX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_SubMaxX = ((int) tolua_tonumber(tolua_S,3,0)); + int a_AddMinY = ((int) tolua_tonumber(tolua_S,4,0)); + int a_SubMaxY = ((int) tolua_tonumber(tolua_S,5,0)); + int a_AddMinZ = ((int) tolua_tonumber(tolua_S,6,0)); + int a_SubMaxZ = ((int) tolua_tonumber(tolua_S,7,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'MirrorYZ'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Crop'", NULL); #endif { - self->MirrorYZ(); + self->Crop(a_AddMinX,a_SubMaxX,a_AddMinY,a_SubMaxY,a_AddMinZ,a_SubMaxZ); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'MirrorYZ'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'Crop'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: RotateCCWNoMeta of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_RotateCCWNoMeta00 -static int tolua_AllToLua_cBlockArea_RotateCCWNoMeta00(lua_State* tolua_S) +/* method: Expand of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_Expand00 +static int tolua_AllToLua_cBlockArea_Expand00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnumber(tolua_S,7,0,&tolua_err) || + !tolua_isnoobj(tolua_S,8,&tolua_err) ) goto tolua_lerror; else #endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); + int a_SubMinX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_AddMaxX = ((int) tolua_tonumber(tolua_S,3,0)); + int a_SubMinY = ((int) tolua_tonumber(tolua_S,4,0)); + int a_AddMaxY = ((int) tolua_tonumber(tolua_S,5,0)); + int a_SubMinZ = ((int) tolua_tonumber(tolua_S,6,0)); + int a_AddMaxZ = ((int) tolua_tonumber(tolua_S,7,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RotateCCWNoMeta'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Expand'", NULL); #endif { - self->RotateCCWNoMeta(); + self->Expand(a_SubMinX,a_AddMaxX,a_SubMinY,a_AddMaxY,a_SubMinZ,a_AddMaxZ); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'RotateCCWNoMeta'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'Expand'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: RotateCWNoMeta of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_RotateCWNoMeta00 -static int tolua_AllToLua_cBlockArea_RotateCWNoMeta00(lua_State* tolua_S) +/* method: Merge of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_Merge00 +static int tolua_AllToLua_cBlockArea_Merge00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cBlockArea",0,&tolua_err)) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnoobj(tolua_S,7,&tolua_err) ) goto tolua_lerror; else #endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); + const cBlockArea* a_Src = ((const cBlockArea*) tolua_tousertype(tolua_S,2,0)); + int a_RelX = ((int) tolua_tonumber(tolua_S,3,0)); + int a_RelY = ((int) tolua_tonumber(tolua_S,4,0)); + int a_RelZ = ((int) tolua_tonumber(tolua_S,5,0)); + cBlockArea::eMergeStrategy a_Strategy = ((cBlockArea::eMergeStrategy) (int) tolua_tonumber(tolua_S,6,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RotateCWNoMeta'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL); #endif { - self->RotateCWNoMeta(); + self->Merge(*a_Src,a_RelX,a_RelY,a_RelZ,a_Strategy); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'RotateCWNoMeta'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'Merge'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: MirrorXYNoMeta of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_MirrorXYNoMeta00 -static int tolua_AllToLua_cBlockArea_MirrorXYNoMeta00(lua_State* tolua_S) +/* method: Fill of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_Fill00 +static int tolua_AllToLua_cBlockArea_Fill00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,1,&tolua_err) || + !tolua_isnumber(tolua_S,5,1,&tolua_err) || + !tolua_isnumber(tolua_S,6,1,&tolua_err) || + !tolua_isnoobj(tolua_S,7,&tolua_err) ) goto tolua_lerror; else #endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); + int a_DataTypes = ((int) tolua_tonumber(tolua_S,2,0)); + unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,3,0)); + unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,4,0)); + unsigned char a_BlockLight = (( unsigned char) tolua_tonumber(tolua_S,5,0)); + unsigned char a_BlockSkyLight = (( unsigned char) tolua_tonumber(tolua_S,6,0x0f)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'MirrorXYNoMeta'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Fill'", NULL); #endif { - self->MirrorXYNoMeta(); + self->Fill(a_DataTypes,a_BlockType,a_BlockMeta,a_BlockLight,a_BlockSkyLight); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'MirrorXYNoMeta'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'Fill'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: MirrorXZNoMeta of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_MirrorXZNoMeta00 -static int tolua_AllToLua_cBlockArea_MirrorXZNoMeta00(lua_State* tolua_S) +/* method: FillRelCuboid of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_FillRelCuboid00 +static int tolua_AllToLua_cBlockArea_FillRelCuboid00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnumber(tolua_S,7,0,&tolua_err) || + !tolua_isnumber(tolua_S,8,0,&tolua_err) || + !tolua_isnumber(tolua_S,9,0,&tolua_err) || + !tolua_isnumber(tolua_S,10,1,&tolua_err) || + !tolua_isnumber(tolua_S,11,1,&tolua_err) || + !tolua_isnumber(tolua_S,12,1,&tolua_err) || + !tolua_isnoobj(tolua_S,13,&tolua_err) ) goto tolua_lerror; else #endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); + int a_MinRelX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_MaxRelX = ((int) tolua_tonumber(tolua_S,3,0)); + int a_MinRelY = ((int) tolua_tonumber(tolua_S,4,0)); + int a_MaxRelY = ((int) tolua_tonumber(tolua_S,5,0)); + int a_MinRelZ = ((int) tolua_tonumber(tolua_S,6,0)); + int a_MaxRelZ = ((int) tolua_tonumber(tolua_S,7,0)); + int a_DataTypes = ((int) tolua_tonumber(tolua_S,8,0)); + unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,9,0)); + unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,10,0)); + unsigned char a_BlockLight = (( unsigned char) tolua_tonumber(tolua_S,11,0)); + unsigned char a_BlockSkyLight = (( unsigned char) tolua_tonumber(tolua_S,12,0x0f)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'MirrorXZNoMeta'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FillRelCuboid'", NULL); #endif { - self->MirrorXZNoMeta(); + self->FillRelCuboid(a_MinRelX,a_MaxRelX,a_MinRelY,a_MaxRelY,a_MinRelZ,a_MaxRelZ,a_DataTypes,a_BlockType,a_BlockMeta,a_BlockLight,a_BlockSkyLight); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'MirrorXZNoMeta'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'FillRelCuboid'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: MirrorYZNoMeta of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_MirrorYZNoMeta00 -static int tolua_AllToLua_cBlockArea_MirrorYZNoMeta00(lua_State* tolua_S) +/* method: RelLine of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_RelLine00 +static int tolua_AllToLua_cBlockArea_RelLine00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnumber(tolua_S,7,0,&tolua_err) || + !tolua_isnumber(tolua_S,8,0,&tolua_err) || + !tolua_isnumber(tolua_S,9,0,&tolua_err) || + !tolua_isnumber(tolua_S,10,1,&tolua_err) || + !tolua_isnumber(tolua_S,11,1,&tolua_err) || + !tolua_isnumber(tolua_S,12,1,&tolua_err) || + !tolua_isnoobj(tolua_S,13,&tolua_err) ) goto tolua_lerror; else #endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); + int a_RelX1 = ((int) tolua_tonumber(tolua_S,2,0)); + int a_RelY1 = ((int) tolua_tonumber(tolua_S,3,0)); + int a_RelZ1 = ((int) tolua_tonumber(tolua_S,4,0)); + int a_RelX2 = ((int) tolua_tonumber(tolua_S,5,0)); + int a_RelY2 = ((int) tolua_tonumber(tolua_S,6,0)); + int a_RelZ2 = ((int) tolua_tonumber(tolua_S,7,0)); + int a_DataTypes = ((int) tolua_tonumber(tolua_S,8,0)); + unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,9,0)); + unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,10,0)); + unsigned char a_BlockLight = (( unsigned char) tolua_tonumber(tolua_S,11,0)); + unsigned char a_BlockSkyLight = (( unsigned char) tolua_tonumber(tolua_S,12,0x0f)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'MirrorYZNoMeta'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RelLine'", NULL); #endif { - self->MirrorYZNoMeta(); + self->RelLine(a_RelX1,a_RelY1,a_RelZ1,a_RelX2,a_RelY2,a_RelZ2,a_DataTypes,a_BlockType,a_BlockMeta,a_BlockLight,a_BlockSkyLight); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'MirrorYZNoMeta'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'RelLine'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetRelBlockType of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_SetRelBlockType00 -static int tolua_AllToLua_cBlockArea_SetRelBlockType00(lua_State* tolua_S) +/* method: RotateCCW of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_RotateCCW00 +static int tolua_AllToLua_cBlockArea_RotateCCW00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnoobj(tolua_S,6,&tolua_err) + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); - int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); - unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,5,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetRelBlockType'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RotateCCW'", NULL); #endif { - self->SetRelBlockType(a_RelX,a_RelY,a_RelZ,a_BlockType); + self->RotateCCW(); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetRelBlockType'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'RotateCCW'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetBlockType of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_SetBlockType00 -static int tolua_AllToLua_cBlockArea_SetBlockType00(lua_State* tolua_S) +/* method: RotateCW of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_RotateCW00 +static int tolua_AllToLua_cBlockArea_RotateCW00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnoobj(tolua_S,6,&tolua_err) + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); - int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); - unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,5,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetBlockType'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RotateCW'", NULL); #endif { - self->SetBlockType(a_BlockX,a_BlockY,a_BlockZ,a_BlockType); + self->RotateCW(); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetBlockType'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'RotateCW'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetRelBlockMeta of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_SetRelBlockMeta00 -static int tolua_AllToLua_cBlockArea_SetRelBlockMeta00(lua_State* tolua_S) +/* method: MirrorXY of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_MirrorXY00 +static int tolua_AllToLua_cBlockArea_MirrorXY00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnoobj(tolua_S,6,&tolua_err) + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); - int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); - unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,5,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetRelBlockMeta'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'MirrorXY'", NULL); #endif { - self->SetRelBlockMeta(a_RelX,a_RelY,a_RelZ,a_BlockMeta); + self->MirrorXY(); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetRelBlockMeta'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'MirrorXY'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetBlockMeta of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_SetBlockMeta00 -static int tolua_AllToLua_cBlockArea_SetBlockMeta00(lua_State* tolua_S) +/* method: MirrorXZ of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_MirrorXZ00 +static int tolua_AllToLua_cBlockArea_MirrorXZ00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnoobj(tolua_S,6,&tolua_err) + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); - int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); - unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,5,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetBlockMeta'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'MirrorXZ'", NULL); #endif { - self->SetBlockMeta(a_BlockX,a_BlockY,a_BlockZ,a_BlockMeta); + self->MirrorXZ(); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetBlockMeta'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'MirrorXZ'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetRelBlockLight of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_SetRelBlockLight00 -static int tolua_AllToLua_cBlockArea_SetRelBlockLight00(lua_State* tolua_S) +/* method: MirrorYZ of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_MirrorYZ00 +static int tolua_AllToLua_cBlockArea_MirrorYZ00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnoobj(tolua_S,6,&tolua_err) + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); - int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); - unsigned char a_BlockLight = (( unsigned char) tolua_tonumber(tolua_S,5,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetRelBlockLight'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'MirrorYZ'", NULL); #endif { - self->SetRelBlockLight(a_RelX,a_RelY,a_RelZ,a_BlockLight); + self->MirrorYZ(); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetRelBlockLight'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'MirrorYZ'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetBlockLight of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_SetBlockLight00 -static int tolua_AllToLua_cBlockArea_SetBlockLight00(lua_State* tolua_S) +/* method: RotateCCWNoMeta of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_RotateCCWNoMeta00 +static int tolua_AllToLua_cBlockArea_RotateCCWNoMeta00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnoobj(tolua_S,6,&tolua_err) + if ( + !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); - int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); - unsigned char a_BlockLight = (( unsigned char) tolua_tonumber(tolua_S,5,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetBlockLight'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RotateCCWNoMeta'", NULL); #endif { - self->SetBlockLight(a_BlockX,a_BlockY,a_BlockZ,a_BlockLight); + self->RotateCCWNoMeta(); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetBlockLight'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'RotateCCWNoMeta'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetRelBlockSkyLight of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_SetRelBlockSkyLight00 -static int tolua_AllToLua_cBlockArea_SetRelBlockSkyLight00(lua_State* tolua_S) +/* method: RotateCWNoMeta of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_RotateCWNoMeta00 +static int tolua_AllToLua_cBlockArea_RotateCWNoMeta00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnoobj(tolua_S,6,&tolua_err) + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); - int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); - unsigned char a_BlockSkyLight = (( unsigned char) tolua_tonumber(tolua_S,5,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetRelBlockSkyLight'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RotateCWNoMeta'", NULL); #endif { - self->SetRelBlockSkyLight(a_RelX,a_RelY,a_RelZ,a_BlockSkyLight); + self->RotateCWNoMeta(); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetRelBlockSkyLight'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'RotateCWNoMeta'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetBlockSkyLight of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_SetBlockSkyLight00 -static int tolua_AllToLua_cBlockArea_SetBlockSkyLight00(lua_State* tolua_S) +/* method: MirrorXYNoMeta of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_MirrorXYNoMeta00 +static int tolua_AllToLua_cBlockArea_MirrorXYNoMeta00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnoobj(tolua_S,6,&tolua_err) + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); - int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); - unsigned char a_BlockSkyLight = (( unsigned char) tolua_tonumber(tolua_S,5,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetBlockSkyLight'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'MirrorXYNoMeta'", NULL); #endif { - self->SetBlockSkyLight(a_BlockX,a_BlockY,a_BlockZ,a_BlockSkyLight); + self->MirrorXYNoMeta(); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetBlockSkyLight'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'MirrorXYNoMeta'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetRelBlockType of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetRelBlockType00 -static int tolua_AllToLua_cBlockArea_GetRelBlockType00(lua_State* tolua_S) +/* method: MirrorXZNoMeta of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_MirrorXZNoMeta00 +static int tolua_AllToLua_cBlockArea_MirrorXZNoMeta00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) + !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); - int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); + cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetRelBlockType'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'MirrorXZNoMeta'", NULL); #endif { - unsigned char tolua_ret = ( unsigned char) self->GetRelBlockType(a_RelX,a_RelY,a_RelZ); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + self->MirrorXZNoMeta(); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetRelBlockType'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'MirrorXZNoMeta'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetBlockType of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetBlockType00 -static int tolua_AllToLua_cBlockArea_GetBlockType00(lua_State* tolua_S) +/* method: MirrorYZNoMeta of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_MirrorYZNoMeta00 +static int tolua_AllToLua_cBlockArea_MirrorYZNoMeta00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) + !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); - int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); + cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetBlockType'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'MirrorYZNoMeta'", NULL); #endif { - unsigned char tolua_ret = ( unsigned char) self->GetBlockType(a_BlockX,a_BlockY,a_BlockZ); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + self->MirrorYZNoMeta(); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetBlockType'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'MirrorYZNoMeta'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetRelBlockMeta of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetRelBlockMeta00 -static int tolua_AllToLua_cBlockArea_GetRelBlockMeta00(lua_State* tolua_S) +/* method: SetRelBlockType of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_SetRelBlockType00 +static int tolua_AllToLua_cBlockArea_SetRelBlockType00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnoobj(tolua_S,6,&tolua_err) ) goto tolua_lerror; else #endif { - const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); + cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); + unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,5,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetRelBlockMeta'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetRelBlockType'", NULL); #endif { - unsigned char tolua_ret = ( unsigned char) self->GetRelBlockMeta(a_RelX,a_RelY,a_RelZ); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + self->SetRelBlockType(a_RelX,a_RelY,a_RelZ,a_BlockType); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetRelBlockMeta'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetRelBlockType'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetBlockMeta of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetBlockMeta00 -static int tolua_AllToLua_cBlockArea_GetBlockMeta00(lua_State* tolua_S) +/* method: SetBlockType of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_SetBlockType00 +static int tolua_AllToLua_cBlockArea_SetBlockType00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnoobj(tolua_S,6,&tolua_err) ) goto tolua_lerror; else #endif { - const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); + cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); + unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,5,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetBlockMeta'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetBlockType'", NULL); #endif { - unsigned char tolua_ret = ( unsigned char) self->GetBlockMeta(a_BlockX,a_BlockY,a_BlockZ); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + self->SetBlockType(a_BlockX,a_BlockY,a_BlockZ,a_BlockType); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetBlockMeta'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetBlockType'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetRelBlockLight of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetRelBlockLight00 -static int tolua_AllToLua_cBlockArea_GetRelBlockLight00(lua_State* tolua_S) +/* method: SetRelBlockMeta of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_SetRelBlockMeta00 +static int tolua_AllToLua_cBlockArea_SetRelBlockMeta00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnoobj(tolua_S,6,&tolua_err) ) goto tolua_lerror; else #endif { - const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); + cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); + unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,5,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetRelBlockLight'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetRelBlockMeta'", NULL); #endif { - unsigned char tolua_ret = ( unsigned char) self->GetRelBlockLight(a_RelX,a_RelY,a_RelZ); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + self->SetRelBlockMeta(a_RelX,a_RelY,a_RelZ,a_BlockMeta); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetRelBlockLight'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetRelBlockMeta'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetBlockLight of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetBlockLight00 -static int tolua_AllToLua_cBlockArea_GetBlockLight00(lua_State* tolua_S) +/* method: SetBlockMeta of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_SetBlockMeta00 +static int tolua_AllToLua_cBlockArea_SetBlockMeta00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnoobj(tolua_S,6,&tolua_err) ) goto tolua_lerror; else #endif { - const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); + cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); + unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,5,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetBlockLight'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetBlockMeta'", NULL); #endif { - unsigned char tolua_ret = ( unsigned char) self->GetBlockLight(a_BlockX,a_BlockY,a_BlockZ); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + self->SetBlockMeta(a_BlockX,a_BlockY,a_BlockZ,a_BlockMeta); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetBlockLight'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetBlockMeta'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetRelBlockSkyLight of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetRelBlockSkyLight00 -static int tolua_AllToLua_cBlockArea_GetRelBlockSkyLight00(lua_State* tolua_S) +/* method: SetRelBlockLight of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_SetRelBlockLight00 +static int tolua_AllToLua_cBlockArea_SetRelBlockLight00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnoobj(tolua_S,6,&tolua_err) ) goto tolua_lerror; else #endif { - const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); + cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); + unsigned char a_BlockLight = (( unsigned char) tolua_tonumber(tolua_S,5,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetRelBlockSkyLight'", NULL); -#endif - { - unsigned char tolua_ret = ( unsigned char) self->GetRelBlockSkyLight(a_RelX,a_RelY,a_RelZ); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetRelBlockSkyLight'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetBlockSkyLight of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetBlockSkyLight00 -static int tolua_AllToLua_cBlockArea_GetBlockSkyLight00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); - int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetBlockSkyLight'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetRelBlockLight'", NULL); #endif { - unsigned char tolua_ret = ( unsigned char) self->GetBlockSkyLight(a_BlockX,a_BlockY,a_BlockZ); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + self->SetRelBlockLight(a_RelX,a_RelY,a_RelZ,a_BlockLight); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetBlockSkyLight'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetRelBlockLight'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetBlockTypeMeta of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_SetBlockTypeMeta00 -static int tolua_AllToLua_cBlockArea_SetBlockTypeMeta00(lua_State* tolua_S) +/* method: SetBlockLight of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_SetBlockLight00 +static int tolua_AllToLua_cBlockArea_SetBlockLight00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; @@ -23447,8 +21179,7 @@ static int tolua_AllToLua_cBlockArea_SetBlockTypeMeta00(lua_State* tolua_S) !tolua_isnumber(tolua_S,3,0,&tolua_err) || !tolua_isnumber(tolua_S,4,0,&tolua_err) || !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnoobj(tolua_S,7,&tolua_err) + !tolua_isnoobj(tolua_S,6,&tolua_err) ) goto tolua_lerror; else @@ -23458,27 +21189,26 @@ static int tolua_AllToLua_cBlockArea_SetBlockTypeMeta00(lua_State* tolua_S) int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); - unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,5,0)); - unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,6,0)); + unsigned char a_BlockLight = (( unsigned char) tolua_tonumber(tolua_S,5,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetBlockTypeMeta'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetBlockLight'", NULL); #endif { - self->SetBlockTypeMeta(a_BlockX,a_BlockY,a_BlockZ,a_BlockType,a_BlockMeta); + self->SetBlockLight(a_BlockX,a_BlockY,a_BlockZ,a_BlockLight); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetBlockTypeMeta'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetBlockLight'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetRelBlockTypeMeta of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_SetRelBlockTypeMeta00 -static int tolua_AllToLua_cBlockArea_SetRelBlockTypeMeta00(lua_State* tolua_S) +/* method: SetRelBlockSkyLight of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_SetRelBlockSkyLight00 +static int tolua_AllToLua_cBlockArea_SetRelBlockSkyLight00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; @@ -23488,8 +21218,7 @@ static int tolua_AllToLua_cBlockArea_SetRelBlockTypeMeta00(lua_State* tolua_S) !tolua_isnumber(tolua_S,3,0,&tolua_err) || !tolua_isnumber(tolua_S,4,0,&tolua_err) || !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnoobj(tolua_S,7,&tolua_err) + !tolua_isnoobj(tolua_S,6,&tolua_err) ) goto tolua_lerror; else @@ -23499,70 +21228,65 @@ static int tolua_AllToLua_cBlockArea_SetRelBlockTypeMeta00(lua_State* tolua_S) int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); - unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,5,0)); - unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,6,0)); + unsigned char a_BlockSkyLight = (( unsigned char) tolua_tonumber(tolua_S,5,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetRelBlockTypeMeta'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetRelBlockSkyLight'", NULL); #endif { - self->SetRelBlockTypeMeta(a_RelX,a_RelY,a_RelZ,a_BlockType,a_BlockMeta); + self->SetRelBlockSkyLight(a_RelX,a_RelY,a_RelZ,a_BlockSkyLight); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetRelBlockTypeMeta'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetRelBlockSkyLight'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetBlockTypeMeta of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetBlockTypeMeta00 -static int tolua_AllToLua_cBlockArea_GetBlockTypeMeta00(lua_State* tolua_S) +/* method: SetBlockSkyLight of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_SetBlockSkyLight00 +static int tolua_AllToLua_cBlockArea_SetBlockSkyLight00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || !tolua_isnumber(tolua_S,4,0,&tolua_err) || !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnoobj(tolua_S,7,&tolua_err) + !tolua_isnoobj(tolua_S,6,&tolua_err) ) goto tolua_lerror; else #endif { - const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); + cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); - unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,5,0)); - unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,6,0)); + unsigned char a_BlockSkyLight = (( unsigned char) tolua_tonumber(tolua_S,5,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetBlockTypeMeta'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetBlockSkyLight'", NULL); #endif { - self->GetBlockTypeMeta(a_BlockX,a_BlockY,a_BlockZ,a_BlockType,a_BlockMeta); - tolua_pushnumber(tolua_S,(lua_Number)a_BlockType); - tolua_pushnumber(tolua_S,(lua_Number)a_BlockMeta); + self->SetBlockSkyLight(a_BlockX,a_BlockY,a_BlockZ,a_BlockSkyLight); } } - return 2; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetBlockTypeMeta'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetBlockSkyLight'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetRelBlockTypeMeta of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetRelBlockTypeMeta00 -static int tolua_AllToLua_cBlockArea_GetRelBlockTypeMeta00(lua_State* tolua_S) +/* method: GetRelBlockType of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetRelBlockType00 +static int tolua_AllToLua_cBlockArea_GetRelBlockType00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; @@ -23571,9 +21295,7 @@ static int tolua_AllToLua_cBlockArea_GetRelBlockTypeMeta00(lua_State* tolua_S) !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnoobj(tolua_S,7,&tolua_err) + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else @@ -23583,863 +21305,876 @@ static int tolua_AllToLua_cBlockArea_GetRelBlockTypeMeta00(lua_State* tolua_S) int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); - unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,5,0)); - unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,6,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetRelBlockTypeMeta'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetRelBlockType'", NULL); #endif { - self->GetRelBlockTypeMeta(a_RelX,a_RelY,a_RelZ,a_BlockType,a_BlockMeta); - tolua_pushnumber(tolua_S,(lua_Number)a_BlockType); - tolua_pushnumber(tolua_S,(lua_Number)a_BlockMeta); + unsigned char tolua_ret = ( unsigned char) self->GetRelBlockType(a_RelX,a_RelY,a_RelZ); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } - return 2; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetRelBlockTypeMeta'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetRelBlockType'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetSizeX of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetSizeX00 -static int tolua_AllToLua_cBlockArea_GetSizeX00(lua_State* tolua_S) +/* method: GetBlockType of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetBlockType00 +static int tolua_AllToLua_cBlockArea_GetBlockType00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else #endif { const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); + int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); + int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSizeX'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetBlockType'", NULL); #endif { - int tolua_ret = (int) self->GetSizeX(); + unsigned char tolua_ret = ( unsigned char) self->GetBlockType(a_BlockX,a_BlockY,a_BlockZ); tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetSizeX'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetBlockType'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetSizeY of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetSizeY00 -static int tolua_AllToLua_cBlockArea_GetSizeY00(lua_State* tolua_S) +/* method: GetRelBlockMeta of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetRelBlockMeta00 +static int tolua_AllToLua_cBlockArea_GetRelBlockMeta00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else #endif { const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); + int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); + int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSizeY'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetRelBlockMeta'", NULL); #endif { - int tolua_ret = (int) self->GetSizeY(); + unsigned char tolua_ret = ( unsigned char) self->GetRelBlockMeta(a_RelX,a_RelY,a_RelZ); tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetSizeY'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetRelBlockMeta'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetSizeZ of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetSizeZ00 -static int tolua_AllToLua_cBlockArea_GetSizeZ00(lua_State* tolua_S) +/* method: GetBlockMeta of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetBlockMeta00 +static int tolua_AllToLua_cBlockArea_GetBlockMeta00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else #endif { const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); + int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); + int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSizeZ'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetBlockMeta'", NULL); #endif { - int tolua_ret = (int) self->GetSizeZ(); + unsigned char tolua_ret = ( unsigned char) self->GetBlockMeta(a_BlockX,a_BlockY,a_BlockZ); tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetSizeZ'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetBlockMeta'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetOriginX of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetOriginX00 -static int tolua_AllToLua_cBlockArea_GetOriginX00(lua_State* tolua_S) +/* method: GetRelBlockLight of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetRelBlockLight00 +static int tolua_AllToLua_cBlockArea_GetRelBlockLight00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else #endif { const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); + int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); + int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetOriginX'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetRelBlockLight'", NULL); #endif { - int tolua_ret = (int) self->GetOriginX(); + unsigned char tolua_ret = ( unsigned char) self->GetRelBlockLight(a_RelX,a_RelY,a_RelZ); tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetOriginX'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetRelBlockLight'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetOriginY of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetOriginY00 -static int tolua_AllToLua_cBlockArea_GetOriginY00(lua_State* tolua_S) +/* method: GetBlockLight of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetBlockLight00 +static int tolua_AllToLua_cBlockArea_GetBlockLight00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else #endif { const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); + int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); + int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetOriginY'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetBlockLight'", NULL); #endif { - int tolua_ret = (int) self->GetOriginY(); + unsigned char tolua_ret = ( unsigned char) self->GetBlockLight(a_BlockX,a_BlockY,a_BlockZ); tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetOriginY'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetBlockLight'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetOriginZ of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetOriginZ00 -static int tolua_AllToLua_cBlockArea_GetOriginZ00(lua_State* tolua_S) +/* method: GetRelBlockSkyLight of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetRelBlockSkyLight00 +static int tolua_AllToLua_cBlockArea_GetRelBlockSkyLight00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else #endif { const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); + int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); + int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetOriginZ'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetRelBlockSkyLight'", NULL); #endif { - int tolua_ret = (int) self->GetOriginZ(); + unsigned char tolua_ret = ( unsigned char) self->GetRelBlockSkyLight(a_RelX,a_RelY,a_RelZ); tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetOriginZ'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetRelBlockSkyLight'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetDataTypes of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetDataTypes00 -static int tolua_AllToLua_cBlockArea_GetDataTypes00(lua_State* tolua_S) +/* method: GetBlockSkyLight of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetBlockSkyLight00 +static int tolua_AllToLua_cBlockArea_GetBlockSkyLight00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else #endif { const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); + int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); + int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetDataTypes'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetBlockSkyLight'", NULL); #endif { - int tolua_ret = (int) self->GetDataTypes(); + unsigned char tolua_ret = ( unsigned char) self->GetBlockSkyLight(a_BlockX,a_BlockY,a_BlockZ); tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetDataTypes'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetBlockSkyLight'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: HasBlockTypes of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_HasBlockTypes00 -static int tolua_AllToLua_cBlockArea_HasBlockTypes00(lua_State* tolua_S) +/* method: SetBlockTypeMeta of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_SetBlockTypeMeta00 +static int tolua_AllToLua_cBlockArea_SetBlockTypeMeta00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnoobj(tolua_S,7,&tolua_err) ) goto tolua_lerror; else #endif { - const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); + cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); + int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); + int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); + unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,5,0)); + unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,6,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HasBlockTypes'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetBlockTypeMeta'", NULL); #endif { - bool tolua_ret = (bool) self->HasBlockTypes(); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + self->SetBlockTypeMeta(a_BlockX,a_BlockY,a_BlockZ,a_BlockType,a_BlockMeta); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'HasBlockTypes'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetBlockTypeMeta'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: HasBlockMetas of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_HasBlockMetas00 -static int tolua_AllToLua_cBlockArea_HasBlockMetas00(lua_State* tolua_S) +/* method: SetRelBlockTypeMeta of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_SetRelBlockTypeMeta00 +static int tolua_AllToLua_cBlockArea_SetRelBlockTypeMeta00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"cBlockArea",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnoobj(tolua_S,7,&tolua_err) ) goto tolua_lerror; else #endif { - const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); + cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); + int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); + int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); + unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,5,0)); + unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,6,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HasBlockMetas'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetRelBlockTypeMeta'", NULL); #endif { - bool tolua_ret = (bool) self->HasBlockMetas(); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + self->SetRelBlockTypeMeta(a_RelX,a_RelY,a_RelZ,a_BlockType,a_BlockMeta); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'HasBlockMetas'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetRelBlockTypeMeta'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: HasBlockLights of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_HasBlockLights00 -static int tolua_AllToLua_cBlockArea_HasBlockLights00(lua_State* tolua_S) +/* method: GetBlockTypeMeta of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetBlockTypeMeta00 +static int tolua_AllToLua_cBlockArea_GetBlockTypeMeta00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnoobj(tolua_S,7,&tolua_err) ) goto tolua_lerror; else #endif { const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); + int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); + int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); + unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,5,0)); + unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,6,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HasBlockLights'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetBlockTypeMeta'", NULL); #endif { - bool tolua_ret = (bool) self->HasBlockLights(); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + self->GetBlockTypeMeta(a_BlockX,a_BlockY,a_BlockZ,a_BlockType,a_BlockMeta); + tolua_pushnumber(tolua_S,(lua_Number)a_BlockType); + tolua_pushnumber(tolua_S,(lua_Number)a_BlockMeta); } } - return 1; + return 2; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'HasBlockLights'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetBlockTypeMeta'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: HasBlockSkyLights of class cBlockArea */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_HasBlockSkyLights00 -static int tolua_AllToLua_cBlockArea_HasBlockSkyLights00(lua_State* tolua_S) +/* method: GetRelBlockTypeMeta of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetRelBlockTypeMeta00 +static int tolua_AllToLua_cBlockArea_GetRelBlockTypeMeta00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnoobj(tolua_S,7,&tolua_err) ) goto tolua_lerror; else #endif { const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); + int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); + int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); + unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,5,0)); + unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,6,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HasBlockSkyLights'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetRelBlockTypeMeta'", NULL); #endif { - bool tolua_ret = (bool) self->HasBlockSkyLights(); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + self->GetRelBlockTypeMeta(a_RelX,a_RelY,a_RelZ,a_BlockType,a_BlockMeta); + tolua_pushnumber(tolua_S,(lua_Number)a_BlockType); + tolua_pushnumber(tolua_S,(lua_Number)a_BlockMeta); } } - return 1; + return 2; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'HasBlockSkyLights'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetRelBlockTypeMeta'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetChunkX of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_GetChunkX00 -static int tolua_AllToLua_cChunkDesc_GetChunkX00(lua_State* tolua_S) +/* method: GetSizeX of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetSizeX00 +static int tolua_AllToLua_cBlockArea_GetSizeX00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cChunkDesc",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - const cChunkDesc* self = (const cChunkDesc*) tolua_tousertype(tolua_S,1,0); + const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetChunkX'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSizeX'", NULL); #endif { - int tolua_ret = (int) self->GetChunkX(); + int tolua_ret = (int) self->GetSizeX(); tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetChunkX'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetSizeX'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetChunkZ of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_GetChunkZ00 -static int tolua_AllToLua_cChunkDesc_GetChunkZ00(lua_State* tolua_S) +/* method: GetSizeY of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetSizeY00 +static int tolua_AllToLua_cBlockArea_GetSizeY00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cChunkDesc",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - const cChunkDesc* self = (const cChunkDesc*) tolua_tousertype(tolua_S,1,0); + const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetChunkZ'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSizeY'", NULL); #endif { - int tolua_ret = (int) self->GetChunkZ(); + int tolua_ret = (int) self->GetSizeY(); tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetChunkZ'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetSizeY'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetChunkCoords of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_SetChunkCoords00 -static int tolua_AllToLua_cChunkDesc_SetChunkCoords00(lua_State* tolua_S) +/* method: GetSizeZ of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetSizeZ00 +static int tolua_AllToLua_cBlockArea_GetSizeZ00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - int a_ChunkX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_ChunkZ = ((int) tolua_tonumber(tolua_S,3,0)); + const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetChunkCoords'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSizeZ'", NULL); #endif { - self->SetChunkCoords(a_ChunkX,a_ChunkZ); + int tolua_ret = (int) self->GetSizeZ(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetChunkCoords'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetSizeZ'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: FillBlocks of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_FillBlocks00 -static int tolua_AllToLua_cChunkDesc_FillBlocks00(lua_State* tolua_S) +/* method: GetOriginX of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetOriginX00 +static int tolua_AllToLua_cBlockArea_GetOriginX00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,2,0)); - unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,3,0)); + const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FillBlocks'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetOriginX'", NULL); #endif { - self->FillBlocks(a_BlockType,a_BlockMeta); + int tolua_ret = (int) self->GetOriginX(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'FillBlocks'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetOriginX'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetBlockTypeMeta of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_SetBlockTypeMeta00 -static int tolua_AllToLua_cChunkDesc_SetBlockTypeMeta00(lua_State* tolua_S) +/* method: GetOriginY of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetOriginY00 +static int tolua_AllToLua_cBlockArea_GetOriginY00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnoobj(tolua_S,7,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); - unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,5,0)); - unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,6,0)); + const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetBlockTypeMeta'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetOriginY'", NULL); #endif { - self->SetBlockTypeMeta(a_RelX,a_RelY,a_RelZ,a_BlockType,a_BlockMeta); + int tolua_ret = (int) self->GetOriginY(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetBlockTypeMeta'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetOriginY'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetBlockTypeMeta of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_GetBlockTypeMeta00 -static int tolua_AllToLua_cChunkDesc_GetBlockTypeMeta00(lua_State* tolua_S) +/* method: GetOriginZ of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetOriginZ00 +static int tolua_AllToLua_cBlockArea_GetOriginZ00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnoobj(tolua_S,7,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); - unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,5,0)); - unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,6,0)); + const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetBlockTypeMeta'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetOriginZ'", NULL); #endif { - self->GetBlockTypeMeta(a_RelX,a_RelY,a_RelZ,a_BlockType,a_BlockMeta); - tolua_pushnumber(tolua_S,(lua_Number)a_BlockType); - tolua_pushnumber(tolua_S,(lua_Number)a_BlockMeta); + int tolua_ret = (int) self->GetOriginZ(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } - return 2; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetBlockTypeMeta'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetOriginZ'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetBlockType of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_SetBlockType00 -static int tolua_AllToLua_cChunkDesc_SetBlockType00(lua_State* tolua_S) +/* method: GetDataTypes of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_GetDataTypes00 +static int tolua_AllToLua_cBlockArea_GetDataTypes00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnoobj(tolua_S,6,&tolua_err) + if ( + !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); - unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,5,0)); + const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetBlockType'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetDataTypes'", NULL); #endif { - self->SetBlockType(a_RelX,a_RelY,a_RelZ,a_BlockType); + int tolua_ret = (int) self->GetDataTypes(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetBlockType'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetDataTypes'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetBlockType of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_GetBlockType00 -static int tolua_AllToLua_cChunkDesc_GetBlockType00(lua_State* tolua_S) +/* method: HasBlockTypes of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_HasBlockTypes00 +static int tolua_AllToLua_cBlockArea_HasBlockTypes00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); + const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetBlockType'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HasBlockTypes'", NULL); #endif { - unsigned char tolua_ret = ( unsigned char) self->GetBlockType(a_RelX,a_RelY,a_RelZ); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + bool tolua_ret = (bool) self->HasBlockTypes(); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetBlockType'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'HasBlockTypes'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetBlockMeta of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_SetBlockMeta00 -static int tolua_AllToLua_cChunkDesc_SetBlockMeta00(lua_State* tolua_S) +/* method: HasBlockMetas of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_HasBlockMetas00 +static int tolua_AllToLua_cBlockArea_HasBlockMetas00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnoobj(tolua_S,6,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); - unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,5,0)); + const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetBlockMeta'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HasBlockMetas'", NULL); #endif { - self->SetBlockMeta(a_RelX,a_RelY,a_RelZ,a_BlockMeta); + bool tolua_ret = (bool) self->HasBlockMetas(); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetBlockMeta'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'HasBlockMetas'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetBlockMeta of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_GetBlockMeta00 -static int tolua_AllToLua_cChunkDesc_GetBlockMeta00(lua_State* tolua_S) +/* method: HasBlockLights of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_HasBlockLights00 +static int tolua_AllToLua_cBlockArea_HasBlockLights00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); + const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetBlockMeta'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HasBlockLights'", NULL); #endif { - unsigned char tolua_ret = ( unsigned char) self->GetBlockMeta(a_RelX,a_RelY,a_RelZ); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + bool tolua_ret = (bool) self->HasBlockLights(); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetBlockMeta'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'HasBlockLights'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetBiome of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_SetBiome00 -static int tolua_AllToLua_cChunkDesc_SetBiome00(lua_State* tolua_S) +/* method: HasBlockSkyLights of class cBlockArea */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockArea_HasBlockSkyLights00 +static int tolua_AllToLua_cBlockArea_HasBlockSkyLights00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cBlockArea",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_RelZ = ((int) tolua_tonumber(tolua_S,3,0)); - int a_BiomeID = ((int) tolua_tonumber(tolua_S,4,0)); + const cBlockArea* self = (const cBlockArea*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetBiome'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HasBlockSkyLights'", NULL); #endif { - self->SetBiome(a_RelX,a_RelZ,a_BiomeID); + bool tolua_ret = (bool) self->HasBlockSkyLights(); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetBiome'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'HasBlockSkyLights'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetBiome of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_GetBiome00 -static int tolua_AllToLua_cChunkDesc_GetBiome00(lua_State* tolua_S) +/* method: GetChunkX of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_GetChunkX00 +static int tolua_AllToLua_cChunkDesc_GetChunkX00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cChunkDesc",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_RelZ = ((int) tolua_tonumber(tolua_S,3,0)); + const cChunkDesc* self = (const cChunkDesc*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetBiome'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetChunkX'", NULL); #endif { - EMCSBiome tolua_ret = (EMCSBiome) self->GetBiome(a_RelX,a_RelZ); + int tolua_ret = (int) self->GetChunkX(); tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetBiome'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetChunkX'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetHeight of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_SetHeight00 -static int tolua_AllToLua_cChunkDesc_SetHeight00(lua_State* tolua_S) +/* method: GetChunkZ of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_GetChunkZ00 +static int tolua_AllToLua_cChunkDesc_GetChunkZ00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cChunkDesc",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_RelZ = ((int) tolua_tonumber(tolua_S,3,0)); - int a_Height = ((int) tolua_tonumber(tolua_S,4,0)); + const cChunkDesc* self = (const cChunkDesc*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetHeight'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetChunkZ'", NULL); #endif { - self->SetHeight(a_RelX,a_RelZ,a_Height); + int tolua_ret = (int) self->GetChunkZ(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetHeight'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetChunkZ'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetHeight of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_GetHeight00 -static int tolua_AllToLua_cChunkDesc_GetHeight00(lua_State* tolua_S) +/* method: SetChunkCoords of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_SetChunkCoords00 +static int tolua_AllToLua_cChunkDesc_SetChunkCoords00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; @@ -24454,439 +22189,479 @@ static int tolua_AllToLua_cChunkDesc_GetHeight00(lua_State* tolua_S) #endif { cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_RelZ = ((int) tolua_tonumber(tolua_S,3,0)); + int a_ChunkX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_ChunkZ = ((int) tolua_tonumber(tolua_S,3,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetHeight'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetChunkCoords'", NULL); #endif { - int tolua_ret = (int) self->GetHeight(a_RelX,a_RelZ); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + self->SetChunkCoords(a_ChunkX,a_ChunkZ); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetHeight'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetChunkCoords'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetUseDefaultBiomes of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_SetUseDefaultBiomes00 -static int tolua_AllToLua_cChunkDesc_SetUseDefaultBiomes00(lua_State* tolua_S) +/* method: FillBlocks of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_FillBlocks00 +static int tolua_AllToLua_cChunkDesc_FillBlocks00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || - !tolua_isboolean(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnoobj(tolua_S,4,&tolua_err) ) goto tolua_lerror; else #endif { cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - bool a_bUseDefaultBiomes = ((bool) tolua_toboolean(tolua_S,2,0)); + unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,2,0)); + unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,3,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetUseDefaultBiomes'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FillBlocks'", NULL); #endif { - self->SetUseDefaultBiomes(a_bUseDefaultBiomes); + self->FillBlocks(a_BlockType,a_BlockMeta); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetUseDefaultBiomes'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'FillBlocks'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: IsUsingDefaultBiomes of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_IsUsingDefaultBiomes00 -static int tolua_AllToLua_cChunkDesc_IsUsingDefaultBiomes00(lua_State* tolua_S) +/* method: SetBlockTypeMeta of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_SetBlockTypeMeta00 +static int tolua_AllToLua_cChunkDesc_SetBlockTypeMeta00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cChunkDesc",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnoobj(tolua_S,7,&tolua_err) ) goto tolua_lerror; else #endif { - const cChunkDesc* self = (const cChunkDesc*) tolua_tousertype(tolua_S,1,0); + cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); + int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); + int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); + unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,5,0)); + unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,6,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsUsingDefaultBiomes'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetBlockTypeMeta'", NULL); #endif { - bool tolua_ret = (bool) self->IsUsingDefaultBiomes(); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + self->SetBlockTypeMeta(a_RelX,a_RelY,a_RelZ,a_BlockType,a_BlockMeta); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsUsingDefaultBiomes'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetBlockTypeMeta'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetUseDefaultHeight of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_SetUseDefaultHeight00 -static int tolua_AllToLua_cChunkDesc_SetUseDefaultHeight00(lua_State* tolua_S) +/* method: GetBlockTypeMeta of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_GetBlockTypeMeta00 +static int tolua_AllToLua_cChunkDesc_GetBlockTypeMeta00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || - !tolua_isboolean(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnoobj(tolua_S,7,&tolua_err) ) goto tolua_lerror; else #endif { cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - bool a_bUseDefaultHeight = ((bool) tolua_toboolean(tolua_S,2,0)); + int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); + int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); + unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,5,0)); + unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,6,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetUseDefaultHeight'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetBlockTypeMeta'", NULL); #endif { - self->SetUseDefaultHeight(a_bUseDefaultHeight); + self->GetBlockTypeMeta(a_RelX,a_RelY,a_RelZ,a_BlockType,a_BlockMeta); + tolua_pushnumber(tolua_S,(lua_Number)a_BlockType); + tolua_pushnumber(tolua_S,(lua_Number)a_BlockMeta); } } - return 0; + return 2; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetUseDefaultHeight'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetBlockTypeMeta'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: IsUsingDefaultHeight of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_IsUsingDefaultHeight00 -static int tolua_AllToLua_cChunkDesc_IsUsingDefaultHeight00(lua_State* tolua_S) +/* method: SetBlockType of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_SetBlockType00 +static int tolua_AllToLua_cChunkDesc_SetBlockType00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cChunkDesc",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnoobj(tolua_S,6,&tolua_err) ) goto tolua_lerror; else #endif { - const cChunkDesc* self = (const cChunkDesc*) tolua_tousertype(tolua_S,1,0); + cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); + int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); + int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); + unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,5,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsUsingDefaultHeight'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetBlockType'", NULL); #endif { - bool tolua_ret = (bool) self->IsUsingDefaultHeight(); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + self->SetBlockType(a_RelX,a_RelY,a_RelZ,a_BlockType); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsUsingDefaultHeight'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetBlockType'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetUseDefaultComposition of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_SetUseDefaultComposition00 -static int tolua_AllToLua_cChunkDesc_SetUseDefaultComposition00(lua_State* tolua_S) +/* method: GetBlockType of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_GetBlockType00 +static int tolua_AllToLua_cChunkDesc_GetBlockType00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || - !tolua_isboolean(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else #endif { cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - bool a_bUseDefaultComposition = ((bool) tolua_toboolean(tolua_S,2,0)); + int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); + int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetUseDefaultComposition'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetBlockType'", NULL); #endif { - self->SetUseDefaultComposition(a_bUseDefaultComposition); + unsigned char tolua_ret = ( unsigned char) self->GetBlockType(a_RelX,a_RelY,a_RelZ); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetUseDefaultComposition'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetBlockType'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: IsUsingDefaultComposition of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_IsUsingDefaultComposition00 -static int tolua_AllToLua_cChunkDesc_IsUsingDefaultComposition00(lua_State* tolua_S) +/* method: SetBlockMeta of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_SetBlockMeta00 +static int tolua_AllToLua_cChunkDesc_SetBlockMeta00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cChunkDesc",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnoobj(tolua_S,6,&tolua_err) ) goto tolua_lerror; else #endif { - const cChunkDesc* self = (const cChunkDesc*) tolua_tousertype(tolua_S,1,0); + cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); + int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); + int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); + unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,5,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsUsingDefaultComposition'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetBlockMeta'", NULL); #endif { - bool tolua_ret = (bool) self->IsUsingDefaultComposition(); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + self->SetBlockMeta(a_RelX,a_RelY,a_RelZ,a_BlockMeta); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsUsingDefaultComposition'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetBlockMeta'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetUseDefaultStructures of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_SetUseDefaultStructures00 -static int tolua_AllToLua_cChunkDesc_SetUseDefaultStructures00(lua_State* tolua_S) +/* method: GetBlockMeta of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_GetBlockMeta00 +static int tolua_AllToLua_cChunkDesc_GetBlockMeta00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || - !tolua_isboolean(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else #endif { cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - bool a_bUseDefaultStructures = ((bool) tolua_toboolean(tolua_S,2,0)); + int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_RelY = ((int) tolua_tonumber(tolua_S,3,0)); + int a_RelZ = ((int) tolua_tonumber(tolua_S,4,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetUseDefaultStructures'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetBlockMeta'", NULL); #endif { - self->SetUseDefaultStructures(a_bUseDefaultStructures); + unsigned char tolua_ret = ( unsigned char) self->GetBlockMeta(a_RelX,a_RelY,a_RelZ); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetUseDefaultStructures'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetBlockMeta'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: IsUsingDefaultStructures of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_IsUsingDefaultStructures00 -static int tolua_AllToLua_cChunkDesc_IsUsingDefaultStructures00(lua_State* tolua_S) +/* method: SetBiome of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_SetBiome00 +static int tolua_AllToLua_cChunkDesc_SetBiome00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cChunkDesc",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else #endif { - const cChunkDesc* self = (const cChunkDesc*) tolua_tousertype(tolua_S,1,0); + cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); + int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_RelZ = ((int) tolua_tonumber(tolua_S,3,0)); + int a_BiomeID = ((int) tolua_tonumber(tolua_S,4,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsUsingDefaultStructures'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetBiome'", NULL); #endif { - bool tolua_ret = (bool) self->IsUsingDefaultStructures(); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + self->SetBiome(a_RelX,a_RelZ,a_BiomeID); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsUsingDefaultStructures'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetBiome'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetUseDefaultFinish of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_SetUseDefaultFinish00 -static int tolua_AllToLua_cChunkDesc_SetUseDefaultFinish00(lua_State* tolua_S) +/* method: GetBiome of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_GetBiome00 +static int tolua_AllToLua_cChunkDesc_GetBiome00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || - !tolua_isboolean(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnoobj(tolua_S,4,&tolua_err) ) goto tolua_lerror; else #endif { cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - bool a_bUseDefaultFinish = ((bool) tolua_toboolean(tolua_S,2,0)); + int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_RelZ = ((int) tolua_tonumber(tolua_S,3,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetUseDefaultFinish'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetBiome'", NULL); #endif { - self->SetUseDefaultFinish(a_bUseDefaultFinish); + EMCSBiome tolua_ret = (EMCSBiome) self->GetBiome(a_RelX,a_RelZ); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetUseDefaultFinish'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetBiome'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: IsUsingDefaultFinish of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_IsUsingDefaultFinish00 -static int tolua_AllToLua_cChunkDesc_IsUsingDefaultFinish00(lua_State* tolua_S) +/* method: SetHeight of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_SetHeight00 +static int tolua_AllToLua_cChunkDesc_SetHeight00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cChunkDesc",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else #endif { - const cChunkDesc* self = (const cChunkDesc*) tolua_tousertype(tolua_S,1,0); + cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); + int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_RelZ = ((int) tolua_tonumber(tolua_S,3,0)); + int a_Height = ((int) tolua_tonumber(tolua_S,4,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsUsingDefaultFinish'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetHeight'", NULL); #endif { - bool tolua_ret = (bool) self->IsUsingDefaultFinish(); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + self->SetHeight(a_RelX,a_RelZ,a_Height); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsUsingDefaultFinish'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetHeight'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: WriteBlockArea of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_WriteBlockArea00 -static int tolua_AllToLua_cChunkDesc_WriteBlockArea00(lua_State* tolua_S) +/* method: GetHeight of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_GetHeight00 +static int tolua_AllToLua_cChunkDesc_GetHeight00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cBlockArea",0,&tolua_err)) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,1,&tolua_err) || - !tolua_isnoobj(tolua_S,7,&tolua_err) + !tolua_isnoobj(tolua_S,4,&tolua_err) ) goto tolua_lerror; else #endif { cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - const cBlockArea* a_BlockArea = ((const cBlockArea*) tolua_tousertype(tolua_S,2,0)); - int a_RelX = ((int) tolua_tonumber(tolua_S,3,0)); - int a_RelY = ((int) tolua_tonumber(tolua_S,4,0)); - int a_RelZ = ((int) tolua_tonumber(tolua_S,5,0)); - cBlockArea::eMergeStrategy a_MergeStrategy = ((cBlockArea::eMergeStrategy) (int) tolua_tonumber(tolua_S,6,cBlockArea::msOverwrite)); + int a_RelX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_RelZ = ((int) tolua_tonumber(tolua_S,3,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'WriteBlockArea'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetHeight'", NULL); #endif { - self->WriteBlockArea(*a_BlockArea,a_RelX,a_RelY,a_RelZ,a_MergeStrategy); + int tolua_ret = (int) self->GetHeight(a_RelX,a_RelZ); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'WriteBlockArea'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetHeight'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: ReadBlockArea of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_ReadBlockArea00 -static int tolua_AllToLua_cChunkDesc_ReadBlockArea00(lua_State* tolua_S) +/* method: SetUseDefaultBiomes of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_SetUseDefaultBiomes00 +static int tolua_AllToLua_cChunkDesc_SetUseDefaultBiomes00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"cBlockArea",0,&tolua_err)) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnumber(tolua_S,7,0,&tolua_err) || - !tolua_isnumber(tolua_S,8,0,&tolua_err) || - !tolua_isnoobj(tolua_S,9,&tolua_err) + !tolua_isboolean(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - cBlockArea* a_Dest = ((cBlockArea*) tolua_tousertype(tolua_S,2,0)); - int a_MinRelX = ((int) tolua_tonumber(tolua_S,3,0)); - int a_MaxRelX = ((int) tolua_tonumber(tolua_S,4,0)); - int a_MinRelY = ((int) tolua_tonumber(tolua_S,5,0)); - int a_MaxRelY = ((int) tolua_tonumber(tolua_S,6,0)); - int a_MinRelZ = ((int) tolua_tonumber(tolua_S,7,0)); - int a_MaxRelZ = ((int) tolua_tonumber(tolua_S,8,0)); + bool a_bUseDefaultBiomes = ((bool) tolua_toboolean(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ReadBlockArea'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetUseDefaultBiomes'", NULL); #endif { - self->ReadBlockArea(*a_Dest,a_MinRelX,a_MaxRelX,a_MinRelY,a_MaxRelY,a_MinRelZ,a_MaxRelZ); + self->SetUseDefaultBiomes(a_bUseDefaultBiomes); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'ReadBlockArea'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetUseDefaultBiomes'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetMaxHeight of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_GetMaxHeight00 -static int tolua_AllToLua_cChunkDesc_GetMaxHeight00(lua_State* tolua_S) +/* method: IsUsingDefaultBiomes of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_IsUsingDefaultBiomes00 +static int tolua_AllToLua_cChunkDesc_IsUsingDefaultBiomes00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; @@ -24900,790 +22675,772 @@ static int tolua_AllToLua_cChunkDesc_GetMaxHeight00(lua_State* tolua_S) { const cChunkDesc* self = (const cChunkDesc*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetMaxHeight'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsUsingDefaultBiomes'", NULL); #endif { - unsigned char tolua_ret = ( unsigned char) self->GetMaxHeight(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + bool tolua_ret = (bool) self->IsUsingDefaultBiomes(); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetMaxHeight'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'IsUsingDefaultBiomes'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: FillRelCuboid of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_FillRelCuboid00 -static int tolua_AllToLua_cChunkDesc_FillRelCuboid00(lua_State* tolua_S) +/* method: SetUseDefaultHeight of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_SetUseDefaultHeight00 +static int tolua_AllToLua_cChunkDesc_SetUseDefaultHeight00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnumber(tolua_S,7,0,&tolua_err) || - !tolua_isnumber(tolua_S,8,0,&tolua_err) || - !tolua_isnumber(tolua_S,9,0,&tolua_err) || - !tolua_isnoobj(tolua_S,10,&tolua_err) + !tolua_isboolean(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - int a_MinX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_MaxX = ((int) tolua_tonumber(tolua_S,3,0)); - int a_MinY = ((int) tolua_tonumber(tolua_S,4,0)); - int a_MaxY = ((int) tolua_tonumber(tolua_S,5,0)); - int a_MinZ = ((int) tolua_tonumber(tolua_S,6,0)); - int a_MaxZ = ((int) tolua_tonumber(tolua_S,7,0)); - unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,8,0)); - unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,9,0)); + bool a_bUseDefaultHeight = ((bool) tolua_toboolean(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FillRelCuboid'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetUseDefaultHeight'", NULL); #endif { - self->FillRelCuboid(a_MinX,a_MaxX,a_MinY,a_MaxY,a_MinZ,a_MaxZ,a_BlockType,a_BlockMeta); + self->SetUseDefaultHeight(a_bUseDefaultHeight); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'FillRelCuboid'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetUseDefaultHeight'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: FillRelCuboid of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_FillRelCuboid01 -static int tolua_AllToLua_cChunkDesc_FillRelCuboid01(lua_State* tolua_S) +/* method: IsUsingDefaultHeight of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_IsUsingDefaultHeight00 +static int tolua_AllToLua_cChunkDesc_IsUsingDefaultHeight00(lua_State* tolua_S) { +#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cCuboid",0,&tolua_err)) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cChunkDesc",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else +#endif { - cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - const cCuboid* a_RelCuboid = ((const cCuboid*) tolua_tousertype(tolua_S,2,0)); - unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,3,0)); - unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,4,0)); + const cChunkDesc* self = (const cChunkDesc*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FillRelCuboid'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsUsingDefaultHeight'", NULL); #endif { - self->FillRelCuboid(*a_RelCuboid,a_BlockType,a_BlockMeta); + bool tolua_ret = (bool) self->IsUsingDefaultHeight(); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'IsUsingDefaultHeight'.",&tolua_err); return 0; -tolua_lerror: - return tolua_AllToLua_cChunkDesc_FillRelCuboid00(tolua_S); +#endif } #endif //#ifndef TOLUA_DISABLE -/* method: ReplaceRelCuboid of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_ReplaceRelCuboid00 -static int tolua_AllToLua_cChunkDesc_ReplaceRelCuboid00(lua_State* tolua_S) +/* method: SetUseDefaultComposition of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_SetUseDefaultComposition00 +static int tolua_AllToLua_cChunkDesc_SetUseDefaultComposition00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnumber(tolua_S,7,0,&tolua_err) || - !tolua_isnumber(tolua_S,8,0,&tolua_err) || - !tolua_isnumber(tolua_S,9,0,&tolua_err) || - !tolua_isnumber(tolua_S,10,0,&tolua_err) || - !tolua_isnumber(tolua_S,11,0,&tolua_err) || - !tolua_isnoobj(tolua_S,12,&tolua_err) + !tolua_isboolean(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - int a_MinX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_MaxX = ((int) tolua_tonumber(tolua_S,3,0)); - int a_MinY = ((int) tolua_tonumber(tolua_S,4,0)); - int a_MaxY = ((int) tolua_tonumber(tolua_S,5,0)); - int a_MinZ = ((int) tolua_tonumber(tolua_S,6,0)); - int a_MaxZ = ((int) tolua_tonumber(tolua_S,7,0)); - unsigned char a_SrcType = (( unsigned char) tolua_tonumber(tolua_S,8,0)); - unsigned char a_SrcMeta = (( unsigned char) tolua_tonumber(tolua_S,9,0)); - unsigned char a_DstType = (( unsigned char) tolua_tonumber(tolua_S,10,0)); - unsigned char a_DstMeta = (( unsigned char) tolua_tonumber(tolua_S,11,0)); + bool a_bUseDefaultComposition = ((bool) tolua_toboolean(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ReplaceRelCuboid'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetUseDefaultComposition'", NULL); #endif { - self->ReplaceRelCuboid(a_MinX,a_MaxX,a_MinY,a_MaxY,a_MinZ,a_MaxZ,a_SrcType,a_SrcMeta,a_DstType,a_DstMeta); + self->SetUseDefaultComposition(a_bUseDefaultComposition); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'ReplaceRelCuboid'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetUseDefaultComposition'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: ReplaceRelCuboid of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_ReplaceRelCuboid01 -static int tolua_AllToLua_cChunkDesc_ReplaceRelCuboid01(lua_State* tolua_S) +/* method: IsUsingDefaultComposition of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_IsUsingDefaultComposition00 +static int tolua_AllToLua_cChunkDesc_IsUsingDefaultComposition00(lua_State* tolua_S) { +#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cCuboid",0,&tolua_err)) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnoobj(tolua_S,7,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cChunkDesc",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else +#endif { - cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - const cCuboid* a_RelCuboid = ((const cCuboid*) tolua_tousertype(tolua_S,2,0)); - unsigned char a_SrcType = (( unsigned char) tolua_tonumber(tolua_S,3,0)); - unsigned char a_SrcMeta = (( unsigned char) tolua_tonumber(tolua_S,4,0)); - unsigned char a_DstType = (( unsigned char) tolua_tonumber(tolua_S,5,0)); - unsigned char a_DstMeta = (( unsigned char) tolua_tonumber(tolua_S,6,0)); + const cChunkDesc* self = (const cChunkDesc*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ReplaceRelCuboid'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsUsingDefaultComposition'", NULL); #endif { - self->ReplaceRelCuboid(*a_RelCuboid,a_SrcType,a_SrcMeta,a_DstType,a_DstMeta); + bool tolua_ret = (bool) self->IsUsingDefaultComposition(); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'IsUsingDefaultComposition'.",&tolua_err); return 0; -tolua_lerror: - return tolua_AllToLua_cChunkDesc_ReplaceRelCuboid00(tolua_S); +#endif } #endif //#ifndef TOLUA_DISABLE -/* method: FloorRelCuboid of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_FloorRelCuboid00 -static int tolua_AllToLua_cChunkDesc_FloorRelCuboid00(lua_State* tolua_S) +/* method: SetUseDefaultStructures of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_SetUseDefaultStructures00 +static int tolua_AllToLua_cChunkDesc_SetUseDefaultStructures00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnumber(tolua_S,7,0,&tolua_err) || - !tolua_isnumber(tolua_S,8,0,&tolua_err) || - !tolua_isnumber(tolua_S,9,0,&tolua_err) || - !tolua_isnoobj(tolua_S,10,&tolua_err) + !tolua_isboolean(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - int a_MinX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_MaxX = ((int) tolua_tonumber(tolua_S,3,0)); - int a_MinY = ((int) tolua_tonumber(tolua_S,4,0)); - int a_MaxY = ((int) tolua_tonumber(tolua_S,5,0)); - int a_MinZ = ((int) tolua_tonumber(tolua_S,6,0)); - int a_MaxZ = ((int) tolua_tonumber(tolua_S,7,0)); - unsigned char a_DstType = (( unsigned char) tolua_tonumber(tolua_S,8,0)); - unsigned char a_DstMeta = (( unsigned char) tolua_tonumber(tolua_S,9,0)); + bool a_bUseDefaultStructures = ((bool) tolua_toboolean(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FloorRelCuboid'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetUseDefaultStructures'", NULL); #endif { - self->FloorRelCuboid(a_MinX,a_MaxX,a_MinY,a_MaxY,a_MinZ,a_MaxZ,a_DstType,a_DstMeta); + self->SetUseDefaultStructures(a_bUseDefaultStructures); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'FloorRelCuboid'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetUseDefaultStructures'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: FloorRelCuboid of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_FloorRelCuboid01 -static int tolua_AllToLua_cChunkDesc_FloorRelCuboid01(lua_State* tolua_S) -{ - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cCuboid",0,&tolua_err)) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) - ) - goto tolua_lerror; - else - { - cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - const cCuboid* a_RelCuboid = ((const cCuboid*) tolua_tousertype(tolua_S,2,0)); - unsigned char a_DstType = (( unsigned char) tolua_tonumber(tolua_S,3,0)); - unsigned char a_DstMeta = (( unsigned char) tolua_tonumber(tolua_S,4,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FloorRelCuboid'", NULL); -#endif - { - self->FloorRelCuboid(*a_RelCuboid,a_DstType,a_DstMeta); - } - } - return 0; -tolua_lerror: - return tolua_AllToLua_cChunkDesc_FloorRelCuboid00(tolua_S); -} -#endif //#ifndef TOLUA_DISABLE - -/* method: RandomFillRelCuboid of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_RandomFillRelCuboid00 -static int tolua_AllToLua_cChunkDesc_RandomFillRelCuboid00(lua_State* tolua_S) +/* method: IsUsingDefaultStructures of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_IsUsingDefaultStructures00 +static int tolua_AllToLua_cChunkDesc_IsUsingDefaultStructures00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnumber(tolua_S,7,0,&tolua_err) || - !tolua_isnumber(tolua_S,8,0,&tolua_err) || - !tolua_isnumber(tolua_S,9,0,&tolua_err) || - !tolua_isnumber(tolua_S,10,0,&tolua_err) || - !tolua_isnumber(tolua_S,11,0,&tolua_err) || - !tolua_isnoobj(tolua_S,12,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cChunkDesc",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) - goto tolua_lerror; - else -#endif - { - cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - int a_MinX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_MaxX = ((int) tolua_tonumber(tolua_S,3,0)); - int a_MinY = ((int) tolua_tonumber(tolua_S,4,0)); - int a_MaxY = ((int) tolua_tonumber(tolua_S,5,0)); - int a_MinZ = ((int) tolua_tonumber(tolua_S,6,0)); - int a_MaxZ = ((int) tolua_tonumber(tolua_S,7,0)); - unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,8,0)); - unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,9,0)); - int a_RandomSeed = ((int) tolua_tonumber(tolua_S,10,0)); - int a_ChanceOutOf10k = ((int) tolua_tonumber(tolua_S,11,0)); + goto tolua_lerror; + else +#endif + { + const cChunkDesc* self = (const cChunkDesc*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RandomFillRelCuboid'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsUsingDefaultStructures'", NULL); #endif { - self->RandomFillRelCuboid(a_MinX,a_MaxX,a_MinY,a_MaxY,a_MinZ,a_MaxZ,a_BlockType,a_BlockMeta,a_RandomSeed,a_ChanceOutOf10k); + bool tolua_ret = (bool) self->IsUsingDefaultStructures(); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'RandomFillRelCuboid'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'IsUsingDefaultStructures'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: RandomFillRelCuboid of class cChunkDesc */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_RandomFillRelCuboid01 -static int tolua_AllToLua_cChunkDesc_RandomFillRelCuboid01(lua_State* tolua_S) +/* method: SetUseDefaultFinish of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_SetUseDefaultFinish00 +static int tolua_AllToLua_cChunkDesc_SetUseDefaultFinish00(lua_State* tolua_S) { +#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cCuboid",0,&tolua_err)) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnoobj(tolua_S,7,&tolua_err) + !tolua_isboolean(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else +#endif { cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); - const cCuboid* a_RelCuboid = ((const cCuboid*) tolua_tousertype(tolua_S,2,0)); - unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,3,0)); - unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,4,0)); - int a_RandomSeed = ((int) tolua_tonumber(tolua_S,5,0)); - int a_ChanceOutOf10k = ((int) tolua_tonumber(tolua_S,6,0)); + bool a_bUseDefaultFinish = ((bool) tolua_toboolean(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RandomFillRelCuboid'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetUseDefaultFinish'", NULL); #endif { - self->RandomFillRelCuboid(*a_RelCuboid,a_BlockType,a_BlockMeta,a_RandomSeed,a_ChanceOutOf10k); + self->SetUseDefaultFinish(a_bUseDefaultFinish); } } return 0; -tolua_lerror: - return tolua_AllToLua_cChunkDesc_RandomFillRelCuboid00(tolua_S); +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'SetUseDefaultFinish'.",&tolua_err); + return 0; +#endif } #endif //#ifndef TOLUA_DISABLE -/* method: new of class cCraftingGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingGrid_new00 -static int tolua_AllToLua_cCraftingGrid_new00(lua_State* tolua_S) +/* method: IsUsingDefaultFinish of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_IsUsingDefaultFinish00 +static int tolua_AllToLua_cChunkDesc_IsUsingDefaultFinish00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertable(tolua_S,1,"cCraftingGrid",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cChunkDesc",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - int a_Width = ((int) tolua_tonumber(tolua_S,2,0)); - int a_Height = ((int) tolua_tonumber(tolua_S,3,0)); + const cChunkDesc* self = (const cChunkDesc*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsUsingDefaultFinish'", NULL); +#endif { - cCraftingGrid* tolua_ret = (cCraftingGrid*) Mtolua_new((cCraftingGrid)(a_Width,a_Height)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cCraftingGrid"); + bool tolua_ret = (bool) self->IsUsingDefaultFinish(); + tolua_pushboolean(tolua_S,(bool)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'IsUsingDefaultFinish'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: new_local of class cCraftingGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingGrid_new00_local -static int tolua_AllToLua_cCraftingGrid_new00_local(lua_State* tolua_S) +/* method: WriteBlockArea of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_WriteBlockArea00 +static int tolua_AllToLua_cChunkDesc_WriteBlockArea00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertable(tolua_S,1,"cCraftingGrid",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cBlockArea",0,&tolua_err)) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,1,&tolua_err) || + !tolua_isnoobj(tolua_S,7,&tolua_err) ) goto tolua_lerror; else #endif { - int a_Width = ((int) tolua_tonumber(tolua_S,2,0)); - int a_Height = ((int) tolua_tonumber(tolua_S,3,0)); + cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); + const cBlockArea* a_BlockArea = ((const cBlockArea*) tolua_tousertype(tolua_S,2,0)); + int a_RelX = ((int) tolua_tonumber(tolua_S,3,0)); + int a_RelY = ((int) tolua_tonumber(tolua_S,4,0)); + int a_RelZ = ((int) tolua_tonumber(tolua_S,5,0)); + cBlockArea::eMergeStrategy a_MergeStrategy = ((cBlockArea::eMergeStrategy) (int) tolua_tonumber(tolua_S,6,cBlockArea::msOverwrite)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'WriteBlockArea'", NULL); +#endif { - cCraftingGrid* tolua_ret = (cCraftingGrid*) Mtolua_new((cCraftingGrid)(a_Width,a_Height)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cCraftingGrid"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + self->WriteBlockArea(*a_BlockArea,a_RelX,a_RelY,a_RelZ,a_MergeStrategy); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'WriteBlockArea'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetWidth of class cCraftingGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingGrid_GetWidth00 -static int tolua_AllToLua_cCraftingGrid_GetWidth00(lua_State* tolua_S) +/* method: ReadBlockArea of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_ReadBlockArea00 +static int tolua_AllToLua_cChunkDesc_ReadBlockArea00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cCraftingGrid",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"cBlockArea",0,&tolua_err)) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnumber(tolua_S,7,0,&tolua_err) || + !tolua_isnumber(tolua_S,8,0,&tolua_err) || + !tolua_isnoobj(tolua_S,9,&tolua_err) ) goto tolua_lerror; else #endif { - const cCraftingGrid* self = (const cCraftingGrid*) tolua_tousertype(tolua_S,1,0); + cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); + cBlockArea* a_Dest = ((cBlockArea*) tolua_tousertype(tolua_S,2,0)); + int a_MinRelX = ((int) tolua_tonumber(tolua_S,3,0)); + int a_MaxRelX = ((int) tolua_tonumber(tolua_S,4,0)); + int a_MinRelY = ((int) tolua_tonumber(tolua_S,5,0)); + int a_MaxRelY = ((int) tolua_tonumber(tolua_S,6,0)); + int a_MinRelZ = ((int) tolua_tonumber(tolua_S,7,0)); + int a_MaxRelZ = ((int) tolua_tonumber(tolua_S,8,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetWidth'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ReadBlockArea'", NULL); #endif { - int tolua_ret = (int) self->GetWidth(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + self->ReadBlockArea(*a_Dest,a_MinRelX,a_MaxRelX,a_MinRelY,a_MaxRelY,a_MinRelZ,a_MaxRelZ); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetWidth'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'ReadBlockArea'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetHeight of class cCraftingGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingGrid_GetHeight00 -static int tolua_AllToLua_cCraftingGrid_GetHeight00(lua_State* tolua_S) +/* method: GetMaxHeight of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_GetMaxHeight00 +static int tolua_AllToLua_cChunkDesc_GetMaxHeight00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cCraftingGrid",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"const cChunkDesc",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - const cCraftingGrid* self = (const cCraftingGrid*) tolua_tousertype(tolua_S,1,0); + const cChunkDesc* self = (const cChunkDesc*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetHeight'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetMaxHeight'", NULL); #endif { - int tolua_ret = (int) self->GetHeight(); + unsigned char tolua_ret = ( unsigned char) self->GetMaxHeight(); tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetHeight'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetMaxHeight'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetItem of class cCraftingGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingGrid_GetItem00 -static int tolua_AllToLua_cCraftingGrid_GetItem00(lua_State* tolua_S) +/* method: FillRelCuboid of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_FillRelCuboid00 +static int tolua_AllToLua_cChunkDesc_FillRelCuboid00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cCraftingGrid",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnumber(tolua_S,7,0,&tolua_err) || + !tolua_isnumber(tolua_S,8,0,&tolua_err) || + !tolua_isnumber(tolua_S,9,0,&tolua_err) || + !tolua_isnoobj(tolua_S,10,&tolua_err) ) goto tolua_lerror; else #endif { - const cCraftingGrid* self = (const cCraftingGrid*) tolua_tousertype(tolua_S,1,0); - int x = ((int) tolua_tonumber(tolua_S,2,0)); - int y = ((int) tolua_tonumber(tolua_S,3,0)); + cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); + int a_MinX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_MaxX = ((int) tolua_tonumber(tolua_S,3,0)); + int a_MinY = ((int) tolua_tonumber(tolua_S,4,0)); + int a_MaxY = ((int) tolua_tonumber(tolua_S,5,0)); + int a_MinZ = ((int) tolua_tonumber(tolua_S,6,0)); + int a_MaxZ = ((int) tolua_tonumber(tolua_S,7,0)); + unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,8,0)); + unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,9,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetItem'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FillRelCuboid'", NULL); #endif { - cItem& tolua_ret = (cItem&) self->GetItem(x,y); - tolua_pushusertype(tolua_S,(void*)&tolua_ret,"cItem"); + self->FillRelCuboid(a_MinX,a_MaxX,a_MinY,a_MaxY,a_MinZ,a_MaxZ,a_BlockType,a_BlockMeta); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetItem'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'FillRelCuboid'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetItem of class cCraftingGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingGrid_SetItem00 -static int tolua_AllToLua_cCraftingGrid_SetItem00(lua_State* tolua_S) +/* method: FillRelCuboid of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_FillRelCuboid01 +static int tolua_AllToLua_cChunkDesc_FillRelCuboid01(lua_State* tolua_S) { -#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cCraftingGrid",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cCuboid",0,&tolua_err)) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnoobj(tolua_S,7,&tolua_err) + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else -#endif { - cCraftingGrid* self = (cCraftingGrid*) tolua_tousertype(tolua_S,1,0); - int x = ((int) tolua_tonumber(tolua_S,2,0)); - int y = ((int) tolua_tonumber(tolua_S,3,0)); - ENUM_ITEM_ID a_ItemType = ((ENUM_ITEM_ID) (int) tolua_tonumber(tolua_S,4,0)); - int a_ItemCount = ((int) tolua_tonumber(tolua_S,5,0)); - short a_ItemHealth = ((short) tolua_tonumber(tolua_S,6,0)); + cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); + const cCuboid* a_RelCuboid = ((const cCuboid*) tolua_tousertype(tolua_S,2,0)); + unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,3,0)); + unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,4,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetItem'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FillRelCuboid'", NULL); #endif { - self->SetItem(x,y,a_ItemType,a_ItemCount,a_ItemHealth); + self->FillRelCuboid(*a_RelCuboid,a_BlockType,a_BlockMeta); } } return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetItem'.",&tolua_err); - return 0; -#endif +tolua_lerror: + return tolua_AllToLua_cChunkDesc_FillRelCuboid00(tolua_S); } #endif //#ifndef TOLUA_DISABLE -/* method: SetItem of class cCraftingGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingGrid_SetItem01 -static int tolua_AllToLua_cCraftingGrid_SetItem01(lua_State* tolua_S) +/* method: ReplaceRelCuboid of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_ReplaceRelCuboid00 +static int tolua_AllToLua_cChunkDesc_ReplaceRelCuboid00(lua_State* tolua_S) { +#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cCraftingGrid",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || - (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const cItem",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,5,&tolua_err) + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnumber(tolua_S,7,0,&tolua_err) || + !tolua_isnumber(tolua_S,8,0,&tolua_err) || + !tolua_isnumber(tolua_S,9,0,&tolua_err) || + !tolua_isnumber(tolua_S,10,0,&tolua_err) || + !tolua_isnumber(tolua_S,11,0,&tolua_err) || + !tolua_isnoobj(tolua_S,12,&tolua_err) ) goto tolua_lerror; - else - { - cCraftingGrid* self = (cCraftingGrid*) tolua_tousertype(tolua_S,1,0); - int x = ((int) tolua_tonumber(tolua_S,2,0)); - int y = ((int) tolua_tonumber(tolua_S,3,0)); - const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,4,0)); + else +#endif + { + cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); + int a_MinX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_MaxX = ((int) tolua_tonumber(tolua_S,3,0)); + int a_MinY = ((int) tolua_tonumber(tolua_S,4,0)); + int a_MaxY = ((int) tolua_tonumber(tolua_S,5,0)); + int a_MinZ = ((int) tolua_tonumber(tolua_S,6,0)); + int a_MaxZ = ((int) tolua_tonumber(tolua_S,7,0)); + unsigned char a_SrcType = (( unsigned char) tolua_tonumber(tolua_S,8,0)); + unsigned char a_SrcMeta = (( unsigned char) tolua_tonumber(tolua_S,9,0)); + unsigned char a_DstType = (( unsigned char) tolua_tonumber(tolua_S,10,0)); + unsigned char a_DstMeta = (( unsigned char) tolua_tonumber(tolua_S,11,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetItem'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ReplaceRelCuboid'", NULL); #endif { - self->SetItem(x,y,*a_Item); + self->ReplaceRelCuboid(a_MinX,a_MaxX,a_MinY,a_MaxY,a_MinZ,a_MaxZ,a_SrcType,a_SrcMeta,a_DstType,a_DstMeta); } } return 0; -tolua_lerror: - return tolua_AllToLua_cCraftingGrid_SetItem00(tolua_S); +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'ReplaceRelCuboid'.",&tolua_err); + return 0; +#endif } #endif //#ifndef TOLUA_DISABLE -/* method: Clear of class cCraftingGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingGrid_Clear00 -static int tolua_AllToLua_cCraftingGrid_Clear00(lua_State* tolua_S) +/* method: ReplaceRelCuboid of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_ReplaceRelCuboid01 +static int tolua_AllToLua_cChunkDesc_ReplaceRelCuboid01(lua_State* tolua_S) { -#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cCraftingGrid",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cCuboid",0,&tolua_err)) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnoobj(tolua_S,7,&tolua_err) ) goto tolua_lerror; else -#endif { - cCraftingGrid* self = (cCraftingGrid*) tolua_tousertype(tolua_S,1,0); + cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); + const cCuboid* a_RelCuboid = ((const cCuboid*) tolua_tousertype(tolua_S,2,0)); + unsigned char a_SrcType = (( unsigned char) tolua_tonumber(tolua_S,3,0)); + unsigned char a_SrcMeta = (( unsigned char) tolua_tonumber(tolua_S,4,0)); + unsigned char a_DstType = (( unsigned char) tolua_tonumber(tolua_S,5,0)); + unsigned char a_DstMeta = (( unsigned char) tolua_tonumber(tolua_S,6,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clear'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ReplaceRelCuboid'", NULL); #endif { - self->Clear(); + self->ReplaceRelCuboid(*a_RelCuboid,a_SrcType,a_SrcMeta,a_DstType,a_DstMeta); } } return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Clear'.",&tolua_err); - return 0; -#endif +tolua_lerror: + return tolua_AllToLua_cChunkDesc_ReplaceRelCuboid00(tolua_S); } #endif //#ifndef TOLUA_DISABLE -/* method: ConsumeGrid of class cCraftingGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingGrid_ConsumeGrid00 -static int tolua_AllToLua_cCraftingGrid_ConsumeGrid00(lua_State* tolua_S) +/* method: FloorRelCuboid of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_FloorRelCuboid00 +static int tolua_AllToLua_cChunkDesc_FloorRelCuboid00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cCraftingGrid",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cCraftingGrid",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnumber(tolua_S,7,0,&tolua_err) || + !tolua_isnumber(tolua_S,8,0,&tolua_err) || + !tolua_isnumber(tolua_S,9,0,&tolua_err) || + !tolua_isnoobj(tolua_S,10,&tolua_err) ) goto tolua_lerror; else #endif { - cCraftingGrid* self = (cCraftingGrid*) tolua_tousertype(tolua_S,1,0); - const cCraftingGrid* a_Grid = ((const cCraftingGrid*) tolua_tousertype(tolua_S,2,0)); + cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); + int a_MinX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_MaxX = ((int) tolua_tonumber(tolua_S,3,0)); + int a_MinY = ((int) tolua_tonumber(tolua_S,4,0)); + int a_MaxY = ((int) tolua_tonumber(tolua_S,5,0)); + int a_MinZ = ((int) tolua_tonumber(tolua_S,6,0)); + int a_MaxZ = ((int) tolua_tonumber(tolua_S,7,0)); + unsigned char a_DstType = (( unsigned char) tolua_tonumber(tolua_S,8,0)); + unsigned char a_DstMeta = (( unsigned char) tolua_tonumber(tolua_S,9,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ConsumeGrid'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FloorRelCuboid'", NULL); #endif { - self->ConsumeGrid(*a_Grid); + self->FloorRelCuboid(a_MinX,a_MaxX,a_MinY,a_MaxY,a_MinZ,a_MaxZ,a_DstType,a_DstMeta); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'ConsumeGrid'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'FloorRelCuboid'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: Dump of class cCraftingGrid */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingGrid_Dump00 -static int tolua_AllToLua_cCraftingGrid_Dump00(lua_State* tolua_S) +/* method: FloorRelCuboid of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_FloorRelCuboid01 +static int tolua_AllToLua_cChunkDesc_FloorRelCuboid01(lua_State* tolua_S) { -#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cCraftingGrid",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cCuboid",0,&tolua_err)) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else -#endif { - cCraftingGrid* self = (cCraftingGrid*) tolua_tousertype(tolua_S,1,0); + cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); + const cCuboid* a_RelCuboid = ((const cCuboid*) tolua_tousertype(tolua_S,2,0)); + unsigned char a_DstType = (( unsigned char) tolua_tonumber(tolua_S,3,0)); + unsigned char a_DstMeta = (( unsigned char) tolua_tonumber(tolua_S,4,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Dump'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FloorRelCuboid'", NULL); #endif { - self->Dump(); + self->FloorRelCuboid(*a_RelCuboid,a_DstType,a_DstMeta); } } return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Dump'.",&tolua_err); - return 0; -#endif +tolua_lerror: + return tolua_AllToLua_cChunkDesc_FloorRelCuboid00(tolua_S); } #endif //#ifndef TOLUA_DISABLE -/* method: Clear of class cCraftingRecipe */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingRecipe_Clear00 -static int tolua_AllToLua_cCraftingRecipe_Clear00(lua_State* tolua_S) +/* method: RandomFillRelCuboid of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_RandomFillRelCuboid00 +static int tolua_AllToLua_cChunkDesc_RandomFillRelCuboid00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cCraftingRecipe",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnumber(tolua_S,7,0,&tolua_err) || + !tolua_isnumber(tolua_S,8,0,&tolua_err) || + !tolua_isnumber(tolua_S,9,0,&tolua_err) || + !tolua_isnumber(tolua_S,10,0,&tolua_err) || + !tolua_isnumber(tolua_S,11,0,&tolua_err) || + !tolua_isnoobj(tolua_S,12,&tolua_err) ) goto tolua_lerror; else #endif { - cCraftingRecipe* self = (cCraftingRecipe*) tolua_tousertype(tolua_S,1,0); + cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); + int a_MinX = ((int) tolua_tonumber(tolua_S,2,0)); + int a_MaxX = ((int) tolua_tonumber(tolua_S,3,0)); + int a_MinY = ((int) tolua_tonumber(tolua_S,4,0)); + int a_MaxY = ((int) tolua_tonumber(tolua_S,5,0)); + int a_MinZ = ((int) tolua_tonumber(tolua_S,6,0)); + int a_MaxZ = ((int) tolua_tonumber(tolua_S,7,0)); + unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,8,0)); + unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,9,0)); + int a_RandomSeed = ((int) tolua_tonumber(tolua_S,10,0)); + int a_ChanceOutOf10k = ((int) tolua_tonumber(tolua_S,11,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clear'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RandomFillRelCuboid'", NULL); #endif { - self->Clear(); + self->RandomFillRelCuboid(a_MinX,a_MaxX,a_MinY,a_MaxY,a_MinZ,a_MaxZ,a_BlockType,a_BlockMeta,a_RandomSeed,a_ChanceOutOf10k); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Clear'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'RandomFillRelCuboid'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetIngredientsWidth of class cCraftingRecipe */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingRecipe_GetIngredientsWidth00 -static int tolua_AllToLua_cCraftingRecipe_GetIngredientsWidth00(lua_State* tolua_S) +/* method: RandomFillRelCuboid of class cChunkDesc */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cChunkDesc_RandomFillRelCuboid01 +static int tolua_AllToLua_cChunkDesc_RandomFillRelCuboid01(lua_State* tolua_S) { -#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cCraftingRecipe",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"cChunkDesc",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cCuboid",0,&tolua_err)) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnoobj(tolua_S,7,&tolua_err) ) goto tolua_lerror; else -#endif { - const cCraftingRecipe* self = (const cCraftingRecipe*) tolua_tousertype(tolua_S,1,0); + cChunkDesc* self = (cChunkDesc*) tolua_tousertype(tolua_S,1,0); + const cCuboid* a_RelCuboid = ((const cCuboid*) tolua_tousertype(tolua_S,2,0)); + unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,3,0)); + unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,4,0)); + int a_RandomSeed = ((int) tolua_tonumber(tolua_S,5,0)); + int a_ChanceOutOf10k = ((int) tolua_tonumber(tolua_S,6,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetIngredientsWidth'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RandomFillRelCuboid'", NULL); #endif { - int tolua_ret = (int) self->GetIngredientsWidth(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + self->RandomFillRelCuboid(*a_RelCuboid,a_BlockType,a_BlockMeta,a_RandomSeed,a_ChanceOutOf10k); } } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetIngredientsWidth'.",&tolua_err); return 0; -#endif +tolua_lerror: + return tolua_AllToLua_cChunkDesc_RandomFillRelCuboid00(tolua_S); } #endif //#ifndef TOLUA_DISABLE -/* method: GetIngredientsHeight of class cCraftingRecipe */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingRecipe_GetIngredientsHeight00 -static int tolua_AllToLua_cCraftingRecipe_GetIngredientsHeight00(lua_State* tolua_S) +/* method: new of class cCraftingGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingGrid_new00 +static int tolua_AllToLua_cCraftingGrid_new00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cCraftingRecipe",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertable(tolua_S,1,"cCraftingGrid",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnoobj(tolua_S,4,&tolua_err) ) goto tolua_lerror; else #endif { - const cCraftingRecipe* self = (const cCraftingRecipe*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetIngredientsHeight'", NULL); -#endif + int a_Width = ((int) tolua_tonumber(tolua_S,2,0)); + int a_Height = ((int) tolua_tonumber(tolua_S,3,0)); { - int tolua_ret = (int) self->GetIngredientsHeight(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + cCraftingGrid* tolua_ret = (cCraftingGrid*) Mtolua_new((cCraftingGrid)(a_Width,a_Height)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"cCraftingGrid"); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetIngredientsHeight'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetIngredient of class cCraftingRecipe */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingRecipe_GetIngredient00 -static int tolua_AllToLua_cCraftingRecipe_GetIngredient00(lua_State* tolua_S) +/* method: new_local of class cCraftingGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingGrid_new00_local +static int tolua_AllToLua_cCraftingGrid_new00_local(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cCraftingRecipe",0,&tolua_err) || + !tolua_isusertable(tolua_S,1,"cCraftingGrid",0,&tolua_err) || !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || !tolua_isnoobj(tolua_S,4,&tolua_err) @@ -25692,131 +23449,131 @@ static int tolua_AllToLua_cCraftingRecipe_GetIngredient00(lua_State* tolua_S) else #endif { - const cCraftingRecipe* self = (const cCraftingRecipe*) tolua_tousertype(tolua_S,1,0); - int x = ((int) tolua_tonumber(tolua_S,2,0)); - int y = ((int) tolua_tonumber(tolua_S,3,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetIngredient'", NULL); -#endif + int a_Width = ((int) tolua_tonumber(tolua_S,2,0)); + int a_Height = ((int) tolua_tonumber(tolua_S,3,0)); { - cItem& tolua_ret = (cItem&) self->GetIngredient(x,y); - tolua_pushusertype(tolua_S,(void*)&tolua_ret,"cItem"); + cCraftingGrid* tolua_ret = (cCraftingGrid*) Mtolua_new((cCraftingGrid)(a_Width,a_Height)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"cCraftingGrid"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetIngredient'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetResult of class cCraftingRecipe */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingRecipe_GetResult00 -static int tolua_AllToLua_cCraftingRecipe_GetResult00(lua_State* tolua_S) +/* method: GetWidth of class cCraftingGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingGrid_GetWidth00 +static int tolua_AllToLua_cCraftingGrid_GetWidth00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cCraftingRecipe",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"const cCraftingGrid",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - const cCraftingRecipe* self = (const cCraftingRecipe*) tolua_tousertype(tolua_S,1,0); + const cCraftingGrid* self = (const cCraftingGrid*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetResult'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetWidth'", NULL); #endif { - const cItem& tolua_ret = (const cItem&) self->GetResult(); - tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const cItem"); + int tolua_ret = (int) self->GetWidth(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetResult'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetWidth'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetResult of class cCraftingRecipe */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingRecipe_SetResult00 -static int tolua_AllToLua_cCraftingRecipe_SetResult00(lua_State* tolua_S) +/* method: GetHeight of class cCraftingGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingGrid_GetHeight00 +static int tolua_AllToLua_cCraftingGrid_GetHeight00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cCraftingRecipe",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnoobj(tolua_S,5,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cCraftingGrid",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cCraftingRecipe* self = (cCraftingRecipe*) tolua_tousertype(tolua_S,1,0); - ENUM_ITEM_ID a_ItemType = ((ENUM_ITEM_ID) (int) tolua_tonumber(tolua_S,2,0)); - int a_ItemCount = ((int) tolua_tonumber(tolua_S,3,0)); - short a_ItemHealth = ((short) tolua_tonumber(tolua_S,4,0)); + const cCraftingGrid* self = (const cCraftingGrid*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetResult'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetHeight'", NULL); #endif { - self->SetResult(a_ItemType,a_ItemCount,a_ItemHealth); + int tolua_ret = (int) self->GetHeight(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetResult'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetHeight'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetResult of class cCraftingRecipe */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingRecipe_SetResult01 -static int tolua_AllToLua_cCraftingRecipe_SetResult01(lua_State* tolua_S) +/* method: GetItem of class cCraftingGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingGrid_GetItem00 +static int tolua_AllToLua_cCraftingGrid_GetItem00(lua_State* tolua_S) { +#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cCraftingRecipe",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cItem",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cCraftingGrid",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnoobj(tolua_S,4,&tolua_err) ) goto tolua_lerror; else +#endif { - cCraftingRecipe* self = (cCraftingRecipe*) tolua_tousertype(tolua_S,1,0); - const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,2,0)); + const cCraftingGrid* self = (const cCraftingGrid*) tolua_tousertype(tolua_S,1,0); + int x = ((int) tolua_tonumber(tolua_S,2,0)); + int y = ((int) tolua_tonumber(tolua_S,3,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetResult'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetItem'", NULL); #endif { - self->SetResult(*a_Item); + cItem& tolua_ret = (cItem&) self->GetItem(x,y); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"cItem"); } } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetItem'.",&tolua_err); return 0; -tolua_lerror: - return tolua_AllToLua_cCraftingRecipe_SetResult00(tolua_S); +#endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetIngredient of class cCraftingRecipe */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingRecipe_SetIngredient00 -static int tolua_AllToLua_cCraftingRecipe_SetIngredient00(lua_State* tolua_S) +/* method: SetItem of class cCraftingGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingGrid_SetItem00 +static int tolua_AllToLua_cCraftingGrid_SetItem00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cCraftingRecipe",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cCraftingGrid",0,&tolua_err) || !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || !tolua_isnumber(tolua_S,4,0,&tolua_err) || @@ -25828,35 +23585,35 @@ static int tolua_AllToLua_cCraftingRecipe_SetIngredient00(lua_State* tolua_S) else #endif { - cCraftingRecipe* self = (cCraftingRecipe*) tolua_tousertype(tolua_S,1,0); + cCraftingGrid* self = (cCraftingGrid*) tolua_tousertype(tolua_S,1,0); int x = ((int) tolua_tonumber(tolua_S,2,0)); int y = ((int) tolua_tonumber(tolua_S,3,0)); ENUM_ITEM_ID a_ItemType = ((ENUM_ITEM_ID) (int) tolua_tonumber(tolua_S,4,0)); int a_ItemCount = ((int) tolua_tonumber(tolua_S,5,0)); short a_ItemHealth = ((short) tolua_tonumber(tolua_S,6,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetIngredient'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetItem'", NULL); #endif { - self->SetIngredient(x,y,a_ItemType,a_ItemCount,a_ItemHealth); + self->SetItem(x,y,a_ItemType,a_ItemCount,a_ItemHealth); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetIngredient'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetItem'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetIngredient of class cCraftingRecipe */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingRecipe_SetIngredient01 -static int tolua_AllToLua_cCraftingRecipe_SetIngredient01(lua_State* tolua_S) +/* method: SetItem of class cCraftingGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingGrid_SetItem01 +static int tolua_AllToLua_cCraftingGrid_SetItem01(lua_State* tolua_S) { tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cCraftingRecipe",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cCraftingGrid",0,&tolua_err) || !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const cItem",0,&tolua_err)) || @@ -25865,545 +23622,483 @@ static int tolua_AllToLua_cCraftingRecipe_SetIngredient01(lua_State* tolua_S) goto tolua_lerror; else { - cCraftingRecipe* self = (cCraftingRecipe*) tolua_tousertype(tolua_S,1,0); + cCraftingGrid* self = (cCraftingGrid*) tolua_tousertype(tolua_S,1,0); int x = ((int) tolua_tonumber(tolua_S,2,0)); int y = ((int) tolua_tonumber(tolua_S,3,0)); const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,4,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetIngredient'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetItem'", NULL); #endif { - self->SetIngredient(x,y,*a_Item); + self->SetItem(x,y,*a_Item); } } return 0; tolua_lerror: - return tolua_AllToLua_cCraftingRecipe_SetIngredient00(tolua_S); + return tolua_AllToLua_cCraftingGrid_SetItem00(tolua_S); } #endif //#ifndef TOLUA_DISABLE -/* method: ConsumeIngredients of class cCraftingRecipe */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingRecipe_ConsumeIngredients00 -static int tolua_AllToLua_cCraftingRecipe_ConsumeIngredients00(lua_State* tolua_S) +/* method: Clear of class cCraftingGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingGrid_Clear00 +static int tolua_AllToLua_cCraftingGrid_Clear00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cCraftingRecipe",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"cCraftingGrid",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertype(tolua_S,1,"cCraftingGrid",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cCraftingRecipe* self = (cCraftingRecipe*) tolua_tousertype(tolua_S,1,0); - cCraftingGrid* a_CraftingGrid = ((cCraftingGrid*) tolua_tousertype(tolua_S,2,0)); + cCraftingGrid* self = (cCraftingGrid*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ConsumeIngredients'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clear'", NULL); #endif { - self->ConsumeIngredients(*a_CraftingGrid); + self->Clear(); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'ConsumeIngredients'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'Clear'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: Dump of class cCraftingRecipe */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingRecipe_Dump00 -static int tolua_AllToLua_cCraftingRecipe_Dump00(lua_State* tolua_S) +/* method: ConsumeGrid of class cCraftingGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingGrid_ConsumeGrid00 +static int tolua_AllToLua_cCraftingGrid_ConsumeGrid00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cCraftingRecipe",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"cCraftingGrid",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cCraftingGrid",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - cCraftingRecipe* self = (cCraftingRecipe*) tolua_tousertype(tolua_S,1,0); + cCraftingGrid* self = (cCraftingGrid*) tolua_tousertype(tolua_S,1,0); + const cCraftingGrid* a_Grid = ((const cCraftingGrid*) tolua_tousertype(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Dump'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ConsumeGrid'", NULL); #endif { - self->Dump(); + self->ConsumeGrid(*a_Grid); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Dump'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'ConsumeGrid'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetWindowID of class cWindow */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cWindow_GetWindowID00 -static int tolua_AllToLua_cWindow_GetWindowID00(lua_State* tolua_S) +/* method: Dump of class cCraftingGrid */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingGrid_Dump00 +static int tolua_AllToLua_cCraftingGrid_Dump00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cWindow",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cCraftingGrid",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - const cWindow* self = (const cWindow*) tolua_tousertype(tolua_S,1,0); + cCraftingGrid* self = (cCraftingGrid*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetWindowID'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Dump'", NULL); #endif { - char tolua_ret = (char) self->GetWindowID(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + self->Dump(); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetWindowID'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'Dump'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetWindowType of class cWindow */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cWindow_GetWindowType00 -static int tolua_AllToLua_cWindow_GetWindowType00(lua_State* tolua_S) +/* method: Clear of class cCraftingRecipe */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingRecipe_Clear00 +static int tolua_AllToLua_cCraftingRecipe_Clear00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cWindow",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cCraftingRecipe",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - const cWindow* self = (const cWindow*) tolua_tousertype(tolua_S,1,0); + cCraftingRecipe* self = (cCraftingRecipe*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetWindowType'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clear'", NULL); #endif { - int tolua_ret = (int) self->GetWindowType(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + self->Clear(); } } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetWindowType'.",&tolua_err); return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetSlot of class cWindow */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cWindow_GetSlot00 -static int tolua_AllToLua_cWindow_GetSlot00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cWindow",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"cPlayer",0,&tolua_err)) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cWindow* self = (const cWindow*) tolua_tousertype(tolua_S,1,0); - cPlayer* a_Player = ((cPlayer*) tolua_tousertype(tolua_S,2,0)); - int a_SlotNum = ((int) tolua_tonumber(tolua_S,3,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSlot'", NULL); -#endif - { - const cItem* tolua_ret = (const cItem*) self->GetSlot(*a_Player,a_SlotNum); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"const cItem"); - } - } - return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetSlot'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'Clear'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetSlot of class cWindow */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cWindow_SetSlot00 -static int tolua_AllToLua_cWindow_SetSlot00(lua_State* tolua_S) +/* method: GetIngredientsWidth of class cCraftingRecipe */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingRecipe_GetIngredientsWidth00 +static int tolua_AllToLua_cCraftingRecipe_GetIngredientsWidth00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cWindow",0,&tolua_err) || - (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"cPlayer",0,&tolua_err)) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const cItem",0,&tolua_err)) || - !tolua_isnoobj(tolua_S,5,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cCraftingRecipe",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cWindow* self = (cWindow*) tolua_tousertype(tolua_S,1,0); - cPlayer* a_Player = ((cPlayer*) tolua_tousertype(tolua_S,2,0)); - int a_SlotNum = ((int) tolua_tonumber(tolua_S,3,0)); - const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,4,0)); + const cCraftingRecipe* self = (const cCraftingRecipe*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSlot'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetIngredientsWidth'", NULL); #endif { - self->SetSlot(*a_Player,a_SlotNum,*a_Item); + int tolua_ret = (int) self->GetIngredientsWidth(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } - return 0; + return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetSlot'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetIngredientsWidth'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: IsSlotInPlayerMainInventory of class cWindow */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cWindow_IsSlotInPlayerMainInventory00 -static int tolua_AllToLua_cWindow_IsSlotInPlayerMainInventory00(lua_State* tolua_S) +/* method: GetIngredientsHeight of class cCraftingRecipe */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingRecipe_GetIngredientsHeight00 +static int tolua_AllToLua_cCraftingRecipe_GetIngredientsHeight00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cWindow",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cCraftingRecipe",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - const cWindow* self = (const cWindow*) tolua_tousertype(tolua_S,1,0); - int a_SlotNum = ((int) tolua_tonumber(tolua_S,2,0)); + const cCraftingRecipe* self = (const cCraftingRecipe*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsSlotInPlayerMainInventory'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetIngredientsHeight'", NULL); #endif { - bool tolua_ret = (bool) self->IsSlotInPlayerMainInventory(a_SlotNum); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + int tolua_ret = (int) self->GetIngredientsHeight(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsSlotInPlayerMainInventory'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetIngredientsHeight'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: IsSlotInPlayerHotbar of class cWindow */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cWindow_IsSlotInPlayerHotbar00 -static int tolua_AllToLua_cWindow_IsSlotInPlayerHotbar00(lua_State* tolua_S) +/* method: GetIngredient of class cCraftingRecipe */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingRecipe_GetIngredient00 +static int tolua_AllToLua_cCraftingRecipe_GetIngredient00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cWindow",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"const cCraftingRecipe",0,&tolua_err) || !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnoobj(tolua_S,4,&tolua_err) ) goto tolua_lerror; else #endif { - const cWindow* self = (const cWindow*) tolua_tousertype(tolua_S,1,0); - int a_SlotNum = ((int) tolua_tonumber(tolua_S,2,0)); + const cCraftingRecipe* self = (const cCraftingRecipe*) tolua_tousertype(tolua_S,1,0); + int x = ((int) tolua_tonumber(tolua_S,2,0)); + int y = ((int) tolua_tonumber(tolua_S,3,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsSlotInPlayerHotbar'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetIngredient'", NULL); #endif { - bool tolua_ret = (bool) self->IsSlotInPlayerHotbar(a_SlotNum); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + cItem& tolua_ret = (cItem&) self->GetIngredient(x,y); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"cItem"); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsSlotInPlayerHotbar'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetIngredient'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: IsSlotInPlayerInventory of class cWindow */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cWindow_IsSlotInPlayerInventory00 -static int tolua_AllToLua_cWindow_IsSlotInPlayerInventory00(lua_State* tolua_S) +/* method: GetResult of class cCraftingRecipe */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingRecipe_GetResult00 +static int tolua_AllToLua_cCraftingRecipe_GetResult00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cWindow",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isusertype(tolua_S,1,"const cCraftingRecipe",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - const cWindow* self = (const cWindow*) tolua_tousertype(tolua_S,1,0); - int a_SlotNum = ((int) tolua_tonumber(tolua_S,2,0)); + const cCraftingRecipe* self = (const cCraftingRecipe*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsSlotInPlayerInventory'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetResult'", NULL); #endif { - bool tolua_ret = (bool) self->IsSlotInPlayerInventory(a_SlotNum); - tolua_pushboolean(tolua_S,(bool)tolua_ret); + const cItem& tolua_ret = (const cItem&) self->GetResult(); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const cItem"); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsSlotInPlayerInventory'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'GetResult'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetWindowTitle of class cWindow */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cWindow_GetWindowTitle00 -static int tolua_AllToLua_cWindow_GetWindowTitle00(lua_State* tolua_S) +/* method: SetResult of class cCraftingRecipe */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingRecipe_SetResult00 +static int tolua_AllToLua_cCraftingRecipe_SetResult00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"const cWindow",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"cCraftingRecipe",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else #endif { - const cWindow* self = (const cWindow*) tolua_tousertype(tolua_S,1,0); + cCraftingRecipe* self = (cCraftingRecipe*) tolua_tousertype(tolua_S,1,0); + ENUM_ITEM_ID a_ItemType = ((ENUM_ITEM_ID) (int) tolua_tonumber(tolua_S,2,0)); + int a_ItemCount = ((int) tolua_tonumber(tolua_S,3,0)); + short a_ItemHealth = ((short) tolua_tonumber(tolua_S,4,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetWindowTitle'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetResult'", NULL); #endif { - const AString tolua_ret = (const AString) self->GetWindowTitle(); - tolua_pushcppstring(tolua_S,(const char*)tolua_ret); + self->SetResult(a_ItemType,a_ItemCount,a_ItemHealth); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetWindowTitle'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetResult'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: SetWindowTitle of class cWindow */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cWindow_SetWindowTitle00 -static int tolua_AllToLua_cWindow_SetWindowTitle00(lua_State* tolua_S) +/* method: SetResult of class cCraftingRecipe */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingRecipe_SetResult01 +static int tolua_AllToLua_cCraftingRecipe_SetResult01(lua_State* tolua_S) { -#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cWindow",0,&tolua_err) || - !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cCraftingRecipe",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const cItem",0,&tolua_err)) || !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else -#endif { - cWindow* self = (cWindow*) tolua_tousertype(tolua_S,1,0); - const AString a_WindowTitle = ((const AString) tolua_tocppstring(tolua_S,2,0)); + cCraftingRecipe* self = (cCraftingRecipe*) tolua_tousertype(tolua_S,1,0); + const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetWindowTitle'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetResult'", NULL); #endif { - self->SetWindowTitle(a_WindowTitle); - tolua_pushcppstring(tolua_S,(const char*)a_WindowTitle); + self->SetResult(*a_Item); } } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetWindowTitle'.",&tolua_err); return 0; -#endif +tolua_lerror: + return tolua_AllToLua_cCraftingRecipe_SetResult00(tolua_S); } #endif //#ifndef TOLUA_DISABLE -/* method: new of class cLuaWindow */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cLuaWindow_new00 -static int tolua_AllToLua_cLuaWindow_new00(lua_State* tolua_S) +/* method: SetIngredient of class cCraftingRecipe */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingRecipe_SetIngredient00 +static int tolua_AllToLua_cCraftingRecipe_SetIngredient00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertable(tolua_S,1,"cLuaWindow",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cCraftingRecipe",0,&tolua_err) || !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_iscppstring(tolua_S,5,0,&tolua_err) || - !tolua_isnoobj(tolua_S,6,&tolua_err) + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnoobj(tolua_S,7,&tolua_err) ) goto tolua_lerror; else #endif { - cWindow::WindowType a_WindowType = ((cWindow::WindowType) (int) tolua_tonumber(tolua_S,2,0)); - int a_SlotsX = ((int) tolua_tonumber(tolua_S,3,0)); - int a_SlotsY = ((int) tolua_tonumber(tolua_S,4,0)); - const AString a_Title = ((const AString) tolua_tocppstring(tolua_S,5,0)); + cCraftingRecipe* self = (cCraftingRecipe*) tolua_tousertype(tolua_S,1,0); + int x = ((int) tolua_tonumber(tolua_S,2,0)); + int y = ((int) tolua_tonumber(tolua_S,3,0)); + ENUM_ITEM_ID a_ItemType = ((ENUM_ITEM_ID) (int) tolua_tonumber(tolua_S,4,0)); + int a_ItemCount = ((int) tolua_tonumber(tolua_S,5,0)); + short a_ItemHealth = ((short) tolua_tonumber(tolua_S,6,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetIngredient'", NULL); +#endif { - cLuaWindow* tolua_ret = (cLuaWindow*) Mtolua_new((cLuaWindow)(a_WindowType,a_SlotsX,a_SlotsY,a_Title)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cLuaWindow"); - tolua_pushcppstring(tolua_S,(const char*)a_Title); + self->SetIngredient(x,y,a_ItemType,a_ItemCount,a_ItemHealth); } } - return 2; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'SetIngredient'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: new_local of class cLuaWindow */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cLuaWindow_new00_local -static int tolua_AllToLua_cLuaWindow_new00_local(lua_State* tolua_S) +/* method: SetIngredient of class cCraftingRecipe */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingRecipe_SetIngredient01 +static int tolua_AllToLua_cCraftingRecipe_SetIngredient01(lua_State* tolua_S) { -#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertable(tolua_S,1,"cLuaWindow",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cCraftingRecipe",0,&tolua_err) || !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_iscppstring(tolua_S,5,0,&tolua_err) || - !tolua_isnoobj(tolua_S,6,&tolua_err) + (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const cItem",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else -#endif { - cWindow::WindowType a_WindowType = ((cWindow::WindowType) (int) tolua_tonumber(tolua_S,2,0)); - int a_SlotsX = ((int) tolua_tonumber(tolua_S,3,0)); - int a_SlotsY = ((int) tolua_tonumber(tolua_S,4,0)); - const AString a_Title = ((const AString) tolua_tocppstring(tolua_S,5,0)); + cCraftingRecipe* self = (cCraftingRecipe*) tolua_tousertype(tolua_S,1,0); + int x = ((int) tolua_tonumber(tolua_S,2,0)); + int y = ((int) tolua_tonumber(tolua_S,3,0)); + const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,4,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetIngredient'", NULL); +#endif { - cLuaWindow* tolua_ret = (cLuaWindow*) Mtolua_new((cLuaWindow)(a_WindowType,a_SlotsX,a_SlotsY,a_Title)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cLuaWindow"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); - tolua_pushcppstring(tolua_S,(const char*)a_Title); + self->SetIngredient(x,y,*a_Item); } } - return 2; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); return 0; -#endif +tolua_lerror: + return tolua_AllToLua_cCraftingRecipe_SetIngredient00(tolua_S); } #endif //#ifndef TOLUA_DISABLE -/* method: delete of class cLuaWindow */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cLuaWindow_delete00 -static int tolua_AllToLua_cLuaWindow_delete00(lua_State* tolua_S) +/* method: ConsumeIngredients of class cCraftingRecipe */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingRecipe_ConsumeIngredients00 +static int tolua_AllToLua_cCraftingRecipe_ConsumeIngredients00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cLuaWindow",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isusertype(tolua_S,1,"cCraftingRecipe",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"cCraftingGrid",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else #endif { - cLuaWindow* self = (cLuaWindow*) tolua_tousertype(tolua_S,1,0); + cCraftingRecipe* self = (cCraftingRecipe*) tolua_tousertype(tolua_S,1,0); + cCraftingGrid* a_CraftingGrid = ((cCraftingGrid*) tolua_tousertype(tolua_S,2,0)); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'delete'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ConsumeIngredients'", NULL); #endif - Mtolua_delete(self); + { + self->ConsumeIngredients(*a_CraftingGrid); + } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'delete'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'ConsumeIngredients'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* method: GetContents of class cLuaWindow */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cLuaWindow_GetContents00 -static int tolua_AllToLua_cLuaWindow_GetContents00(lua_State* tolua_S) +/* method: Dump of class cCraftingRecipe */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cCraftingRecipe_Dump00 +static int tolua_AllToLua_cCraftingRecipe_Dump00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( - !tolua_isusertype(tolua_S,1,"cLuaWindow",0,&tolua_err) || + !tolua_isusertype(tolua_S,1,"cCraftingRecipe",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { - cLuaWindow* self = (cLuaWindow*) tolua_tousertype(tolua_S,1,0); + cCraftingRecipe* self = (cCraftingRecipe*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetContents'", NULL); + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Dump'", NULL); #endif { - cItemGrid& tolua_ret = (cItemGrid&) self->GetContents(); - tolua_pushusertype(tolua_S,(void*)&tolua_ret,"cItemGrid"); + self->Dump(); } } - return 1; + return 0; #ifndef TOLUA_RELEASE tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetContents'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'Dump'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE -/* get function: __cItemGrid of class cLuaWindow */ -#ifndef TOLUA_DISABLE_tolua_get_cLuaWindow___cItemGrid__cListener__ -static int tolua_get_cLuaWindow___cItemGrid__cListener__(lua_State* tolua_S) -{ - cLuaWindow* self = (cLuaWindow*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable '__cItemGrid'",NULL); -#endif -#ifdef __cplusplus - tolua_pushusertype(tolua_S,(void*)static_cast(self), "cItemGrid::cListener"); -#else - tolua_pushusertype(tolua_S,(void*)((cItemGrid::cListener*)self), "cItemGrid::cListener"); -#endif - return 1; -} -#endif //#ifndef TOLUA_DISABLE - /* Open function */ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) { @@ -26438,6 +24133,25 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_constant(tolua_S,"biJungleHills",biJungleHills); tolua_constant(tolua_S,"biNumBiomes",biNumBiomes); tolua_constant(tolua_S,"biMaxBiome",biMaxBiome); + tolua_cclass(tolua_S,"cTorch","cTorch","",NULL); + tolua_beginmodule(tolua_S,"cTorch"); + tolua_function(tolua_S,"DirectionToMetaData",tolua_AllToLua_cTorch_DirectionToMetaData00); + tolua_function(tolua_S,"MetaDataToDirection",tolua_AllToLua_cTorch_MetaDataToDirection00); + tolua_endmodule(tolua_S); + tolua_cclass(tolua_S,"cStairs","cStairs","",NULL); + tolua_beginmodule(tolua_S,"cStairs"); + tolua_function(tolua_S,"RotationToMetaData",tolua_AllToLua_cStairs_RotationToMetaData00); + tolua_endmodule(tolua_S); + tolua_cclass(tolua_S,"cLadder","cLadder","",NULL); + tolua_beginmodule(tolua_S,"cLadder"); + tolua_function(tolua_S,"DirectionToMetaData",tolua_AllToLua_cLadder_DirectionToMetaData00); + tolua_function(tolua_S,"MetaDataToDirection",tolua_AllToLua_cLadder_MetaDataToDirection00); + tolua_endmodule(tolua_S); + tolua_cclass(tolua_S,"cVine","cVine","",NULL); + tolua_beginmodule(tolua_S,"cVine"); + tolua_function(tolua_S,"DirectionToMetaData",tolua_AllToLua_cVine_DirectionToMetaData00); + tolua_function(tolua_S,"MetaDataToDirection",tolua_AllToLua_cVine_MetaDataToDirection00); + tolua_endmodule(tolua_S); #ifdef __cplusplus tolua_cclass(tolua_S,"cIniFile","cIniFile","",tolua_collect_cIniFile); #else @@ -26670,7 +24384,6 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_constant(tolua_S,"E_BLOCK_HOPPER",E_BLOCK_HOPPER); tolua_constant(tolua_S,"E_BLOCK_QUARTZ_BLOCK",E_BLOCK_QUARTZ_BLOCK); tolua_constant(tolua_S,"E_BLOCK_ACTIVATOR_RAIL",E_BLOCK_ACTIVATOR_RAIL); - tolua_constant(tolua_S,"E_BLOCK_DROPPER",E_BLOCK_DROPPER); tolua_constant(tolua_S,"E_BLOCK_NUMBER_OF_TYPES",E_BLOCK_NUMBER_OF_TYPES); tolua_constant(tolua_S,"E_BLOCK_MAX_TYPE_ID",E_BLOCK_MAX_TYPE_ID); tolua_constant(tolua_S,"E_ITEM_EMPTY",E_ITEM_EMPTY); @@ -26843,17 +24556,57 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_constant(tolua_S,"E_ITEM_WAIT_DISC",E_ITEM_WAIT_DISC); tolua_constant(tolua_S,"E_ITEM_LAST_DISC_PLUS_ONE",E_ITEM_LAST_DISC_PLUS_ONE); tolua_constant(tolua_S,"E_ITEM_LAST_DISC",E_ITEM_LAST_DISC); + tolua_constant(tolua_S,"E_META_PLANKS_APPLE",E_META_PLANKS_APPLE); + tolua_constant(tolua_S,"E_META_PLANKS_CONIFER",E_META_PLANKS_CONIFER); + tolua_constant(tolua_S,"E_META_PLANKS_BIRCH",E_META_PLANKS_BIRCH); + tolua_constant(tolua_S,"E_META_PLANKS_JUNGLE",E_META_PLANKS_JUNGLE); + tolua_constant(tolua_S,"E_META_LOG_APPLE",E_META_LOG_APPLE); + tolua_constant(tolua_S,"E_META_LOG_CONIFER",E_META_LOG_CONIFER); + tolua_constant(tolua_S,"E_META_LOG_BIRCH",E_META_LOG_BIRCH); + tolua_constant(tolua_S,"E_META_LOG_JUNGLE",E_META_LOG_JUNGLE); + tolua_constant(tolua_S,"E_META_LEAVES_APPLE",E_META_LEAVES_APPLE); + tolua_constant(tolua_S,"E_META_LEAVES_CONIFER",E_META_LEAVES_CONIFER); + tolua_constant(tolua_S,"E_META_LEAVES_BIRCH",E_META_LEAVES_BIRCH); + tolua_constant(tolua_S,"E_META_LEAVES_JUNGLE",E_META_LEAVES_JUNGLE); + tolua_constant(tolua_S,"E_META_SAPLING_APPLE",E_META_SAPLING_APPLE); + tolua_constant(tolua_S,"E_META_SAPLING_CONIFER",E_META_SAPLING_CONIFER); + tolua_constant(tolua_S,"E_META_SAPLING_BIRCH",E_META_SAPLING_BIRCH); + tolua_constant(tolua_S,"E_META_SAPLING_JUNGLE",E_META_SAPLING_JUNGLE); + tolua_constant(tolua_S,"E_META_TALL_GRASS_DEAD_SHRUB",E_META_TALL_GRASS_DEAD_SHRUB); + tolua_constant(tolua_S,"E_META_TALL_GRASS_GRASS",E_META_TALL_GRASS_GRASS); + tolua_constant(tolua_S,"E_META_TALL_GRASS_FERN",E_META_TALL_GRASS_FERN); + tolua_constant(tolua_S,"E_META_SANDSTONE_NORMAL",E_META_SANDSTONE_NORMAL); + tolua_constant(tolua_S,"E_META_SANDSTONE_ORNAMENT",E_META_SANDSTONE_ORNAMENT); + tolua_constant(tolua_S,"E_META_SANDSTONE_SMOOTH",E_META_SANDSTONE_SMOOTH); + tolua_constant(tolua_S,"E_META_WOOL_WHITE",E_META_WOOL_WHITE); + tolua_constant(tolua_S,"E_META_WOOL_ORANGE",E_META_WOOL_ORANGE); + tolua_constant(tolua_S,"E_META_WOOL_MAGENTA",E_META_WOOL_MAGENTA); + tolua_constant(tolua_S,"E_META_WOOL_LIGHTBLUE",E_META_WOOL_LIGHTBLUE); + tolua_constant(tolua_S,"E_META_WOOL_YELLOW",E_META_WOOL_YELLOW); + tolua_constant(tolua_S,"E_META_WOOL_LIGHTGREEN",E_META_WOOL_LIGHTGREEN); + tolua_constant(tolua_S,"E_META_WOOL_PINK",E_META_WOOL_PINK); + tolua_constant(tolua_S,"E_META_WOOL_GRAY",E_META_WOOL_GRAY); + tolua_constant(tolua_S,"E_META_WOOL_LIGHTGRAY",E_META_WOOL_LIGHTGRAY); + tolua_constant(tolua_S,"E_META_WOOL_CYAN",E_META_WOOL_CYAN); + tolua_constant(tolua_S,"E_META_WOOL_PURPLE",E_META_WOOL_PURPLE); + tolua_constant(tolua_S,"E_META_WOOL_BLUE",E_META_WOOL_BLUE); + tolua_constant(tolua_S,"E_META_WOOL_BROWN",E_META_WOOL_BROWN); + tolua_constant(tolua_S,"E_META_WOOL_GREEN",E_META_WOOL_GREEN); + tolua_constant(tolua_S,"E_META_WOOL_RED",E_META_WOOL_RED); + tolua_constant(tolua_S,"E_META_WOOL_BLACK",E_META_WOOL_BLACK); + tolua_constant(tolua_S,"E_META_TORCH_EAST",E_META_TORCH_EAST); + tolua_constant(tolua_S,"E_META_TORCH_WEST",E_META_TORCH_WEST); + tolua_constant(tolua_S,"E_META_TORCH_SOUTH",E_META_TORCH_SOUTH); + tolua_constant(tolua_S,"E_META_TORCH_NORTH",E_META_TORCH_NORTH); + tolua_constant(tolua_S,"E_META_TORCH_FLOOR",E_META_TORCH_FLOOR); + tolua_constant(tolua_S,"E_META_TORCH_XM",E_META_TORCH_XM); + tolua_constant(tolua_S,"E_META_TORCH_XP",E_META_TORCH_XP); + tolua_constant(tolua_S,"E_META_TORCH_ZM",E_META_TORCH_ZM); + tolua_constant(tolua_S,"E_META_TORCH_ZP",E_META_TORCH_ZP); tolua_constant(tolua_S,"E_META_CHEST_FACING_ZM",E_META_CHEST_FACING_ZM); tolua_constant(tolua_S,"E_META_CHEST_FACING_ZP",E_META_CHEST_FACING_ZP); tolua_constant(tolua_S,"E_META_CHEST_FACING_XM",E_META_CHEST_FACING_XM); tolua_constant(tolua_S,"E_META_CHEST_FACING_XP",E_META_CHEST_FACING_XP); - tolua_constant(tolua_S,"E_META_DISPENSER_FACING_YM",E_META_DISPENSER_FACING_YM); - tolua_constant(tolua_S,"E_META_DISPENSER_FACING_YP",E_META_DISPENSER_FACING_YP); - tolua_constant(tolua_S,"E_META_HOPPER_UNATTACHED",E_META_HOPPER_UNATTACHED); - tolua_constant(tolua_S,"E_META_DISPENSER_FACING_ZM",E_META_DISPENSER_FACING_ZM); - tolua_constant(tolua_S,"E_META_DISPENSER_FACING_ZP",E_META_DISPENSER_FACING_ZP); - tolua_constant(tolua_S,"E_META_DISPENSER_FACING_XM",E_META_DISPENSER_FACING_XM); - tolua_constant(tolua_S,"E_META_DISPENSER_FACING_XP",E_META_DISPENSER_FACING_XP); tolua_constant(tolua_S,"E_META_DOUBLE_STEP_STONE",E_META_DOUBLE_STEP_STONE); tolua_constant(tolua_S,"E_META_DOUBLE_STEP_SANDSTONE",E_META_DOUBLE_STEP_SANDSTONE); tolua_constant(tolua_S,"E_META_DOUBLE_STEP_WOODEN",E_META_DOUBLE_STEP_WOODEN); @@ -26862,28 +24615,6 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_constant(tolua_S,"E_META_DOUBLE_STEP_STONE_BRICK",E_META_DOUBLE_STEP_STONE_BRICK); tolua_constant(tolua_S,"E_META_DOUBLE_STEP_NETHER_BRICK",E_META_DOUBLE_STEP_NETHER_BRICK); tolua_constant(tolua_S,"E_META_DOUBLE_STEP_STONE_SECRET",E_META_DOUBLE_STEP_STONE_SECRET); - tolua_constant(tolua_S,"E_META_LEAVES_APPLE",E_META_LEAVES_APPLE); - tolua_constant(tolua_S,"E_META_LEAVES_CONIFER",E_META_LEAVES_CONIFER); - tolua_constant(tolua_S,"E_META_LEAVES_BIRCH",E_META_LEAVES_BIRCH); - tolua_constant(tolua_S,"E_META_LEAVES_JUNGLE",E_META_LEAVES_JUNGLE); - tolua_constant(tolua_S,"E_META_LOG_APPLE",E_META_LOG_APPLE); - tolua_constant(tolua_S,"E_META_LOG_CONIFER",E_META_LOG_CONIFER); - tolua_constant(tolua_S,"E_META_LOG_BIRCH",E_META_LOG_BIRCH); - tolua_constant(tolua_S,"E_META_LOG_JUNGLE",E_META_LOG_JUNGLE); - tolua_constant(tolua_S,"E_META_PLANKS_APPLE",E_META_PLANKS_APPLE); - tolua_constant(tolua_S,"E_META_PLANKS_CONIFER",E_META_PLANKS_CONIFER); - tolua_constant(tolua_S,"E_META_PLANKS_BIRCH",E_META_PLANKS_BIRCH); - tolua_constant(tolua_S,"E_META_PLANKS_JUNGLE",E_META_PLANKS_JUNGLE); - tolua_constant(tolua_S,"E_META_SANDSTONE_NORMAL",E_META_SANDSTONE_NORMAL); - tolua_constant(tolua_S,"E_META_SANDSTONE_ORNAMENT",E_META_SANDSTONE_ORNAMENT); - tolua_constant(tolua_S,"E_META_SANDSTONE_SMOOTH",E_META_SANDSTONE_SMOOTH); - tolua_constant(tolua_S,"E_META_SAPLING_APPLE",E_META_SAPLING_APPLE); - tolua_constant(tolua_S,"E_META_SAPLING_CONIFER",E_META_SAPLING_CONIFER); - tolua_constant(tolua_S,"E_META_SAPLING_BIRCH",E_META_SAPLING_BIRCH); - tolua_constant(tolua_S,"E_META_SAPLING_JUNGLE",E_META_SAPLING_JUNGLE); - tolua_constant(tolua_S,"E_META_SILVERFISH_EGG_STONE",E_META_SILVERFISH_EGG_STONE); - tolua_constant(tolua_S,"E_META_SILVERFISH_EGG_COBBLESTONE",E_META_SILVERFISH_EGG_COBBLESTONE); - tolua_constant(tolua_S,"E_META_SILVERFISH_EGG_STONE_BRICK",E_META_SILVERFISH_EGG_STONE_BRICK); tolua_constant(tolua_S,"E_META_STEP_STONE",E_META_STEP_STONE); tolua_constant(tolua_S,"E_META_STEP_SANDSTONE",E_META_STEP_SANDSTONE); tolua_constant(tolua_S,"E_META_STEP_PLANKS",E_META_STEP_PLANKS); @@ -26892,22 +24623,13 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_constant(tolua_S,"E_META_STEP_STONE_BRICK",E_META_STEP_STONE_BRICK); tolua_constant(tolua_S,"E_META_STEP_NETHER_BRICK",E_META_STEP_NETHER_BRICK); tolua_constant(tolua_S,"E_META_STEP_STONE_SECRET",E_META_STEP_STONE_SECRET); + tolua_constant(tolua_S,"E_META_SILVERFISH_EGG_STONE",E_META_SILVERFISH_EGG_STONE); + tolua_constant(tolua_S,"E_META_SILVERFISH_EGG_COBBLESTONE",E_META_SILVERFISH_EGG_COBBLESTONE); + tolua_constant(tolua_S,"E_META_SILVERFISH_EGG_STONE_BRICK",E_META_SILVERFISH_EGG_STONE_BRICK); tolua_constant(tolua_S,"E_META_STONE_BRICK_NORMAL",E_META_STONE_BRICK_NORMAL); tolua_constant(tolua_S,"E_META_STONE_BRICK_MOSSY",E_META_STONE_BRICK_MOSSY); tolua_constant(tolua_S,"E_META_STONE_BRICK_CRACKED",E_META_STONE_BRICK_CRACKED); tolua_constant(tolua_S,"E_META_STONE_BRICK_ORNAMENT",E_META_STONE_BRICK_ORNAMENT); - tolua_constant(tolua_S,"E_META_TALL_GRASS_DEAD_SHRUB",E_META_TALL_GRASS_DEAD_SHRUB); - tolua_constant(tolua_S,"E_META_TALL_GRASS_GRASS",E_META_TALL_GRASS_GRASS); - tolua_constant(tolua_S,"E_META_TALL_GRASS_FERN",E_META_TALL_GRASS_FERN); - tolua_constant(tolua_S,"E_META_TORCH_EAST",E_META_TORCH_EAST); - tolua_constant(tolua_S,"E_META_TORCH_WEST",E_META_TORCH_WEST); - tolua_constant(tolua_S,"E_META_TORCH_SOUTH",E_META_TORCH_SOUTH); - tolua_constant(tolua_S,"E_META_TORCH_NORTH",E_META_TORCH_NORTH); - tolua_constant(tolua_S,"E_META_TORCH_FLOOR",E_META_TORCH_FLOOR); - tolua_constant(tolua_S,"E_META_TORCH_XM",E_META_TORCH_XM); - tolua_constant(tolua_S,"E_META_TORCH_XP",E_META_TORCH_XP); - tolua_constant(tolua_S,"E_META_TORCH_ZM",E_META_TORCH_ZM); - tolua_constant(tolua_S,"E_META_TORCH_ZP",E_META_TORCH_ZP); tolua_constant(tolua_S,"E_BLOCK_WOODEN_DOUBLE_STEP_APPLE",E_BLOCK_WOODEN_DOUBLE_STEP_APPLE); tolua_constant(tolua_S,"E_BLOCK_WOODEN_DOUBLE_STEP_CONIFER",E_BLOCK_WOODEN_DOUBLE_STEP_CONIFER); tolua_constant(tolua_S,"E_BLOCK_WOODEN_DOUBLE_STEP_BIRCH",E_BLOCK_WOODEN_DOUBLE_STEP_BIRCH); @@ -26916,24 +24638,12 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_constant(tolua_S,"E_BLOCK_WOODEN_STEP_CONIFER",E_BLOCK_WOODEN_STEP_CONIFER); tolua_constant(tolua_S,"E_BLOCK_WOODEN_STEP_BIRCH",E_BLOCK_WOODEN_STEP_BIRCH); tolua_constant(tolua_S,"E_BLOCK_WOODEN_STEP_JUNGLE",E_BLOCK_WOODEN_STEP_JUNGLE); - tolua_constant(tolua_S,"E_META_WOOL_WHITE",E_META_WOOL_WHITE); - tolua_constant(tolua_S,"E_META_WOOL_ORANGE",E_META_WOOL_ORANGE); - tolua_constant(tolua_S,"E_META_WOOL_MAGENTA",E_META_WOOL_MAGENTA); - tolua_constant(tolua_S,"E_META_WOOL_LIGHTBLUE",E_META_WOOL_LIGHTBLUE); - tolua_constant(tolua_S,"E_META_WOOL_YELLOW",E_META_WOOL_YELLOW); - tolua_constant(tolua_S,"E_META_WOOL_LIGHTGREEN",E_META_WOOL_LIGHTGREEN); - tolua_constant(tolua_S,"E_META_WOOL_PINK",E_META_WOOL_PINK); - tolua_constant(tolua_S,"E_META_WOOL_GRAY",E_META_WOOL_GRAY); - tolua_constant(tolua_S,"E_META_WOOL_LIGHTGRAY",E_META_WOOL_LIGHTGRAY); - tolua_constant(tolua_S,"E_META_WOOL_CYAN",E_META_WOOL_CYAN); - tolua_constant(tolua_S,"E_META_WOOL_PURPLE",E_META_WOOL_PURPLE); - tolua_constant(tolua_S,"E_META_WOOL_BLUE",E_META_WOOL_BLUE); - tolua_constant(tolua_S,"E_META_WOOL_BROWN",E_META_WOOL_BROWN); - tolua_constant(tolua_S,"E_META_WOOL_GREEN",E_META_WOOL_GREEN); - tolua_constant(tolua_S,"E_META_WOOL_RED",E_META_WOOL_RED); - tolua_constant(tolua_S,"E_META_WOOL_BLACK",E_META_WOOL_BLACK); tolua_constant(tolua_S,"E_META_COAL_NORMAL",E_META_COAL_NORMAL); tolua_constant(tolua_S,"E_META_COAL_CHARCOAL",E_META_COAL_CHARCOAL); + tolua_constant(tolua_S,"E_META_GOLDEN_APPLE_NORMAL",E_META_GOLDEN_APPLE_NORMAL); + tolua_constant(tolua_S,"E_META_GOLDEN_APPLE_ENCHANTED",E_META_GOLDEN_APPLE_ENCHANTED); + tolua_constant(tolua_S,"E_META_TRACKS_X",E_META_TRACKS_X); + tolua_constant(tolua_S,"E_META_TRACKS_Z",E_META_TRACKS_Z); tolua_constant(tolua_S,"E_META_DYE_BLACK",E_META_DYE_BLACK); tolua_constant(tolua_S,"E_META_DYE_RED",E_META_DYE_RED); tolua_constant(tolua_S,"E_META_DYE_GREEN",E_META_DYE_GREEN); @@ -26950,10 +24660,6 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_constant(tolua_S,"E_META_DYE_MAGENTA",E_META_DYE_MAGENTA); tolua_constant(tolua_S,"E_META_DYE_ORANGE",E_META_DYE_ORANGE); tolua_constant(tolua_S,"E_META_DYE_WHITE",E_META_DYE_WHITE); - tolua_constant(tolua_S,"E_META_GOLDEN_APPLE_NORMAL",E_META_GOLDEN_APPLE_NORMAL); - tolua_constant(tolua_S,"E_META_GOLDEN_APPLE_ENCHANTED",E_META_GOLDEN_APPLE_ENCHANTED); - tolua_constant(tolua_S,"E_META_TRACKS_X",E_META_TRACKS_X); - tolua_constant(tolua_S,"E_META_TRACKS_Z",E_META_TRACKS_Z); tolua_constant(tolua_S,"E_META_SPAWN_EGG_CREEPER",E_META_SPAWN_EGG_CREEPER); tolua_constant(tolua_S,"E_META_SPAWN_EGG_SKELETON",E_META_SPAWN_EGG_SKELETON); tolua_constant(tolua_S,"E_META_SPAWN_EGG_SPIDER",E_META_SPAWN_EGG_SPIDER); @@ -27087,7 +24793,6 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_function(tolua_S,"IsChestPlate",tolua_AllToLua_ItemCategory_IsChestPlate00); tolua_function(tolua_S,"IsLeggings",tolua_AllToLua_ItemCategory_IsLeggings00); tolua_function(tolua_S,"IsBoots",tolua_AllToLua_ItemCategory_IsBoots00); - tolua_function(tolua_S,"IsArmor",tolua_AllToLua_ItemCategory_IsArmor00); tolua_endmodule(tolua_S); tolua_function(tolua_S,"GetTime",tolua_AllToLua_GetTime00); tolua_function(tolua_S,"GetChar",tolua_AllToLua_GetChar00); @@ -27129,6 +24834,7 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_beginmodule(tolua_S,"cClientHandle"); tolua_function(tolua_S,"GetPlayer",tolua_AllToLua_cClientHandle_GetPlayer00); tolua_function(tolua_S,"Kick",tolua_AllToLua_cClientHandle_Kick00); + tolua_function(tolua_S,"SendBlockChange",tolua_AllToLua_cClientHandle_SendBlockChange00); tolua_function(tolua_S,"GetUsername",tolua_AllToLua_cClientHandle_GetUsername00); tolua_function(tolua_S,"SetUsername",tolua_AllToLua_cClientHandle_SetUsername00); tolua_function(tolua_S,"GetPing",tolua_AllToLua_cClientHandle_GetPing00); @@ -27168,7 +24874,6 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_function(tolua_S,"GetParentClass",tolua_AllToLua_cEntity_GetParentClass00); tolua_function(tolua_S,"GetWorld",tolua_AllToLua_cEntity_GetWorld00); tolua_function(tolua_S,"GetHeadYaw",tolua_AllToLua_cEntity_GetHeadYaw00); - tolua_function(tolua_S,"GetHeight",tolua_AllToLua_cEntity_GetHeight00); tolua_function(tolua_S,"GetMass",tolua_AllToLua_cEntity_GetMass00); tolua_function(tolua_S,"GetPosition",tolua_AllToLua_cEntity_GetPosition00); tolua_function(tolua_S,"GetPosX",tolua_AllToLua_cEntity_GetPosX00); @@ -27183,11 +24888,9 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_function(tolua_S,"GetSpeedX",tolua_AllToLua_cEntity_GetSpeedX00); tolua_function(tolua_S,"GetSpeedY",tolua_AllToLua_cEntity_GetSpeedY00); tolua_function(tolua_S,"GetSpeedZ",tolua_AllToLua_cEntity_GetSpeedZ00); - tolua_function(tolua_S,"GetWidth",tolua_AllToLua_cEntity_GetWidth00); tolua_function(tolua_S,"GetChunkX",tolua_AllToLua_cEntity_GetChunkX00); tolua_function(tolua_S,"GetChunkZ",tolua_AllToLua_cEntity_GetChunkZ00); tolua_function(tolua_S,"SetHeadYaw",tolua_AllToLua_cEntity_SetHeadYaw00); - tolua_function(tolua_S,"SetHeight",tolua_AllToLua_cEntity_SetHeight00); tolua_function(tolua_S,"SetMass",tolua_AllToLua_cEntity_SetMass00); tolua_function(tolua_S,"SetPosX",tolua_AllToLua_cEntity_SetPosX00); tolua_function(tolua_S,"SetPosY",tolua_AllToLua_cEntity_SetPosY00); @@ -27203,7 +24906,6 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_function(tolua_S,"SetSpeedX",tolua_AllToLua_cEntity_SetSpeedX00); tolua_function(tolua_S,"SetSpeedY",tolua_AllToLua_cEntity_SetSpeedY00); tolua_function(tolua_S,"SetSpeedZ",tolua_AllToLua_cEntity_SetSpeedZ00); - tolua_function(tolua_S,"SetWidth",tolua_AllToLua_cEntity_SetWidth00); tolua_function(tolua_S,"AddPosX",tolua_AllToLua_cEntity_AddPosX00); tolua_function(tolua_S,"AddPosY",tolua_AllToLua_cEntity_AddPosY00); tolua_function(tolua_S,"AddPosZ",tolua_AllToLua_cEntity_AddPosZ00); @@ -27328,9 +25030,6 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_function(tolua_S,"SetLastBlockActionTime",tolua_AllToLua_cPlayer_SetLastBlockActionTime00); tolua_function(tolua_S,"SetGameMode",tolua_AllToLua_cPlayer_SetGameMode00); tolua_function(tolua_S,"MoveTo",tolua_AllToLua_cPlayer_MoveTo00); - tolua_function(tolua_S,"GetWindow",tolua_AllToLua_cPlayer_GetWindow00); - tolua_function(tolua_S,"CloseWindow",tolua_AllToLua_cPlayer_CloseWindow00); - tolua_function(tolua_S,"CloseWindowIfID",tolua_AllToLua_cPlayer_CloseWindowIfID00); tolua_function(tolua_S,"GetClientHandle",tolua_AllToLua_cPlayer_GetClientHandle00); tolua_function(tolua_S,"SendMessage",tolua_AllToLua_cPlayer_SendMessage00); tolua_function(tolua_S,"GetName",tolua_AllToLua_cPlayer_GetName00); @@ -27441,8 +25140,10 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_constant(tolua_S,"dimEnd",cWorld::dimEnd); tolua_function(tolua_S,"GetClassStatic",tolua_AllToLua_cWorld_GetClassStatic00); tolua_function(tolua_S,"GetTime",tolua_AllToLua_cWorld_GetTime00); + tolua_function(tolua_S,"GetTicksUntilWeatherChange",tolua_AllToLua_cWorld_GetTicksUntilWeatherChange00); tolua_function(tolua_S,"GetWorldAge",tolua_AllToLua_cWorld_GetWorldAge00); tolua_function(tolua_S,"GetTimeOfDay",tolua_AllToLua_cWorld_GetTimeOfDay00); + tolua_function(tolua_S,"SetTicksUntilWeatherChange",tolua_AllToLua_cWorld_SetTicksUntilWeatherChange00); tolua_function(tolua_S,"SetTimeOfDay",tolua_AllToLua_cWorld_SetTimeOfDay00); tolua_function(tolua_S,"SetWorldTime",tolua_AllToLua_cWorld_SetWorldTime00); tolua_function(tolua_S,"GetGameMode",tolua_AllToLua_cWorld_GetGameMode00); @@ -27453,6 +25154,8 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_function(tolua_S,"UnloadUnusedChunks",tolua_AllToLua_cWorld_UnloadUnusedChunks00); tolua_function(tolua_S,"GetMaxPlayers",tolua_AllToLua_cWorld_GetMaxPlayers00); tolua_function(tolua_S,"SetMaxPlayers",tolua_AllToLua_cWorld_SetMaxPlayers00); + tolua_function(tolua_S,"AddPlayer",tolua_AllToLua_cWorld_AddPlayer00); + tolua_function(tolua_S,"RemovePlayer",tolua_AllToLua_cWorld_RemovePlayer00); tolua_function(tolua_S,"GetNumPlayers",tolua_AllToLua_cWorld_GetNumPlayers00); tolua_function(tolua_S,"UpdateSign",tolua_AllToLua_cWorld_UpdateSign00); tolua_function(tolua_S,"RegenerateChunk",tolua_AllToLua_cWorld_RegenerateChunk00); @@ -27504,88 +25207,22 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_function(tolua_S,"IsBlockDirectlyWatered",tolua_AllToLua_cWorld_IsBlockDirectlyWatered00); tolua_function(tolua_S,"SpawnMob",tolua_AllToLua_cWorld_SpawnMob00); tolua_endmodule(tolua_S); - tolua_cclass(tolua_S,"cInventory","cInventory","cItemGrid::cListener",NULL); + tolua_cclass(tolua_S,"cInventory","cInventory","",NULL); tolua_beginmodule(tolua_S,"cInventory"); - tolua_constant(tolua_S,"invArmorCount",cInventory::invArmorCount); - tolua_constant(tolua_S,"invInventoryCount",cInventory::invInventoryCount); - tolua_constant(tolua_S,"invHotbarCount",cInventory::invHotbarCount); - tolua_constant(tolua_S,"invArmorOffset",cInventory::invArmorOffset); - tolua_constant(tolua_S,"invInventoryOffset",cInventory::invInventoryOffset); - tolua_constant(tolua_S,"invHotbarOffset",cInventory::invHotbarOffset); - tolua_constant(tolua_S,"invNumSlots",cInventory::invNumSlots); tolua_function(tolua_S,"Clear",tolua_AllToLua_cInventory_Clear00); - tolua_function(tolua_S,"HowManyCanFit",tolua_AllToLua_cInventory_HowManyCanFit00); - tolua_function(tolua_S,"HowManyCanFit",tolua_AllToLua_cInventory_HowManyCanFit01); tolua_function(tolua_S,"AddItem",tolua_AllToLua_cInventory_AddItem00); - tolua_function(tolua_S,"AddItems",tolua_AllToLua_cInventory_AddItems00); - tolua_function(tolua_S,"RemoveOneEquippedItem",tolua_AllToLua_cInventory_RemoveOneEquippedItem00); - tolua_function(tolua_S,"HowManyItems",tolua_AllToLua_cInventory_HowManyItems00); - tolua_function(tolua_S,"HasItems",tolua_AllToLua_cInventory_HasItems00); - tolua_function(tolua_S,"GetArmorGrid",tolua_AllToLua_cInventory_GetArmorGrid00); - tolua_function(tolua_S,"GetInventoryGrid",tolua_AllToLua_cInventory_GetInventoryGrid00); - tolua_function(tolua_S,"GetHotbarGrid",tolua_AllToLua_cInventory_GetHotbarGrid00); - tolua_function(tolua_S,"GetOwner",tolua_AllToLua_cInventory_GetOwner00); - tolua_function(tolua_S,"CopyToItems",tolua_AllToLua_cInventory_CopyToItems00); + tolua_function(tolua_S,"AddItemAnyAmount",tolua_AllToLua_cInventory_AddItemAnyAmount00); + tolua_function(tolua_S,"RemoveItem",tolua_AllToLua_cInventory_RemoveItem00); tolua_function(tolua_S,"GetSlot",tolua_AllToLua_cInventory_GetSlot00); - tolua_function(tolua_S,"GetArmorSlot",tolua_AllToLua_cInventory_GetArmorSlot00); - tolua_function(tolua_S,"GetInventorySlot",tolua_AllToLua_cInventory_GetInventorySlot00); - tolua_function(tolua_S,"GetHotbarSlot",tolua_AllToLua_cInventory_GetHotbarSlot00); + tolua_function(tolua_S,"GetFromHotBar",tolua_AllToLua_cInventory_GetFromHotBar00); tolua_function(tolua_S,"GetEquippedItem",tolua_AllToLua_cInventory_GetEquippedItem00); - tolua_function(tolua_S,"SetSlot",tolua_AllToLua_cInventory_SetSlot00); - tolua_function(tolua_S,"SetArmorSlot",tolua_AllToLua_cInventory_SetArmorSlot00); - tolua_function(tolua_S,"SetInventorySlot",tolua_AllToLua_cInventory_SetInventorySlot00); - tolua_function(tolua_S,"SetHotbarSlot",tolua_AllToLua_cInventory_SetHotbarSlot00); - tolua_function(tolua_S,"SetEquippedSlotNum",tolua_AllToLua_cInventory_SetEquippedSlotNum00); - tolua_function(tolua_S,"GetEquippedSlotNum",tolua_AllToLua_cInventory_GetEquippedSlotNum00); - tolua_function(tolua_S,"DamageItem",tolua_AllToLua_cInventory_DamageItem00); - tolua_function(tolua_S,"DamageEquippedItem",tolua_AllToLua_cInventory_DamageEquippedItem00); + tolua_function(tolua_S,"SetEquippedSlot",tolua_AllToLua_cInventory_SetEquippedSlot00); + tolua_function(tolua_S,"GetEquippedSlot",tolua_AllToLua_cInventory_GetEquippedSlot00); tolua_function(tolua_S,"GetEquippedHelmet",tolua_AllToLua_cInventory_GetEquippedHelmet00); tolua_function(tolua_S,"GetEquippedChestplate",tolua_AllToLua_cInventory_GetEquippedChestplate00); tolua_function(tolua_S,"GetEquippedLeggings",tolua_AllToLua_cInventory_GetEquippedLeggings00); tolua_function(tolua_S,"GetEquippedBoots",tolua_AllToLua_cInventory_GetEquippedBoots00); - tolua_endmodule(tolua_S); - #ifdef __cplusplus - tolua_cclass(tolua_S,"cEnchantments","cEnchantments","",tolua_collect_cEnchantments); - #else - tolua_cclass(tolua_S,"cEnchantments","cEnchantments","",NULL); - #endif - tolua_beginmodule(tolua_S,"cEnchantments"); - tolua_constant(tolua_S,"enchProtection",cEnchantments::enchProtection); - tolua_constant(tolua_S,"enchFireProtection",cEnchantments::enchFireProtection); - tolua_constant(tolua_S,"enchFeatherFalling",cEnchantments::enchFeatherFalling); - tolua_constant(tolua_S,"enchBlastProtection",cEnchantments::enchBlastProtection); - tolua_constant(tolua_S,"enchProjectileProtection",cEnchantments::enchProjectileProtection); - tolua_constant(tolua_S,"enchRespiration",cEnchantments::enchRespiration); - tolua_constant(tolua_S,"enchAquaAffinity",cEnchantments::enchAquaAffinity); - tolua_constant(tolua_S,"enchThorns",cEnchantments::enchThorns); - tolua_constant(tolua_S,"enchSharpness",cEnchantments::enchSharpness); - tolua_constant(tolua_S,"enchSmite",cEnchantments::enchSmite); - tolua_constant(tolua_S,"enchBaneOfArthropods",cEnchantments::enchBaneOfArthropods); - tolua_constant(tolua_S,"enchKnockback",cEnchantments::enchKnockback); - tolua_constant(tolua_S,"enchFireAspect",cEnchantments::enchFireAspect); - tolua_constant(tolua_S,"enchLooting",cEnchantments::enchLooting); - tolua_constant(tolua_S,"enchEfficiency",cEnchantments::enchEfficiency); - tolua_constant(tolua_S,"enchSilkTouch",cEnchantments::enchSilkTouch); - tolua_constant(tolua_S,"enchUnbreaking",cEnchantments::enchUnbreaking); - tolua_constant(tolua_S,"enchFortune",cEnchantments::enchFortune); - tolua_constant(tolua_S,"enchPower",cEnchantments::enchPower); - tolua_constant(tolua_S,"enchPunch",cEnchantments::enchPunch); - tolua_constant(tolua_S,"enchFlame",cEnchantments::enchFlame); - tolua_constant(tolua_S,"enchInfinity",cEnchantments::enchInfinity); - tolua_function(tolua_S,"new",tolua_AllToLua_cEnchantments_new00); - tolua_function(tolua_S,"new_local",tolua_AllToLua_cEnchantments_new00_local); - tolua_function(tolua_S,".call",tolua_AllToLua_cEnchantments_new00_local); - tolua_function(tolua_S,"new",tolua_AllToLua_cEnchantments_new01); - tolua_function(tolua_S,"new_local",tolua_AllToLua_cEnchantments_new01_local); - tolua_function(tolua_S,".call",tolua_AllToLua_cEnchantments_new01_local); - tolua_function(tolua_S,"AddFromString",tolua_AllToLua_cEnchantments_AddFromString00); - tolua_function(tolua_S,"ToString",tolua_AllToLua_cEnchantments_ToString00); - tolua_function(tolua_S,"GetLevel",tolua_AllToLua_cEnchantments_GetLevel00); - 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_function(tolua_S,".eq",tolua_AllToLua_cEnchantments__eq00); + tolua_function(tolua_S,"SendSlot",tolua_AllToLua_cInventory_SendSlot00); tolua_endmodule(tolua_S); #ifdef __cplusplus tolua_cclass(tolua_S,"cItem","cItem","",tolua_collect_cItem); @@ -27596,15 +25233,6 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_function(tolua_S,"new",tolua_AllToLua_cItem_new00); tolua_function(tolua_S,"new_local",tolua_AllToLua_cItem_new00_local); tolua_function(tolua_S,".call",tolua_AllToLua_cItem_new00_local); - tolua_function(tolua_S,"new",tolua_AllToLua_cItem_new01); - tolua_function(tolua_S,"new_local",tolua_AllToLua_cItem_new01_local); - tolua_function(tolua_S,".call",tolua_AllToLua_cItem_new01_local); - tolua_function(tolua_S,"new",tolua_AllToLua_cItem_new02); - tolua_function(tolua_S,"new_local",tolua_AllToLua_cItem_new02_local); - tolua_function(tolua_S,".call",tolua_AllToLua_cItem_new02_local); - tolua_function(tolua_S,"new",tolua_AllToLua_cItem_new03); - tolua_function(tolua_S,"new_local",tolua_AllToLua_cItem_new03_local); - tolua_function(tolua_S,".call",tolua_AllToLua_cItem_new03_local); tolua_function(tolua_S,"Empty",tolua_AllToLua_cItem_Empty00); tolua_function(tolua_S,"Clear",tolua_AllToLua_cItem_Clear00); tolua_function(tolua_S,"IsEmpty",tolua_AllToLua_cItem_IsEmpty00); @@ -27619,7 +25247,6 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_variable(tolua_S,"m_ItemType",tolua_get_cItem_m_ItemType,tolua_set_cItem_m_ItemType); tolua_variable(tolua_S,"m_ItemCount",tolua_get_cItem_m_ItemCount,tolua_set_cItem_m_ItemCount); tolua_variable(tolua_S,"m_ItemDamage",tolua_get_cItem_m_ItemDamage,tolua_set_cItem_m_ItemDamage); - tolua_variable(tolua_S,"m_Enchantments",tolua_get_cItem_m_Enchantments,tolua_set_cItem_m_Enchantments); tolua_endmodule(tolua_S); #ifdef __cplusplus tolua_cclass(tolua_S,"cItems","cItems","",tolua_collect_cItems); @@ -27636,8 +25263,8 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_function(tolua_S,"Delete",tolua_AllToLua_cItems_Delete00); tolua_function(tolua_S,"Clear",tolua_AllToLua_cItems_Clear00); tolua_function(tolua_S,"Size",tolua_AllToLua_cItems_Size00); - tolua_function(tolua_S,"Set",tolua_AllToLua_cItems_Set01); tolua_function(tolua_S,"Add",tolua_AllToLua_cItems_Add01); + tolua_function(tolua_S,"Set",tolua_AllToLua_cItems_Set01); tolua_endmodule(tolua_S); tolua_cclass(tolua_S,"cItemGrid","cItemGrid","",NULL); tolua_beginmodule(tolua_S,"cItemGrid"); @@ -27647,97 +25274,47 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_function(tolua_S,"GetSlotNum",tolua_AllToLua_cItemGrid_GetSlotNum00); tolua_function(tolua_S,"GetSlot",tolua_AllToLua_cItemGrid_GetSlot00); tolua_function(tolua_S,"GetSlot",tolua_AllToLua_cItemGrid_GetSlot01); + tolua_function(tolua_S,"GetSlot",tolua_AllToLua_cItemGrid_GetSlot02); + tolua_function(tolua_S,"GetSlot",tolua_AllToLua_cItemGrid_GetSlot03); tolua_function(tolua_S,"SetSlot",tolua_AllToLua_cItemGrid_SetSlot00); tolua_function(tolua_S,"SetSlot",tolua_AllToLua_cItemGrid_SetSlot01); tolua_function(tolua_S,"SetSlot",tolua_AllToLua_cItemGrid_SetSlot02); tolua_function(tolua_S,"SetSlot",tolua_AllToLua_cItemGrid_SetSlot03); - tolua_function(tolua_S,"EmptySlot",tolua_AllToLua_cItemGrid_EmptySlot00); - tolua_function(tolua_S,"EmptySlot",tolua_AllToLua_cItemGrid_EmptySlot01); tolua_function(tolua_S,"Clear",tolua_AllToLua_cItemGrid_Clear00); tolua_function(tolua_S,"HowManyCanFit",tolua_AllToLua_cItemGrid_HowManyCanFit00); tolua_function(tolua_S,"AddItem",tolua_AllToLua_cItemGrid_AddItem00); tolua_function(tolua_S,"AddItems",tolua_AllToLua_cItemGrid_AddItems00); - tolua_function(tolua_S,"ChangeSlotCount",tolua_AllToLua_cItemGrid_ChangeSlotCount00); - tolua_function(tolua_S,"ChangeSlotCount",tolua_AllToLua_cItemGrid_ChangeSlotCount01); - tolua_function(tolua_S,"RemoveOneItem",tolua_AllToLua_cItemGrid_RemoveOneItem00); - tolua_function(tolua_S,"RemoveOneItem",tolua_AllToLua_cItemGrid_RemoveOneItem01); - tolua_function(tolua_S,"HowManyItems",tolua_AllToLua_cItemGrid_HowManyItems00); - tolua_function(tolua_S,"HasItems",tolua_AllToLua_cItemGrid_HasItems00); tolua_function(tolua_S,"GetFirstEmptySlot",tolua_AllToLua_cItemGrid_GetFirstEmptySlot00); - tolua_function(tolua_S,"GetFirstUsedSlot",tolua_AllToLua_cItemGrid_GetFirstUsedSlot00); tolua_function(tolua_S,"GetLastEmptySlot",tolua_AllToLua_cItemGrid_GetLastEmptySlot00); - tolua_function(tolua_S,"GetLastUsedSlot",tolua_AllToLua_cItemGrid_GetLastUsedSlot00); tolua_function(tolua_S,"GetNextEmptySlot",tolua_AllToLua_cItemGrid_GetNextEmptySlot00); - tolua_function(tolua_S,"GetNextUsedSlot",tolua_AllToLua_cItemGrid_GetNextUsedSlot00); tolua_function(tolua_S,"CopyToItems",tolua_AllToLua_cItemGrid_CopyToItems00); - tolua_function(tolua_S,"DamageItem",tolua_AllToLua_cItemGrid_DamageItem00); - tolua_function(tolua_S,"DamageItem",tolua_AllToLua_cItemGrid_DamageItem01); - tolua_endmodule(tolua_S); - #ifdef __cplusplus - tolua_cclass(tolua_S,"cBlockEntity","cBlockEntity","",tolua_collect_cBlockEntity); - #else - tolua_cclass(tolua_S,"cBlockEntity","cBlockEntity","",NULL); - #endif - tolua_beginmodule(tolua_S,"cBlockEntity"); - tolua_function(tolua_S,"GetPosX",tolua_AllToLua_cBlockEntity_GetPosX00); - tolua_function(tolua_S,"GetPosY",tolua_AllToLua_cBlockEntity_GetPosY00); - tolua_function(tolua_S,"GetPosZ",tolua_AllToLua_cBlockEntity_GetPosZ00); - tolua_function(tolua_S,"GetBlockType",tolua_AllToLua_cBlockEntity_GetBlockType00); - tolua_function(tolua_S,"GetWorld",tolua_AllToLua_cBlockEntity_GetWorld00); - tolua_function(tolua_S,"GetChunkX",tolua_AllToLua_cBlockEntity_GetChunkX00); - tolua_function(tolua_S,"GetChunkZ",tolua_AllToLua_cBlockEntity_GetChunkZ00); - tolua_function(tolua_S,"GetRelX",tolua_AllToLua_cBlockEntity_GetRelX00); - tolua_function(tolua_S,"GetRelZ",tolua_AllToLua_cBlockEntity_GetRelZ00); - tolua_endmodule(tolua_S); - tolua_cclass(tolua_S,"cBlockEntityWithItems","cBlockEntityWithItems","cBlockEntity",NULL); - tolua_beginmodule(tolua_S,"cBlockEntityWithItems"); - tolua_function(tolua_S,"GetSlot",tolua_AllToLua_cBlockEntityWithItems_GetSlot00); - tolua_function(tolua_S,"GetSlot",tolua_AllToLua_cBlockEntityWithItems_GetSlot01); - tolua_function(tolua_S,"SetSlot",tolua_AllToLua_cBlockEntityWithItems_SetSlot00); - tolua_function(tolua_S,"SetSlot",tolua_AllToLua_cBlockEntityWithItems_SetSlot01); - tolua_function(tolua_S,"GetContents",tolua_AllToLua_cBlockEntityWithItems_GetContents00); tolua_endmodule(tolua_S); #ifdef __cplusplus - tolua_cclass(tolua_S,"cChestEntity","cChestEntity","cBlockEntityWithItems",tolua_collect_cChestEntity); + tolua_cclass(tolua_S,"cChestEntity","cChestEntity","cBlockEntity",tolua_collect_cChestEntity); #else - tolua_cclass(tolua_S,"cChestEntity","cChestEntity","cBlockEntityWithItems",NULL); + tolua_cclass(tolua_S,"cChestEntity","cChestEntity","cBlockEntity",NULL); #endif tolua_beginmodule(tolua_S,"cChestEntity"); - tolua_constant(tolua_S,"ContentsHeight",cChestEntity::ContentsHeight); - tolua_constant(tolua_S,"ContentsWidth",cChestEntity::ContentsWidth); tolua_function(tolua_S,"new",tolua_AllToLua_cChestEntity_new00); tolua_function(tolua_S,"new_local",tolua_AllToLua_cChestEntity_new00_local); tolua_function(tolua_S,".call",tolua_AllToLua_cChestEntity_new00_local); + tolua_function(tolua_S,"GetSlot",tolua_AllToLua_cChestEntity_GetSlot00); + tolua_function(tolua_S,"SetSlot",tolua_AllToLua_cChestEntity_SetSlot00); + tolua_function(tolua_S,"UsedBy",tolua_AllToLua_cChestEntity_UsedBy00); + tolua_function(tolua_S,"GetContents",tolua_AllToLua_cChestEntity_GetContents00); tolua_variable(tolua_S,"__cBlockEntityWindowOwner__",tolua_get_cChestEntity___cBlockEntityWindowOwner__,NULL); tolua_endmodule(tolua_S); - tolua_cclass(tolua_S,"cDropSpenserEntity","cDropSpenserEntity","cBlockEntityWithItems",NULL); - tolua_beginmodule(tolua_S,"cDropSpenserEntity"); - tolua_constant(tolua_S,"ContentsHeight",cDropSpenserEntity::ContentsHeight); - tolua_constant(tolua_S,"ContentsWidth",cDropSpenserEntity::ContentsWidth); - tolua_function(tolua_S,"AddDropSpenserDir",tolua_AllToLua_cDropSpenserEntity_AddDropSpenserDir00); - tolua_function(tolua_S,"Activate",tolua_AllToLua_cDropSpenserEntity_Activate00); - tolua_function(tolua_S,"SetRedstonePower",tolua_AllToLua_cDropSpenserEntity_SetRedstonePower00); - tolua_variable(tolua_S,"__cBlockEntityWindowOwner__",tolua_get_cDropSpenserEntity___cBlockEntityWindowOwner__,NULL); - tolua_endmodule(tolua_S); - #ifdef __cplusplus - tolua_cclass(tolua_S,"cDispenserEntity","cDispenserEntity","cDropSpenserEntity",tolua_collect_cDispenserEntity); - #else - tolua_cclass(tolua_S,"cDispenserEntity","cDispenserEntity","cDropSpenserEntity",NULL); - #endif - tolua_beginmodule(tolua_S,"cDispenserEntity"); - tolua_function(tolua_S,"new",tolua_AllToLua_cDispenserEntity_new00); - tolua_function(tolua_S,"new_local",tolua_AllToLua_cDispenserEntity_new00_local); - tolua_function(tolua_S,".call",tolua_AllToLua_cDispenserEntity_new00_local); - tolua_endmodule(tolua_S); #ifdef __cplusplus - tolua_cclass(tolua_S,"cDropperEntity","cDropperEntity","cDropSpenserEntity",tolua_collect_cDropperEntity); + tolua_cclass(tolua_S,"Lua__cChestEntity","Lua__cChestEntity","cChestEntity",tolua_collect_Lua__cChestEntity); #else - tolua_cclass(tolua_S,"cDropperEntity","cDropperEntity","cDropSpenserEntity",NULL); + tolua_cclass(tolua_S,"Lua__cChestEntity","Lua__cChestEntity","cChestEntity",NULL); #endif - tolua_beginmodule(tolua_S,"cDropperEntity"); - tolua_function(tolua_S,"new",tolua_AllToLua_cDropperEntity_new00); - tolua_function(tolua_S,"new_local",tolua_AllToLua_cDropperEntity_new00_local); - tolua_function(tolua_S,".call",tolua_AllToLua_cDropperEntity_new00_local); + tolua_beginmodule(tolua_S,"Lua__cChestEntity"); + tolua_function(tolua_S,"tolua__set_instance",tolua_AllToLua_Lua__cChestEntity_tolua__set_instance00); + tolua_function(tolua_S,"cChestEntity__UsedBy",tolua_AllToLua_Lua__cChestEntity_cChestEntity__UsedBy00); + tolua_function(tolua_S,"new",tolua_AllToLua_Lua__cChestEntity_new00); + tolua_function(tolua_S,"new_local",tolua_AllToLua_Lua__cChestEntity_new00_local); + tolua_function(tolua_S,".call",tolua_AllToLua_Lua__cChestEntity_new00_local); tolua_endmodule(tolua_S); tolua_cclass(tolua_S,"HTTPFormData","HTTPFormData","",NULL); tolua_beginmodule(tolua_S,"HTTPFormData"); @@ -28119,42 +25696,6 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_function(tolua_S,"ConsumeIngredients",tolua_AllToLua_cCraftingRecipe_ConsumeIngredients00); tolua_function(tolua_S,"Dump",tolua_AllToLua_cCraftingRecipe_Dump00); tolua_endmodule(tolua_S); - tolua_cclass(tolua_S,"cWindow","cWindow","",NULL); - tolua_beginmodule(tolua_S,"cWindow"); - tolua_constant(tolua_S,"Inventory",cWindow::Inventory); - tolua_constant(tolua_S,"Chest",cWindow::Chest); - tolua_constant(tolua_S,"Workbench",cWindow::Workbench); - tolua_constant(tolua_S,"Furnace",cWindow::Furnace); - tolua_constant(tolua_S,"DropSpenser",cWindow::DropSpenser); - tolua_constant(tolua_S,"Enchantment",cWindow::Enchantment); - tolua_constant(tolua_S,"Brewery",cWindow::Brewery); - tolua_constant(tolua_S,"NPCTrade",cWindow::NPCTrade); - tolua_constant(tolua_S,"Beacon",cWindow::Beacon); - tolua_constant(tolua_S,"Anvil",cWindow::Anvil); - tolua_constant(tolua_S,"Hopper",cWindow::Hopper); - tolua_function(tolua_S,"GetWindowID",tolua_AllToLua_cWindow_GetWindowID00); - tolua_function(tolua_S,"GetWindowType",tolua_AllToLua_cWindow_GetWindowType00); - tolua_function(tolua_S,"GetSlot",tolua_AllToLua_cWindow_GetSlot00); - tolua_function(tolua_S,"SetSlot",tolua_AllToLua_cWindow_SetSlot00); - tolua_function(tolua_S,"IsSlotInPlayerMainInventory",tolua_AllToLua_cWindow_IsSlotInPlayerMainInventory00); - tolua_function(tolua_S,"IsSlotInPlayerHotbar",tolua_AllToLua_cWindow_IsSlotInPlayerHotbar00); - tolua_function(tolua_S,"IsSlotInPlayerInventory",tolua_AllToLua_cWindow_IsSlotInPlayerInventory00); - tolua_function(tolua_S,"GetWindowTitle",tolua_AllToLua_cWindow_GetWindowTitle00); - tolua_function(tolua_S,"SetWindowTitle",tolua_AllToLua_cWindow_SetWindowTitle00); - tolua_endmodule(tolua_S); - #ifdef __cplusplus - tolua_cclass(tolua_S,"cLuaWindow","cLuaWindow","cWindow",tolua_collect_cLuaWindow); - #else - tolua_cclass(tolua_S,"cLuaWindow","cLuaWindow","cWindow",NULL); - #endif - tolua_beginmodule(tolua_S,"cLuaWindow"); - tolua_function(tolua_S,"new",tolua_AllToLua_cLuaWindow_new00); - tolua_function(tolua_S,"new_local",tolua_AllToLua_cLuaWindow_new00_local); - tolua_function(tolua_S,".call",tolua_AllToLua_cLuaWindow_new00_local); - tolua_function(tolua_S,"delete",tolua_AllToLua_cLuaWindow_delete00); - tolua_function(tolua_S,"GetContents",tolua_AllToLua_cLuaWindow_GetContents00); - tolua_variable(tolua_S,"__cItemGrid__cListener__",tolua_get_cLuaWindow___cItemGrid__cListener__,NULL); - tolua_endmodule(tolua_S); tolua_endmodule(tolua_S); return 1; } diff --git a/source/Bindings.h b/source/Bindings.h index 9ef96eb40..36c0de50b 100644 --- a/source/Bindings.h +++ b/source/Bindings.h @@ -1,6 +1,6 @@ /* ** Lua binding: AllToLua -** Generated automatically by tolua++-1.0.92 on 06/04/13 21:16:57. +** Generated automatically by tolua++-1.0.92 on 06/09/13 19:37:21. */ /* Exported function */ diff --git a/source/ClientHandle.h b/source/ClientHandle.h index 69c0fddf2..886a34322 100644 --- a/source/ClientHandle.h +++ b/source/ClientHandle.h @@ -84,7 +84,7 @@ public: void SendAttachEntity (const cEntity & a_Entity, const cEntity * a_Vehicle); void SendBlockAction (int a_BlockX, int a_BlockY, int a_BlockZ, char a_Byte1, char a_Byte2, BLOCKTYPE a_BlockType); - void SendBlockChange (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta); + void SendBlockChange (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta); // tolua_export void SendBlockChanges (int a_ChunkX, int a_ChunkZ, const sSetBlockVector & a_Changes); void SendChat (const AString & a_Message); void SendChunkData (int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer); diff --git a/source/World.h b/source/World.h index 1ec4aacb8..c4d970473 100644 --- a/source/World.h +++ b/source/World.h @@ -78,9 +78,15 @@ public: return 0; } + int GetTicksUntilWeatherChange(void) const { return m_WeatherInterval; } Int64 GetWorldAge(void) const { return m_WorldAge; } Int64 GetTimeOfDay(void) const { return m_TimeOfDay; } + void SetTicksUntilWeatherChange(int a_WeatherInterval) + { + m_WeatherInterval = a_WeatherInterval; + } + void SetTimeOfDay(Int64 a_TimeOfDay) { m_TimeOfDay = a_TimeOfDay; @@ -188,8 +194,8 @@ public: unsigned int GetMaxPlayers(void) const {return m_MaxPlayers; } // tolua_export void SetMaxPlayers(int iMax); // tolua_export - void AddPlayer( cPlayer* a_Player ); - void RemovePlayer( cPlayer* a_Player ); + void AddPlayer( cPlayer* a_Player ); // tolua_export + void RemovePlayer( cPlayer* a_Player ); // tolua_export /// Calls the callback for each player in the list; returns true if all players processed, false if the callback aborted by returning true bool ForEachPlayer(cPlayerListCallback & a_Callback); // >> EXPORTED IN MANUALBINDINGS << -- cgit v1.2.3