diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-12-08 15:02:45 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-12-08 15:02:45 +0100 |
commit | 1d554677b49e7b2b2121b3fc4e3665a8be7bf710 (patch) | |
tree | d39d3790b018e0e8f04e81be1a2bc3870b3dae2a | |
parent | Fixed tabcompletion packet, fixes #356 (diff) | |
parent | Fixed normalizing large angles. (diff) | |
download | cuberite-1d554677b49e7b2b2121b3fc4e3665a8be7bf710.tar cuberite-1d554677b49e7b2b2121b3fc4e3665a8be7bf710.tar.gz cuberite-1d554677b49e7b2b2121b3fc4e3665a8be7bf710.tar.bz2 cuberite-1d554677b49e7b2b2121b3fc4e3665a8be7bf710.tar.lz cuberite-1d554677b49e7b2b2121b3fc4e3665a8be7bf710.tar.xz cuberite-1d554677b49e7b2b2121b3fc4e3665a8be7bf710.tar.zst cuberite-1d554677b49e7b2b2121b3fc4e3665a8be7bf710.zip |
-rw-r--r-- | MCServer/.gitignore | 3 | ||||
-rw-r--r-- | MCServer/Plugins/APIDump/APIDesc.lua | 1 | ||||
m--------- | MCServer/Plugins/Core | 0 | ||||
m--------- | MCServer/Plugins/TransAPI | 6 | ||||
-rw-r--r-- | VC2008/MCServer.vcproj | 44 | ||||
-rw-r--r-- | src/AllToLua.pkg | 81 | ||||
-rw-r--r-- | src/Bindings/AllToLua.bat (renamed from src/AllToLua.bat) | 0 | ||||
-rw-r--r-- | src/Bindings/AllToLua.pkg | 82 | ||||
-rw-r--r--[-rwxr-xr-x] | src/Bindings/AllToLua.sh (renamed from src/AllToLua.sh) | 0 | ||||
-rw-r--r-- | src/Bindings/Bindings.cpp (renamed from src/Bindings.cpp) | 2297 | ||||
-rw-r--r-- | src/Bindings/Bindings.h (renamed from src/Bindings.h) | 2 | ||||
-rw-r--r-- | src/Bindings/LuaFunctions.h (renamed from src/LuaFunctions.h) | 2 | ||||
-rw-r--r-- | src/Bindings/LuaState.cpp (renamed from src/LuaState.cpp) | 0 | ||||
-rw-r--r-- | src/Bindings/LuaState.h (renamed from src/LuaState.h) | 0 | ||||
-rw-r--r-- | src/Bindings/LuaWindow.cpp (renamed from src/LuaWindow.cpp) | 4 | ||||
-rw-r--r-- | src/Bindings/LuaWindow.h (renamed from src/LuaWindow.h) | 4 | ||||
-rw-r--r-- | src/Bindings/ManualBindings.cpp (renamed from src/ManualBindings.cpp) | 24 | ||||
-rw-r--r-- | src/Bindings/ManualBindings.h (renamed from src/ManualBindings.h) | 0 | ||||
-rw-r--r-- | src/Bindings/Plugin.cpp (renamed from src/Plugin.cpp) | 0 | ||||
-rw-r--r-- | src/Bindings/Plugin.h (renamed from src/Plugin.h) | 1 | ||||
-rw-r--r-- | src/Bindings/PluginLua.cpp (renamed from src/PluginLua.cpp) | 2 | ||||
-rw-r--r-- | src/Bindings/PluginLua.h (renamed from src/PluginLua.h) | 0 | ||||
-rw-r--r-- | src/Bindings/PluginManager.cpp (renamed from src/PluginManager.cpp) | 12 | ||||
-rw-r--r-- | src/Bindings/PluginManager.h (renamed from src/PluginManager.h) | 2 | ||||
-rw-r--r-- | src/Bindings/WebPlugin.cpp (renamed from src/WebPlugin.cpp) | 6 | ||||
-rw-r--r-- | src/Bindings/WebPlugin.h (renamed from src/WebPlugin.h) | 0 | ||||
-rw-r--r-- | src/Bindings/lua5.1.dll (renamed from src/lua5.1.dll) | bin | 167424 -> 167424 bytes | |||
-rw-r--r-- | src/Bindings/tolua++.exe (renamed from src/tolua++.exe) | bin | 484864 -> 484864 bytes | |||
-rw-r--r-- | src/Bindings/tolua++.h (renamed from src/tolua++.h) | 0 | ||||
-rw-r--r-- | src/Bindings/tolua_base.h (renamed from src/tolua_base.h) | 0 | ||||
-rw-r--r-- | src/Bindings/virtual_method_hooks.lua (renamed from src/virtual_method_hooks.lua) | 0 | ||||
-rw-r--r-- | src/BlockEntities/HopperEntity.cpp | 2 | ||||
-rw-r--r-- | src/Blocks/BlockHandler.cpp | 7 | ||||
-rw-r--r-- | src/Chunk.cpp | 2 | ||||
-rw-r--r-- | src/ChunkMap.cpp | 2 | ||||
-rw-r--r-- | src/ClientHandle.cpp | 2 | ||||
-rw-r--r-- | src/CraftingRecipes.cpp | 2 | ||||
-rw-r--r-- | src/Defines.h | 16 | ||||
-rw-r--r-- | src/Entities/Entity.cpp | 11 | ||||
-rw-r--r-- | src/Entities/Pickup.cpp | 2 | ||||
-rw-r--r-- | src/Entities/Player.cpp | 2 | ||||
-rw-r--r-- | src/Generating/ChunkGenerator.cpp | 2 | ||||
-rw-r--r-- | src/Root.cpp | 2 | ||||
-rw-r--r-- | src/Server.cpp | 2 | ||||
-rw-r--r-- | src/WebAdmin.cpp | 6 | ||||
-rw-r--r-- | src/WebAdmin.h | 2 | ||||
-rw-r--r-- | src/World.cpp | 15 | ||||
-rw-r--r-- | src/World.h | 3 |
48 files changed, 1372 insertions, 1281 deletions
diff --git a/MCServer/.gitignore b/MCServer/.gitignore index 1fed134fe..c18dd7a67 100644 --- a/MCServer/.gitignore +++ b/MCServer/.gitignore @@ -17,6 +17,9 @@ schematics *.pdb memdump* *.grab +Galleries.cfg +Galleries.example.cfg +Galleries.sqlite ProtectionAreas.sqlite helgrind.log valgrind.log diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index a08f6f24b..75d5c011f 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -2077,6 +2077,7 @@ end { Params = "{{cItems|Pickups}}, X, Y, Z, SpeedX, SpeedY, SpeedZ", Return = "", Notes = "Spawns the specified pickups at the position specified. All the pickups fly away from the spawn position using the specified speed." }, }, SpawnMob = { Params = "X, Y, Z, {{cMonster|MonsterType}}", Return = "EntityID", Notes = "Spawns the specified type of mob at the specified coords. Returns the EntityID of the creates entity, or -1 on failure. " }, + SpawnFallingBlock = { Params = "X, Y, Z, BlockType, BlockMeta", Return = "EntityID", Notes = "Spawns an {{cFallingBlock|Falling Block}} entity at the specified coords with the given block type/meta" }, SpawnExperienceOrb = { Params = "X, Y, Z, Reward", Return = "EntityID", Notes = "Spawns an {{cExpOrb|experience orb}} at the specified coords, with the given reward" }, SpawnPrimedTNT = { Params = "X, Y, Z, FuseTimeSecs, InitialVelocityCoeff", Return = "", Notes = "Spawns a {{cTNTEntity|primed TNT entity}} at the specified coords, with the given fuse time. The entity gets a random speed multiplied by the InitialVelocityCoeff, 1 being the default value." }, TryGetHeight = { Params = "BlockX, BlockZ", Return = "IsValid, Height", Notes = "Returns true and height of the highest non-air block if the chunk is loaded, or false otherwise." }, diff --git a/MCServer/Plugins/Core b/MCServer/Plugins/Core -Subproject de53a607f30c583e08c06b6e5eb936cd278ab8c +Subproject ede668bc7c310af49ad7354c00d3f11adbae792 diff --git a/MCServer/Plugins/TransAPI b/MCServer/Plugins/TransAPI -Subproject 52e1de4332a026e58fda843aae98c1f51e57199 +Subproject 6527b80a77b3b7f5fac0ef214c1b59ad83e39b2 diff --git a/VC2008/MCServer.vcproj b/VC2008/MCServer.vcproj index c5dedb677..8b330b10a 100644 --- a/VC2008/MCServer.vcproj +++ b/VC2008/MCServer.vcproj @@ -1851,7 +1851,7 @@ Name="Bindings" > <File - RelativePath="..\src\AllToLua.pkg" + RelativePath="..\src\Bindings\AllToLua.pkg" > <FileConfiguration Name="Debug|Win32" @@ -1910,11 +1910,7 @@ </FileConfiguration> </File> <File - RelativePath="..\MCServer\API.txt" - > - </File> - <File - RelativePath="..\src\Bindings.cpp" + RelativePath="..\src\Bindings\Bindings.cpp" > <FileConfiguration Name="Debug|Win32" @@ -1958,75 +1954,75 @@ </FileConfiguration> </File> <File - RelativePath="..\src\Bindings.h" + RelativePath="..\src\Bindings\Bindings.h" > </File> <File - RelativePath="..\src\LuaFunctions.h" + RelativePath="..\src\Bindings\LuaFunctions.h" > </File> <File - RelativePath="..\src\LuaState.cpp" + RelativePath="..\src\Bindings\LuaState.cpp" > </File> <File - RelativePath="..\src\LuaState.h" + RelativePath="..\src\Bindings\LuaState.h" > </File> <File - RelativePath="..\src\LuaWindow.cpp" + RelativePath="..\src\Bindings\LuaWindow.cpp" > </File> <File - RelativePath="..\src\LuaWindow.h" + RelativePath="..\src\Bindings\LuaWindow.h" > </File> <File - RelativePath="..\src\ManualBindings.cpp" + RelativePath="..\src\Bindings\ManualBindings.cpp" > </File> <File - RelativePath="..\src\ManualBindings.h" + RelativePath="..\src\Bindings\ManualBindings.h" > </File> <File - RelativePath="..\src\Plugin.cpp" + RelativePath="..\src\Bindings\Plugin.cpp" > </File> <File - RelativePath="..\src\Plugin.h" + RelativePath="..\src\Bindings\Plugin.h" > </File> <File - RelativePath="..\src\PluginLua.cpp" + RelativePath="..\src\Bindings\PluginLua.cpp" > </File> <File - RelativePath="..\src\PluginLua.h" + RelativePath="..\src\Bindings\PluginLua.h" > </File> <File - RelativePath="..\src\PluginManager.cpp" + RelativePath="..\src\Bindings\PluginManager.cpp" > </File> <File - RelativePath="..\src\PluginManager.h" + RelativePath="..\src\Bindings\PluginManager.h" > </File> <File - RelativePath="..\src\tolua++.h" + RelativePath="..\src\Bindings\tolua++.h" > </File> <File - RelativePath="..\src\tolua_base.h" + RelativePath="..\src\Bindings\tolua_base.h" > </File> <File - RelativePath="..\src\WebPlugin.cpp" + RelativePath="..\src\Bindings\WebPlugin.cpp" > </File> <File - RelativePath="..\src\WebPlugin.h" + RelativePath="..\src\Bindings\WebPlugin.h" > </File> </Filter> diff --git a/src/AllToLua.pkg b/src/AllToLua.pkg deleted file mode 100644 index fe9217104..000000000 --- a/src/AllToLua.pkg +++ /dev/null @@ -1,81 +0,0 @@ - -$#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules - -$#include "tolua_base.h" - -// Typedefs from Globals.h, so that we don't have to include that file: -typedef long long Int64; -typedef int Int32; -typedef short Int16; - -typedef unsigned long long UInt64; -typedef unsigned int UInt32; -typedef unsigned short UInt16; - - -$cfile "ChunkDef.h" - -$cfile "../lib/inifile/iniFile.h" - -$cfile "OSSupport/File.h" - -$cfile "BlockID.h" -$cfile "StringUtils.h" -$cfile "Defines.h" -$cfile "LuaFunctions.h" -$cfile "ChatColor.h" -$cfile "ClientHandle.h" -$cfile "Entities/Entity.h" -$cfile "Entities/Pawn.h" -$cfile "Entities/Player.h" -$cfile "Entities/Pickup.h" -$cfile "Entities/ProjectileEntity.h" -$cfile "PluginManager.h" -$cfile "Plugin.h" -$cfile "PluginLua.h" -$cfile "Server.h" -$cfile "World.h" -$cfile "Inventory.h" -$cfile "Enchantments.h" -$cfile "Item.h" -$cfile "ItemGrid.h" -$cfile "BlockEntities/BlockEntity.h" -$cfile "BlockEntities/BlockEntityWithItems.h" -$cfile "BlockEntities/ChestEntity.h" -$cfile "BlockEntities/DropSpenserEntity.h" -$cfile "BlockEntities/DispenserEntity.h" -$cfile "BlockEntities/DropperEntity.h" -$cfile "BlockEntities/FurnaceEntity.h" -$cfile "BlockEntities/HopperEntity.h" -$cfile "BlockEntities/JukeboxEntity.h" -$cfile "BlockEntities/NoteEntity.h" -$cfile "BlockEntities/SignEntity.h" -$cfile "WebAdmin.h" -$cfile "WebPlugin.h" -$cfile "Root.h" -$cfile "Vector3f.h" -$cfile "Vector3d.h" -$cfile "Vector3i.h" -$cfile "Matrix4f.h" -$cfile "Cuboid.h" -$cfile "BoundingBox.h" -$cfile "Tracer.h" -$cfile "Group.h" -$cfile "BlockArea.h" -$cfile "Generating/ChunkDesc.h" -$cfile "CraftingRecipes.h" -$cfile "UI/Window.h" -$cfile "LuaWindow.h" -$cfile "Mobs/Monster.h" - - - - - -// Need to declare this class so that the usertype is properly registered in Bindings.cpp - -// it seems impossible to register a usertype in ManualBindings.cpp -class cLineBlockTracer; - - - - diff --git a/src/AllToLua.bat b/src/Bindings/AllToLua.bat index f7867fadb..f7867fadb 100644 --- a/src/AllToLua.bat +++ b/src/Bindings/AllToLua.bat diff --git a/src/Bindings/AllToLua.pkg b/src/Bindings/AllToLua.pkg new file mode 100644 index 000000000..2a70efedf --- /dev/null +++ b/src/Bindings/AllToLua.pkg @@ -0,0 +1,82 @@ + +$#include "../Globals.h" + +$#include "tolua_base.h" + +// Typedefs from Globals.h, so that we don't have to process that file: +typedef long long Int64; +typedef int Int32; +typedef short Int16; + +typedef unsigned long long UInt64; +typedef unsigned int UInt32; +typedef unsigned short UInt16; + + +$cfile "../ChunkDef.h" + +$cfile "../../lib/inifile/iniFile.h" + +$cfile "../OSSupport/File.h" + +$cfile "LuaFunctions.h" +$cfile "PluginManager.h" +$cfile "Plugin.h" +$cfile "PluginLua.h" +$cfile "WebPlugin.h" +$cfile "LuaWindow.h" + +$cfile "../BlockID.h" +$cfile "../StringUtils.h" +$cfile "../Defines.h" +$cfile "../ChatColor.h" +$cfile "../ClientHandle.h" +$cfile "../Entities/Entity.h" +$cfile "../Entities/Pawn.h" +$cfile "../Entities/Player.h" +$cfile "../Entities/Pickup.h" +$cfile "../Entities/ProjectileEntity.h" +$cfile "../Server.h" +$cfile "../World.h" +$cfile "../Inventory.h" +$cfile "../Enchantments.h" +$cfile "../Item.h" +$cfile "../ItemGrid.h" +$cfile "../BlockEntities/BlockEntity.h" +$cfile "../BlockEntities/BlockEntityWithItems.h" +$cfile "../BlockEntities/ChestEntity.h" +$cfile "../BlockEntities/DropSpenserEntity.h" +$cfile "../BlockEntities/DispenserEntity.h" +$cfile "../BlockEntities/DropperEntity.h" +$cfile "../BlockEntities/FurnaceEntity.h" +$cfile "../BlockEntities/HopperEntity.h" +$cfile "../BlockEntities/JukeboxEntity.h" +$cfile "../BlockEntities/NoteEntity.h" +$cfile "../BlockEntities/SignEntity.h" +$cfile "../WebAdmin.h" +$cfile "../Root.h" +$cfile "../Vector3f.h" +$cfile "../Vector3d.h" +$cfile "../Vector3i.h" +$cfile "../Matrix4f.h" +$cfile "../Cuboid.h" +$cfile "../BoundingBox.h" +$cfile "../Tracer.h" +$cfile "../Group.h" +$cfile "../BlockArea.h" +$cfile "../Generating/ChunkDesc.h" +$cfile "../CraftingRecipes.h" +$cfile "../UI/Window.h" +$cfile "../Mobs/Monster.h" + + + + + +// Need to declare this class so that the usertype is properly registered in Bindings.cpp - +// it seems impossible to register a usertype in ManualBindings.cpp +class cLineBlockTracer; + + + + diff --git a/src/AllToLua.sh b/src/Bindings/AllToLua.sh index 887c2490c..887c2490c 100755..100644 --- a/src/AllToLua.sh +++ b/src/Bindings/AllToLua.sh diff --git a/src/Bindings.cpp b/src/Bindings/Bindings.cpp index 51a1dbd71..954c751d5 100644 --- a/src/Bindings.cpp +++ b/src/Bindings/Bindings.cpp @@ -1,6 +1,6 @@ /* ** Lua binding: AllToLua -** Generated automatically by tolua++-1.0.92 on 12/06/13 23:06:37. +** Generated automatically by tolua++-1.0.92 on 12/08/13 12:56:06. */ #ifndef __cplusplus @@ -13,59 +13,59 @@ /* Exported function */ 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 "../Globals.h" #include "tolua_base.h" -#include "ChunkDef.h" -#include "../lib/inifile/iniFile.h" -#include "OSSupport/File.h" -#include "BlockID.h" -#include "StringUtils.h" -#include "Defines.h" +#include "../ChunkDef.h" +#include "../../lib/inifile/iniFile.h" +#include "../OSSupport/File.h" #include "LuaFunctions.h" -#include "ChatColor.h" -#include "ClientHandle.h" -#include "Entities/Entity.h" -#include "Entities/Pawn.h" -#include "Entities/Player.h" -#include "Entities/Pickup.h" -#include "Entities/ProjectileEntity.h" #include "PluginManager.h" #include "Plugin.h" #include "PluginLua.h" -#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 "BlockEntities/FurnaceEntity.h" -#include "BlockEntities/HopperEntity.h" -#include "BlockEntities/JukeboxEntity.h" -#include "BlockEntities/NoteEntity.h" -#include "BlockEntities/SignEntity.h" -#include "WebAdmin.h" #include "WebPlugin.h" -#include "Root.h" -#include "Vector3f.h" -#include "Vector3d.h" -#include "Vector3i.h" -#include "Matrix4f.h" -#include "Cuboid.h" -#include "BoundingBox.h" -#include "Tracer.h" -#include "Group.h" -#include "BlockArea.h" -#include "Generating/ChunkDesc.h" -#include "CraftingRecipes.h" -#include "UI/Window.h" #include "LuaWindow.h" -#include "Mobs/Monster.h" +#include "../BlockID.h" +#include "../StringUtils.h" +#include "../Defines.h" +#include "../ChatColor.h" +#include "../ClientHandle.h" +#include "../Entities/Entity.h" +#include "../Entities/Pawn.h" +#include "../Entities/Player.h" +#include "../Entities/Pickup.h" +#include "../Entities/ProjectileEntity.h" +#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 "../BlockEntities/FurnaceEntity.h" +#include "../BlockEntities/HopperEntity.h" +#include "../BlockEntities/JukeboxEntity.h" +#include "../BlockEntities/NoteEntity.h" +#include "../BlockEntities/SignEntity.h" +#include "../WebAdmin.h" +#include "../Root.h" +#include "../Vector3f.h" +#include "../Vector3d.h" +#include "../Vector3i.h" +#include "../Matrix4f.h" +#include "../Cuboid.h" +#include "../BoundingBox.h" +#include "../Tracer.h" +#include "../Group.h" +#include "../BlockArea.h" +#include "../Generating/ChunkDesc.h" +#include "../CraftingRecipes.h" +#include "../UI/Window.h" +#include "../Mobs/Monster.h" /* function to release collected object via destructor */ #ifdef __cplusplus @@ -77,9 +77,9 @@ static int tolua_collect_sWebAdminPage (lua_State* tolua_S) return 0; } -static int tolua_collect_cBoundingBox (lua_State* tolua_S) +static int tolua_collect_cBlockArea (lua_State* tolua_S) { - cBoundingBox* self = (cBoundingBox*) tolua_tousertype(tolua_S,1,0); + cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); Mtolua_delete(self); return 0; } @@ -119,9 +119,9 @@ static int tolua_collect_cItems (lua_State* tolua_S) return 0; } -static int tolua_collect_cBlockArea (lua_State* tolua_S) +static int tolua_collect_cBoundingBox (lua_State* tolua_S) { - cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); + cBoundingBox* self = (cBoundingBox*) tolua_tousertype(tolua_S,1,0); Mtolua_delete(self); return 0; } @@ -196,12 +196,12 @@ static void tolua_reg_types (lua_State* tolua_S) tolua_usertype(tolua_S,"cPluginLua"); tolua_usertype(tolua_S,"cRoot"); tolua_usertype(tolua_S,"std::vector<cIniFile::key>"); - tolua_usertype(tolua_S,"cPickup"); + tolua_usertype(tolua_S,"cFile"); tolua_usertype(tolua_S,"sWebAdminPage"); tolua_usertype(tolua_S,"cFireChargeEntity"); - tolua_usertype(tolua_S,"cClientHandle"); + tolua_usertype(tolua_S,"cWorld"); tolua_usertype(tolua_S,"cChunkDesc"); - tolua_usertype(tolua_S,"cPluginManager"); + tolua_usertype(tolua_S,"cWebPlugin"); tolua_usertype(tolua_S,"Vector3f"); tolua_usertype(tolua_S,"cCraftingRecipes"); tolua_usertype(tolua_S,"cJukeboxEntity"); @@ -224,38 +224,38 @@ static void tolua_reg_types (lua_State* tolua_S) tolua_usertype(tolua_S,"cBlockEntityWithItems"); tolua_usertype(tolua_S,"cWindow"); tolua_usertype(tolua_S,"cCraftingGrid"); - tolua_usertype(tolua_S,"cWorld"); tolua_usertype(tolua_S,"cBlockArea"); - tolua_usertype(tolua_S,"cItem"); tolua_usertype(tolua_S,"cGroup"); + tolua_usertype(tolua_S,"cItem"); + tolua_usertype(tolua_S,"cTracer"); tolua_usertype(tolua_S,"cArrowEntity"); tolua_usertype(tolua_S,"cDropSpenserEntity"); - tolua_usertype(tolua_S,"cTracer"); tolua_usertype(tolua_S,"cBoundingBox"); tolua_usertype(tolua_S,"cCuboid"); - tolua_usertype(tolua_S,"cNoteEntity"); tolua_usertype(tolua_S,"Vector3i"); + tolua_usertype(tolua_S,"cNoteEntity"); + tolua_usertype(tolua_S,"Vector3d"); tolua_usertype(tolua_S,"cBlockEntity"); tolua_usertype(tolua_S,"cCriticalSection"); tolua_usertype(tolua_S,"HTTPTemplateRequest"); - tolua_usertype(tolua_S,"Vector3d"); - tolua_usertype(tolua_S,"cFile"); + tolua_usertype(tolua_S,"cPickup"); tolua_usertype(tolua_S,"cItems"); - tolua_usertype(tolua_S,"cWebPlugin"); + tolua_usertype(tolua_S,"cClientHandle"); tolua_usertype(tolua_S,"cWebAdmin"); tolua_usertype(tolua_S,"cChatColor"); - tolua_usertype(tolua_S,"cIniFile"); tolua_usertype(tolua_S,"HTTPRequest"); + tolua_usertype(tolua_S,"cIniFile"); tolua_usertype(tolua_S,"HTTPFormData"); + tolua_usertype(tolua_S,"cSignEntity"); tolua_usertype(tolua_S,"cPawn"); - tolua_usertype(tolua_S,"cPlayer"); + tolua_usertype(tolua_S,"cThrownEggEntity"); tolua_usertype(tolua_S,"cGroupManager"); - tolua_usertype(tolua_S,"cSignEntity"); - tolua_usertype(tolua_S,"cItemGrid::cListener"); - tolua_usertype(tolua_S,"cProjectileEntity"); + tolua_usertype(tolua_S,"cPluginManager"); tolua_usertype(tolua_S,"cDropperEntity"); + tolua_usertype(tolua_S,"cProjectileEntity"); + tolua_usertype(tolua_S,"cItemGrid::cListener"); tolua_usertype(tolua_S,"cInventory"); - tolua_usertype(tolua_S,"cThrownEggEntity"); + tolua_usertype(tolua_S,"cPlayer"); } /* method: new of class cIniFile */ @@ -2334,6 +2334,948 @@ static int tolua_AllToLua_cFile_ReadWholeFile00(lua_State* tolua_S) } #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) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_iscppstring(tolua_S,1,0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::string a_Str = ((std::string) tolua_tocppstring(tolua_S,1,0)); + unsigned int a_Idx = ((unsigned int) tolua_tonumber(tolua_S,2,0)); + { + std::string tolua_ret = (std::string) GetChar(a_Str,a_Idx); + tolua_pushcppstring(tolua_S,(const char*)tolua_ret); + tolua_pushcppstring(tolua_S,(const char*)a_Str); + } + } + return 2; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetChar'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: Get of class cPluginManager */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPluginManager_Get00 +static int tolua_AllToLua_cPluginManager_Get00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"cPluginManager",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + { + cPluginManager* tolua_ret = (cPluginManager*) cPluginManager::Get(); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"cPluginManager"); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'Get'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetPlugin of class cPluginManager */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPluginManager_GetPlugin00 +static int tolua_AllToLua_cPluginManager_GetPlugin00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const cPluginManager",0,&tolua_err) || + !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const cPluginManager* self = (const cPluginManager*) tolua_tousertype(tolua_S,1,0); + const AString a_Plugin = ((const AString) tolua_tocppstring(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetPlugin'", NULL); +#endif + { + cPlugin* tolua_ret = (cPlugin*) self->GetPlugin(a_Plugin); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"cPlugin"); + tolua_pushcppstring(tolua_S,(const char*)a_Plugin); + } + } + return 2; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetPlugin'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: FindPlugins of class cPluginManager */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPluginManager_FindPlugins00 +static int tolua_AllToLua_cPluginManager_FindPlugins00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"cPluginManager",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + cPluginManager* self = (cPluginManager*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FindPlugins'", NULL); +#endif + { + self->FindPlugins(); + } + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'FindPlugins'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: ReloadPlugins of class cPluginManager */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPluginManager_ReloadPlugins00 +static int tolua_AllToLua_cPluginManager_ReloadPlugins00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"cPluginManager",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + cPluginManager* self = (cPluginManager*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ReloadPlugins'", NULL); +#endif + { + self->ReloadPlugins(); + } + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'ReloadPlugins'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetNumPlugins of class cPluginManager */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPluginManager_GetNumPlugins00 +static int tolua_AllToLua_cPluginManager_GetNumPlugins00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const cPluginManager",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const cPluginManager* self = (const cPluginManager*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetNumPlugins'", NULL); +#endif + { + unsigned int tolua_ret = (unsigned int) self->GetNumPlugins(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetNumPlugins'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: DisablePlugin of class cPluginManager */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPluginManager_DisablePlugin00 +static int tolua_AllToLua_cPluginManager_DisablePlugin00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"cPluginManager",0,&tolua_err) || + !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + cPluginManager* self = (cPluginManager*) tolua_tousertype(tolua_S,1,0); + const AString a_PluginName = ((const AString) tolua_tocppstring(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DisablePlugin'", NULL); +#endif + { + bool tolua_ret = (bool) self->DisablePlugin(a_PluginName); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + tolua_pushcppstring(tolua_S,(const char*)a_PluginName); + } + } + return 2; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'DisablePlugin'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: LoadPlugin of class cPluginManager */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPluginManager_LoadPlugin00 +static int tolua_AllToLua_cPluginManager_LoadPlugin00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"cPluginManager",0,&tolua_err) || + !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + cPluginManager* self = (cPluginManager*) tolua_tousertype(tolua_S,1,0); + const AString a_PluginName = ((const AString) tolua_tocppstring(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'LoadPlugin'", NULL); +#endif + { + bool tolua_ret = (bool) self->LoadPlugin(a_PluginName); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + tolua_pushcppstring(tolua_S,(const char*)a_PluginName); + } + } + return 2; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'LoadPlugin'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: IsCommandBound of class cPluginManager */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPluginManager_IsCommandBound00 +static int tolua_AllToLua_cPluginManager_IsCommandBound00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"cPluginManager",0,&tolua_err) || + !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + cPluginManager* self = (cPluginManager*) tolua_tousertype(tolua_S,1,0); + const AString a_Command = ((const AString) tolua_tocppstring(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsCommandBound'", NULL); +#endif + { + bool tolua_ret = (bool) self->IsCommandBound(a_Command); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + tolua_pushcppstring(tolua_S,(const char*)a_Command); + } + } + return 2; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'IsCommandBound'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetCommandPermission of class cPluginManager */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPluginManager_GetCommandPermission00 +static int tolua_AllToLua_cPluginManager_GetCommandPermission00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"cPluginManager",0,&tolua_err) || + !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + cPluginManager* self = (cPluginManager*) tolua_tousertype(tolua_S,1,0); + const AString a_Command = ((const AString) tolua_tocppstring(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetCommandPermission'", NULL); +#endif + { + AString tolua_ret = (AString) self->GetCommandPermission(a_Command); + tolua_pushcppstring(tolua_S,(const char*)tolua_ret); + tolua_pushcppstring(tolua_S,(const char*)a_Command); + } + } + return 2; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetCommandPermission'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: ExecuteCommand of class cPluginManager */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPluginManager_ExecuteCommand00 +static int tolua_AllToLua_cPluginManager_ExecuteCommand00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"cPluginManager",0,&tolua_err) || + !tolua_isusertype(tolua_S,2,"cPlayer",0,&tolua_err) || + !tolua_iscppstring(tolua_S,3,0,&tolua_err) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + cPluginManager* self = (cPluginManager*) tolua_tousertype(tolua_S,1,0); + cPlayer* a_Player = ((cPlayer*) tolua_tousertype(tolua_S,2,0)); + const AString a_Command = ((const AString) tolua_tocppstring(tolua_S,3,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ExecuteCommand'", NULL); +#endif + { + bool tolua_ret = (bool) self->ExecuteCommand(a_Player,a_Command); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + tolua_pushcppstring(tolua_S,(const char*)a_Command); + } + } + return 2; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'ExecuteCommand'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: ForceExecuteCommand of class cPluginManager */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPluginManager_ForceExecuteCommand00 +static int tolua_AllToLua_cPluginManager_ForceExecuteCommand00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"cPluginManager",0,&tolua_err) || + !tolua_isusertype(tolua_S,2,"cPlayer",0,&tolua_err) || + !tolua_iscppstring(tolua_S,3,0,&tolua_err) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + cPluginManager* self = (cPluginManager*) tolua_tousertype(tolua_S,1,0); + cPlayer* a_Player = ((cPlayer*) tolua_tousertype(tolua_S,2,0)); + const AString a_Command = ((const AString) tolua_tocppstring(tolua_S,3,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ForceExecuteCommand'", NULL); +#endif + { + bool tolua_ret = (bool) self->ForceExecuteCommand(a_Player,a_Command); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + tolua_pushcppstring(tolua_S,(const char*)a_Command); + } + } + return 2; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'ForceExecuteCommand'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: IsConsoleCommandBound of class cPluginManager */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPluginManager_IsConsoleCommandBound00 +static int tolua_AllToLua_cPluginManager_IsConsoleCommandBound00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"cPluginManager",0,&tolua_err) || + !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + cPluginManager* self = (cPluginManager*) tolua_tousertype(tolua_S,1,0); + const AString a_Command = ((const AString) tolua_tocppstring(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsConsoleCommandBound'", NULL); +#endif + { + bool tolua_ret = (bool) self->IsConsoleCommandBound(a_Command); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + tolua_pushcppstring(tolua_S,(const char*)a_Command); + } + } + return 2; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'IsConsoleCommandBound'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetName of class cPlugin */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlugin_GetName00 +static int tolua_AllToLua_cPlugin_GetName00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const cPlugin",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const cPlugin* self = (const cPlugin*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetName'", NULL); +#endif + { + const AString tolua_ret = (const AString) self->GetName(); + tolua_pushcppstring(tolua_S,(const char*)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetName'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: SetName of class cPlugin */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlugin_SetName00 +static int tolua_AllToLua_cPlugin_SetName00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"cPlugin",0,&tolua_err) || + !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + cPlugin* self = (cPlugin*) tolua_tousertype(tolua_S,1,0); + const AString a_Name = ((const AString) tolua_tocppstring(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetName'", NULL); +#endif + { + self->SetName(a_Name); + tolua_pushcppstring(tolua_S,(const char*)a_Name); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'SetName'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetVersion of class cPlugin */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlugin_GetVersion00 +static int tolua_AllToLua_cPlugin_GetVersion00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const cPlugin",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const cPlugin* self = (const cPlugin*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetVersion'", NULL); +#endif + { + int tolua_ret = (int) self->GetVersion(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetVersion'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: SetVersion of class cPlugin */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlugin_SetVersion00 +static int tolua_AllToLua_cPlugin_SetVersion00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"cPlugin",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + cPlugin* self = (cPlugin*) tolua_tousertype(tolua_S,1,0); + int a_Version = ((int) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetVersion'", NULL); +#endif + { + self->SetVersion(a_Version); + } + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'SetVersion'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetDirectory of class cPlugin */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlugin_GetDirectory00 +static int tolua_AllToLua_cPlugin_GetDirectory00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const cPlugin",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const cPlugin* self = (const cPlugin*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetDirectory'", NULL); +#endif + { + const AString tolua_ret = (const AString) self->GetDirectory(); + tolua_pushcppstring(tolua_S,(const char*)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetDirectory'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetLocalDirectory of class cPlugin */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlugin_GetLocalDirectory00 +static int tolua_AllToLua_cPlugin_GetLocalDirectory00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const cPlugin",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const cPlugin* self = (const cPlugin*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetLocalDirectory'", NULL); +#endif + { + AString tolua_ret = (AString) self->GetLocalDirectory(); + tolua_pushcppstring(tolua_S,(const char*)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetLocalDirectory'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetLocalFolder of class cPlugin */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlugin_GetLocalFolder00 +static int tolua_AllToLua_cPlugin_GetLocalFolder00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const cPlugin",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const cPlugin* self = (const cPlugin*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetLocalFolder'", NULL); +#endif + { + AString tolua_ret = (AString) self->GetLocalFolder(); + tolua_pushcppstring(tolua_S,(const char*)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetLocalFolder'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: __cWebPlugin__ of class cPluginLua */ +#ifndef TOLUA_DISABLE_tolua_get_cPluginLua___cWebPlugin__ +static int tolua_get_cPluginLua___cWebPlugin__(lua_State* tolua_S) +{ + cPluginLua* self = (cPluginLua*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable '__cWebPlugin__'",NULL); +#endif +#ifdef __cplusplus + tolua_pushusertype(tolua_S,(void*)static_cast<cWebPlugin*>(self), "cWebPlugin"); +#else + tolua_pushusertype(tolua_S,(void*)((cWebPlugin*)self), "cWebPlugin"); +#endif + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetWebTitle of class cWebPlugin */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cWebPlugin_GetWebTitle00 +static int tolua_AllToLua_cWebPlugin_GetWebTitle00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const cWebPlugin",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const cWebPlugin* self = (const cWebPlugin*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetWebTitle'", NULL); +#endif + { + const AString tolua_ret = (const AString) self->GetWebTitle(); + tolua_pushcppstring(tolua_S,(const char*)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetWebTitle'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: HandleWebRequest of class cWebPlugin */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cWebPlugin_HandleWebRequest00 +static int tolua_AllToLua_cWebPlugin_HandleWebRequest00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"cWebPlugin",0,&tolua_err) || + !tolua_isusertype(tolua_S,2,"const HTTPRequest",0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + cWebPlugin* self = (cWebPlugin*) tolua_tousertype(tolua_S,1,0); + const HTTPRequest* a_Request = ((const HTTPRequest*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HandleWebRequest'", NULL); +#endif + { + AString tolua_ret = (AString) self->HandleWebRequest(a_Request); + tolua_pushcppstring(tolua_S,(const char*)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'HandleWebRequest'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: SafeString of class cWebPlugin */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cWebPlugin_SafeString00 +static int tolua_AllToLua_cWebPlugin_SafeString00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"cWebPlugin",0,&tolua_err) || + !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const AString a_String = ((const AString) tolua_tocppstring(tolua_S,2,0)); + { + AString tolua_ret = (AString) cWebPlugin::SafeString(a_String); + tolua_pushcppstring(tolua_S,(const char*)tolua_ret); + tolua_pushcppstring(tolua_S,(const char*)a_String); + } + } + return 2; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'SafeString'.",&tolua_err); + return 0; +#endif +} +#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) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"cLuaWindow",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) + ) + 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)); + { + 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); + } + } + return 2; +#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 cLuaWindow */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cLuaWindow_new00_local +static int tolua_AllToLua_cLuaWindow_new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"cLuaWindow",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) + ) + 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)); + { + 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); + } + } + return 2; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#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) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"cLuaWindow",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + cLuaWindow* self = (cLuaWindow*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'delete'", NULL); +#endif + Mtolua_delete(self); + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'delete'.",&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) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"cLuaWindow",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + cLuaWindow* self = (cLuaWindow*) 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 + /* function: BlockStringToType */ #ifndef TOLUA_DISABLE_tolua_AllToLua_BlockStringToType00 static int tolua_AllToLua_BlockStringToType00(lua_State* tolua_S) @@ -3357,6 +4299,35 @@ static int tolua_AllToLua_AddFaceDirection00(lua_State* tolua_S) } #endif //#ifndef TOLUA_DISABLE +/* function: NormalizeAngleDegrees */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_NormalizeAngleDegrees00 +static int tolua_AllToLua_NormalizeAngleDegrees00(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) + ) + goto tolua_lerror; + else +#endif + { + const double a_Degrees = ((const double) tolua_tonumber(tolua_S,1,0)); + { + double tolua_ret = (double) NormalizeAngleDegrees(a_Degrees); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'NormalizeAngleDegrees'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + /* function: ItemCategory::IsPickaxe */ #ifndef TOLUA_DISABLE_tolua_AllToLua_ItemCategory_IsPickaxe00 static int tolua_AllToLua_ItemCategory_IsPickaxe00(lua_State* tolua_S) @@ -3705,65 +4676,6 @@ static int tolua_AllToLua_IsBiomeNoDownfall00(lua_State* tolua_S) } #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) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_iscppstring(tolua_S,1,0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - std::string a_Str = ((std::string) tolua_tocppstring(tolua_S,1,0)); - unsigned int a_Idx = ((unsigned int) tolua_tonumber(tolua_S,2,0)); - { - std::string tolua_ret = (std::string) GetChar(a_Str,a_Idx); - tolua_pushcppstring(tolua_S,(const char*)tolua_ret); - tolua_pushcppstring(tolua_S,(const char*)a_Str); - } - } - return 2; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetChar'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - /* get function: Color of class cChatColor */ #ifndef TOLUA_DISABLE_tolua_get_cChatColor_Color static int tolua_get_cChatColor_Color(lua_State* tolua_S) @@ -10606,656 +11518,6 @@ static int tolua_AllToLua_cArrowEntity_SetIsCritical00(lua_State* tolua_S) } #endif //#ifndef TOLUA_DISABLE -/* method: Get of class cPluginManager */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPluginManager_Get00 -static int tolua_AllToLua_cPluginManager_Get00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cPluginManager",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - { - cPluginManager* tolua_ret = (cPluginManager*) cPluginManager::Get(); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cPluginManager"); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'Get'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetPlugin of class cPluginManager */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPluginManager_GetPlugin00 -static int tolua_AllToLua_cPluginManager_GetPlugin00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cPluginManager",0,&tolua_err) || - !tolua_iscppstring(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cPluginManager* self = (const cPluginManager*) tolua_tousertype(tolua_S,1,0); - const AString a_Plugin = ((const AString) tolua_tocppstring(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetPlugin'", NULL); -#endif - { - cPlugin* tolua_ret = (cPlugin*) self->GetPlugin(a_Plugin); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cPlugin"); - tolua_pushcppstring(tolua_S,(const char*)a_Plugin); - } - } - return 2; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetPlugin'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: FindPlugins of class cPluginManager */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPluginManager_FindPlugins00 -static int tolua_AllToLua_cPluginManager_FindPlugins00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cPluginManager",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cPluginManager* self = (cPluginManager*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FindPlugins'", NULL); -#endif - { - self->FindPlugins(); - } - } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'FindPlugins'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: ReloadPlugins of class cPluginManager */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPluginManager_ReloadPlugins00 -static int tolua_AllToLua_cPluginManager_ReloadPlugins00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cPluginManager",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cPluginManager* self = (cPluginManager*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ReloadPlugins'", NULL); -#endif - { - self->ReloadPlugins(); - } - } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'ReloadPlugins'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetNumPlugins of class cPluginManager */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPluginManager_GetNumPlugins00 -static int tolua_AllToLua_cPluginManager_GetNumPlugins00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cPluginManager",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cPluginManager* self = (const cPluginManager*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetNumPlugins'", NULL); -#endif - { - unsigned int tolua_ret = (unsigned int) self->GetNumPlugins(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetNumPlugins'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: DisablePlugin of class cPluginManager */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPluginManager_DisablePlugin00 -static int tolua_AllToLua_cPluginManager_DisablePlugin00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cPluginManager",0,&tolua_err) || - !tolua_iscppstring(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cPluginManager* self = (cPluginManager*) tolua_tousertype(tolua_S,1,0); - const AString a_PluginName = ((const AString) tolua_tocppstring(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DisablePlugin'", NULL); -#endif - { - bool tolua_ret = (bool) self->DisablePlugin(a_PluginName); - tolua_pushboolean(tolua_S,(bool)tolua_ret); - tolua_pushcppstring(tolua_S,(const char*)a_PluginName); - } - } - return 2; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'DisablePlugin'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: LoadPlugin of class cPluginManager */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPluginManager_LoadPlugin00 -static int tolua_AllToLua_cPluginManager_LoadPlugin00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cPluginManager",0,&tolua_err) || - !tolua_iscppstring(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cPluginManager* self = (cPluginManager*) tolua_tousertype(tolua_S,1,0); - const AString a_PluginName = ((const AString) tolua_tocppstring(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'LoadPlugin'", NULL); -#endif - { - bool tolua_ret = (bool) self->LoadPlugin(a_PluginName); - tolua_pushboolean(tolua_S,(bool)tolua_ret); - tolua_pushcppstring(tolua_S,(const char*)a_PluginName); - } - } - return 2; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'LoadPlugin'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: IsCommandBound of class cPluginManager */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPluginManager_IsCommandBound00 -static int tolua_AllToLua_cPluginManager_IsCommandBound00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cPluginManager",0,&tolua_err) || - !tolua_iscppstring(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cPluginManager* self = (cPluginManager*) tolua_tousertype(tolua_S,1,0); - const AString a_Command = ((const AString) tolua_tocppstring(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsCommandBound'", NULL); -#endif - { - bool tolua_ret = (bool) self->IsCommandBound(a_Command); - tolua_pushboolean(tolua_S,(bool)tolua_ret); - tolua_pushcppstring(tolua_S,(const char*)a_Command); - } - } - return 2; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsCommandBound'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetCommandPermission of class cPluginManager */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPluginManager_GetCommandPermission00 -static int tolua_AllToLua_cPluginManager_GetCommandPermission00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cPluginManager",0,&tolua_err) || - !tolua_iscppstring(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cPluginManager* self = (cPluginManager*) tolua_tousertype(tolua_S,1,0); - const AString a_Command = ((const AString) tolua_tocppstring(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetCommandPermission'", NULL); -#endif - { - AString tolua_ret = (AString) self->GetCommandPermission(a_Command); - tolua_pushcppstring(tolua_S,(const char*)tolua_ret); - tolua_pushcppstring(tolua_S,(const char*)a_Command); - } - } - return 2; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetCommandPermission'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: ExecuteCommand of class cPluginManager */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPluginManager_ExecuteCommand00 -static int tolua_AllToLua_cPluginManager_ExecuteCommand00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cPluginManager",0,&tolua_err) || - !tolua_isusertype(tolua_S,2,"cPlayer",0,&tolua_err) || - !tolua_iscppstring(tolua_S,3,0,&tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cPluginManager* self = (cPluginManager*) tolua_tousertype(tolua_S,1,0); - cPlayer* a_Player = ((cPlayer*) tolua_tousertype(tolua_S,2,0)); - const AString a_Command = ((const AString) tolua_tocppstring(tolua_S,3,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ExecuteCommand'", NULL); -#endif - { - bool tolua_ret = (bool) self->ExecuteCommand(a_Player,a_Command); - tolua_pushboolean(tolua_S,(bool)tolua_ret); - tolua_pushcppstring(tolua_S,(const char*)a_Command); - } - } - return 2; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'ExecuteCommand'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: ForceExecuteCommand of class cPluginManager */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPluginManager_ForceExecuteCommand00 -static int tolua_AllToLua_cPluginManager_ForceExecuteCommand00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cPluginManager",0,&tolua_err) || - !tolua_isusertype(tolua_S,2,"cPlayer",0,&tolua_err) || - !tolua_iscppstring(tolua_S,3,0,&tolua_err) || - !tolua_isnoobj(tolua_S,4,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cPluginManager* self = (cPluginManager*) tolua_tousertype(tolua_S,1,0); - cPlayer* a_Player = ((cPlayer*) tolua_tousertype(tolua_S,2,0)); - const AString a_Command = ((const AString) tolua_tocppstring(tolua_S,3,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ForceExecuteCommand'", NULL); -#endif - { - bool tolua_ret = (bool) self->ForceExecuteCommand(a_Player,a_Command); - tolua_pushboolean(tolua_S,(bool)tolua_ret); - tolua_pushcppstring(tolua_S,(const char*)a_Command); - } - } - return 2; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'ForceExecuteCommand'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: IsConsoleCommandBound of class cPluginManager */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPluginManager_IsConsoleCommandBound00 -static int tolua_AllToLua_cPluginManager_IsConsoleCommandBound00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cPluginManager",0,&tolua_err) || - !tolua_iscppstring(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cPluginManager* self = (cPluginManager*) tolua_tousertype(tolua_S,1,0); - const AString a_Command = ((const AString) tolua_tocppstring(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsConsoleCommandBound'", NULL); -#endif - { - bool tolua_ret = (bool) self->IsConsoleCommandBound(a_Command); - tolua_pushboolean(tolua_S,(bool)tolua_ret); - tolua_pushcppstring(tolua_S,(const char*)a_Command); - } - } - return 2; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'IsConsoleCommandBound'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetName of class cPlugin */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlugin_GetName00 -static int tolua_AllToLua_cPlugin_GetName00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cPlugin",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cPlugin* self = (const cPlugin*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetName'", NULL); -#endif - { - const AString tolua_ret = (const AString) self->GetName(); - tolua_pushcppstring(tolua_S,(const char*)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetName'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: SetName of class cPlugin */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlugin_SetName00 -static int tolua_AllToLua_cPlugin_SetName00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cPlugin",0,&tolua_err) || - !tolua_iscppstring(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cPlugin* self = (cPlugin*) tolua_tousertype(tolua_S,1,0); - const AString a_Name = ((const AString) tolua_tocppstring(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetName'", NULL); -#endif - { - self->SetName(a_Name); - tolua_pushcppstring(tolua_S,(const char*)a_Name); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetName'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetVersion of class cPlugin */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlugin_GetVersion00 -static int tolua_AllToLua_cPlugin_GetVersion00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cPlugin",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cPlugin* self = (const cPlugin*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetVersion'", NULL); -#endif - { - int tolua_ret = (int) self->GetVersion(); - tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetVersion'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: SetVersion of class cPlugin */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlugin_SetVersion00 -static int tolua_AllToLua_cPlugin_SetVersion00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cPlugin",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cPlugin* self = (cPlugin*) tolua_tousertype(tolua_S,1,0); - int a_Version = ((int) tolua_tonumber(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetVersion'", NULL); -#endif - { - self->SetVersion(a_Version); - } - } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SetVersion'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetDirectory of class cPlugin */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlugin_GetDirectory00 -static int tolua_AllToLua_cPlugin_GetDirectory00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cPlugin",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cPlugin* self = (const cPlugin*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetDirectory'", NULL); -#endif - { - const AString tolua_ret = (const AString) self->GetDirectory(); - tolua_pushcppstring(tolua_S,(const char*)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetDirectory'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetLocalDirectory of class cPlugin */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlugin_GetLocalDirectory00 -static int tolua_AllToLua_cPlugin_GetLocalDirectory00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cPlugin",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cPlugin* self = (const cPlugin*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetLocalDirectory'", NULL); -#endif - { - AString tolua_ret = (AString) self->GetLocalDirectory(); - tolua_pushcppstring(tolua_S,(const char*)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetLocalDirectory'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: GetLocalFolder of class cPlugin */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlugin_GetLocalFolder00 -static int tolua_AllToLua_cPlugin_GetLocalFolder00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cPlugin",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cPlugin* self = (const cPlugin*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetLocalFolder'", NULL); -#endif - { - AString tolua_ret = (AString) self->GetLocalFolder(); - tolua_pushcppstring(tolua_S,(const char*)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetLocalFolder'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* get function: __cWebPlugin__ of class cPluginLua */ -#ifndef TOLUA_DISABLE_tolua_get_cPluginLua___cWebPlugin__ -static int tolua_get_cPluginLua___cWebPlugin__(lua_State* tolua_S) -{ - cPluginLua* self = (cPluginLua*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable '__cWebPlugin__'",NULL); -#endif -#ifdef __cplusplus - tolua_pushusertype(tolua_S,(void*)static_cast<cWebPlugin*>(self), "cWebPlugin"); -#else - tolua_pushusertype(tolua_S,(void*)((cWebPlugin*)self), "cWebPlugin"); -#endif - return 1; -} -#endif //#ifndef TOLUA_DISABLE - /* method: GetDescription of class cServer */ #ifndef TOLUA_DISABLE_tolua_AllToLua_cServer_GetDescription00 static int tolua_AllToLua_cServer_GetDescription00(lua_State* tolua_S) @@ -12225,8 +12487,7 @@ static int tolua_AllToLua_cWorld_QueueSetBlock00(lua_State* tolua_S) !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,1,&tolua_err) || - !tolua_isnoobj(tolua_S,9,&tolua_err) + !tolua_isnoobj(tolua_S,8,&tolua_err) ) goto tolua_lerror; else @@ -12239,12 +12500,11 @@ static int tolua_AllToLua_cWorld_QueueSetBlock00(lua_State* tolua_S) unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,5,0)); unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,6,0)); int a_TickDelay = ((int) tolua_tonumber(tolua_S,7,0)); - unsigned char a_PreviousBlockType = (( unsigned char) tolua_tonumber(tolua_S,8,E_BLOCK_AIR)); #ifndef TOLUA_RELEASE if (!self) tolua_error(tolua_S,"invalid 'self' in function 'QueueSetBlock'", NULL); #endif { - self->QueueSetBlock(a_BlockX,a_BLockY,a_BlockZ,a_BlockType,a_BlockMeta,a_TickDelay,a_PreviousBlockType); + self->QueueSetBlock(a_BlockX,a_BLockY,a_BlockZ,a_BlockType,a_BlockMeta,a_TickDelay); } } return 0; @@ -12652,6 +12912,48 @@ tolua_lerror: } #endif //#ifndef TOLUA_DISABLE +/* method: SpawnFallingBlock of class cWorld */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cWorld_SpawnFallingBlock00 +static int tolua_AllToLua_cWorld_SpawnFallingBlock00(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_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 + { + cWorld* self = (cWorld*) 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)); + unsigned char BlockType = (( unsigned char) tolua_tonumber(tolua_S,5,0)); + unsigned char BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,6,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SpawnFallingBlock'", NULL); +#endif + { + int tolua_ret = (int) self->SpawnFallingBlock(a_X,a_Y,a_Z,BlockType,BlockMeta); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'SpawnFallingBlock'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + /* method: SpawnExperienceOrb of class cWorld */ #ifndef TOLUA_DISABLE_tolua_AllToLua_cWorld_SpawnExperienceOrb00 static int tolua_AllToLua_cWorld_SpawnExperienceOrb00(lua_State* tolua_S) @@ -19495,103 +19797,6 @@ static int tolua_AllToLua_cWebAdmin_GetHTMLEscapedString00(lua_State* tolua_S) } #endif //#ifndef TOLUA_DISABLE -/* method: GetWebTitle of class cWebPlugin */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cWebPlugin_GetWebTitle00 -static int tolua_AllToLua_cWebPlugin_GetWebTitle00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"const cWebPlugin",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const cWebPlugin* self = (const cWebPlugin*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetWebTitle'", NULL); -#endif - { - const AString tolua_ret = (const AString) self->GetWebTitle(); - tolua_pushcppstring(tolua_S,(const char*)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'GetWebTitle'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: HandleWebRequest of class cWebPlugin */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cWebPlugin_HandleWebRequest00 -static int tolua_AllToLua_cWebPlugin_HandleWebRequest00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cWebPlugin",0,&tolua_err) || - !tolua_isusertype(tolua_S,2,"const HTTPRequest",0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cWebPlugin* self = (cWebPlugin*) tolua_tousertype(tolua_S,1,0); - const HTTPRequest* a_Request = ((const HTTPRequest*) tolua_tousertype(tolua_S,2,0)); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HandleWebRequest'", NULL); -#endif - { - AString tolua_ret = (AString) self->HandleWebRequest(a_Request); - tolua_pushcppstring(tolua_S,(const char*)tolua_ret); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'HandleWebRequest'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: SafeString of class cWebPlugin */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cWebPlugin_SafeString00 -static int tolua_AllToLua_cWebPlugin_SafeString00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cWebPlugin",0,&tolua_err) || - !tolua_iscppstring(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - const AString a_String = ((const AString) tolua_tocppstring(tolua_S,2,0)); - { - AString tolua_ret = (AString) cWebPlugin::SafeString(a_String); - tolua_pushcppstring(tolua_S,(const char*)tolua_ret); - tolua_pushcppstring(tolua_S,(const char*)a_String); - } - } - return 2; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'SafeString'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - /* method: Get of class cRoot */ #ifndef TOLUA_DISABLE_tolua_AllToLua_cRoot_Get00 static int tolua_AllToLua_cRoot_Get00(lua_State* tolua_S) @@ -29207,142 +29412,6 @@ tolua_lerror: } #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) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cLuaWindow",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) - ) - 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)); - { - 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); - } - } - return 2; -#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 cLuaWindow */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cLuaWindow_new00_local -static int tolua_AllToLua_cLuaWindow_new00_local(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cLuaWindow",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) - ) - 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)); - { - 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); - } - } - return 2; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); - return 0; -#endif -} -#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) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cLuaWindow",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cLuaWindow* self = (cLuaWindow*) tolua_tousertype(tolua_S,1,0); -#ifndef TOLUA_RELEASE - if (!self) tolua_error(tolua_S,"invalid 'self' in function 'delete'", NULL); -#endif - Mtolua_delete(self); - } - return 0; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'delete'.",&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) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"cLuaWindow",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - cLuaWindow* self = (cLuaWindow*) 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: GetMobType of class cMonster */ #ifndef TOLUA_DISABLE_tolua_AllToLua_cMonster_GetMobType00 static int tolua_AllToLua_cMonster_GetMobType00(lua_State* tolua_S) @@ -29674,6 +29743,106 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_function(tolua_S,"CreateFolder",tolua_AllToLua_cFile_CreateFolder00); tolua_function(tolua_S,"ReadWholeFile",tolua_AllToLua_cFile_ReadWholeFile00); tolua_endmodule(tolua_S); + tolua_function(tolua_S,"GetTime",tolua_AllToLua_GetTime00); + tolua_function(tolua_S,"GetChar",tolua_AllToLua_GetChar00); + tolua_cclass(tolua_S,"cPluginManager","cPluginManager","",NULL); + tolua_beginmodule(tolua_S,"cPluginManager"); + tolua_constant(tolua_S,"HOOK_BLOCK_TO_PICKUPS",cPluginManager::HOOK_BLOCK_TO_PICKUPS); + tolua_constant(tolua_S,"HOOK_CHAT",cPluginManager::HOOK_CHAT); + tolua_constant(tolua_S,"HOOK_CHUNK_AVAILABLE",cPluginManager::HOOK_CHUNK_AVAILABLE); + tolua_constant(tolua_S,"HOOK_CHUNK_GENERATED",cPluginManager::HOOK_CHUNK_GENERATED); + tolua_constant(tolua_S,"HOOK_CHUNK_GENERATING",cPluginManager::HOOK_CHUNK_GENERATING); + tolua_constant(tolua_S,"HOOK_CHUNK_UNLOADED",cPluginManager::HOOK_CHUNK_UNLOADED); + tolua_constant(tolua_S,"HOOK_CHUNK_UNLOADING",cPluginManager::HOOK_CHUNK_UNLOADING); + tolua_constant(tolua_S,"HOOK_COLLECTING_PICKUP",cPluginManager::HOOK_COLLECTING_PICKUP); + tolua_constant(tolua_S,"HOOK_CRAFTING_NO_RECIPE",cPluginManager::HOOK_CRAFTING_NO_RECIPE); + tolua_constant(tolua_S,"HOOK_DISCONNECT",cPluginManager::HOOK_DISCONNECT); + tolua_constant(tolua_S,"HOOK_EXECUTE_COMMAND",cPluginManager::HOOK_EXECUTE_COMMAND); + tolua_constant(tolua_S,"HOOK_EXPLODED",cPluginManager::HOOK_EXPLODED); + tolua_constant(tolua_S,"HOOK_EXPLODING",cPluginManager::HOOK_EXPLODING); + tolua_constant(tolua_S,"HOOK_HANDSHAKE",cPluginManager::HOOK_HANDSHAKE); + tolua_constant(tolua_S,"HOOK_HOPPER_PULLING_ITEM",cPluginManager::HOOK_HOPPER_PULLING_ITEM); + tolua_constant(tolua_S,"HOOK_HOPPER_PUSHING_ITEM",cPluginManager::HOOK_HOPPER_PUSHING_ITEM); + tolua_constant(tolua_S,"HOOK_KILLING",cPluginManager::HOOK_KILLING); + tolua_constant(tolua_S,"HOOK_LOGIN",cPluginManager::HOOK_LOGIN); + tolua_constant(tolua_S,"HOOK_PLAYER_ANIMATION",cPluginManager::HOOK_PLAYER_ANIMATION); + tolua_constant(tolua_S,"HOOK_PLAYER_BREAKING_BLOCK",cPluginManager::HOOK_PLAYER_BREAKING_BLOCK); + tolua_constant(tolua_S,"HOOK_PLAYER_BROKEN_BLOCK",cPluginManager::HOOK_PLAYER_BROKEN_BLOCK); + tolua_constant(tolua_S,"HOOK_PLAYER_EATING",cPluginManager::HOOK_PLAYER_EATING); + tolua_constant(tolua_S,"HOOK_PLAYER_JOINED",cPluginManager::HOOK_PLAYER_JOINED); + tolua_constant(tolua_S,"HOOK_PLAYER_LEFT_CLICK",cPluginManager::HOOK_PLAYER_LEFT_CLICK); + tolua_constant(tolua_S,"HOOK_PLAYER_MOVING",cPluginManager::HOOK_PLAYER_MOVING); + tolua_constant(tolua_S,"HOOK_PLAYER_PLACED_BLOCK",cPluginManager::HOOK_PLAYER_PLACED_BLOCK); + tolua_constant(tolua_S,"HOOK_PLAYER_PLACING_BLOCK",cPluginManager::HOOK_PLAYER_PLACING_BLOCK); + tolua_constant(tolua_S,"HOOK_PLAYER_RIGHT_CLICK",cPluginManager::HOOK_PLAYER_RIGHT_CLICK); + tolua_constant(tolua_S,"HOOK_PLAYER_RIGHT_CLICKING_ENTITY",cPluginManager::HOOK_PLAYER_RIGHT_CLICKING_ENTITY); + tolua_constant(tolua_S,"HOOK_PLAYER_SHOOTING",cPluginManager::HOOK_PLAYER_SHOOTING); + tolua_constant(tolua_S,"HOOK_PLAYER_SPAWNED",cPluginManager::HOOK_PLAYER_SPAWNED); + tolua_constant(tolua_S,"HOOK_PLAYER_TOSSING_ITEM",cPluginManager::HOOK_PLAYER_TOSSING_ITEM); + tolua_constant(tolua_S,"HOOK_PLAYER_USED_BLOCK",cPluginManager::HOOK_PLAYER_USED_BLOCK); + tolua_constant(tolua_S,"HOOK_PLAYER_USED_ITEM",cPluginManager::HOOK_PLAYER_USED_ITEM); + tolua_constant(tolua_S,"HOOK_PLAYER_USING_BLOCK",cPluginManager::HOOK_PLAYER_USING_BLOCK); + tolua_constant(tolua_S,"HOOK_PLAYER_USING_ITEM",cPluginManager::HOOK_PLAYER_USING_ITEM); + tolua_constant(tolua_S,"HOOK_POST_CRAFTING",cPluginManager::HOOK_POST_CRAFTING); + tolua_constant(tolua_S,"HOOK_PRE_CRAFTING",cPluginManager::HOOK_PRE_CRAFTING); + tolua_constant(tolua_S,"HOOK_SPAWNED_ENTITY",cPluginManager::HOOK_SPAWNED_ENTITY); + tolua_constant(tolua_S,"HOOK_SPAWNED_MONSTER",cPluginManager::HOOK_SPAWNED_MONSTER); + tolua_constant(tolua_S,"HOOK_SPAWNING_ENTITY",cPluginManager::HOOK_SPAWNING_ENTITY); + tolua_constant(tolua_S,"HOOK_SPAWNING_MONSTER",cPluginManager::HOOK_SPAWNING_MONSTER); + tolua_constant(tolua_S,"HOOK_TAKE_DAMAGE",cPluginManager::HOOK_TAKE_DAMAGE); + tolua_constant(tolua_S,"HOOK_TICK",cPluginManager::HOOK_TICK); + tolua_constant(tolua_S,"HOOK_UPDATED_SIGN",cPluginManager::HOOK_UPDATED_SIGN); + tolua_constant(tolua_S,"HOOK_UPDATING_SIGN",cPluginManager::HOOK_UPDATING_SIGN); + tolua_constant(tolua_S,"HOOK_WEATHER_CHANGED",cPluginManager::HOOK_WEATHER_CHANGED); + tolua_constant(tolua_S,"HOOK_WEATHER_CHANGING",cPluginManager::HOOK_WEATHER_CHANGING); + tolua_constant(tolua_S,"HOOK_WORLD_TICK",cPluginManager::HOOK_WORLD_TICK); + tolua_constant(tolua_S,"HOOK_NUM_HOOKS",cPluginManager::HOOK_NUM_HOOKS); + tolua_constant(tolua_S,"HOOK_MAX",cPluginManager::HOOK_MAX); + tolua_function(tolua_S,"Get",tolua_AllToLua_cPluginManager_Get00); + tolua_function(tolua_S,"GetPlugin",tolua_AllToLua_cPluginManager_GetPlugin00); + tolua_function(tolua_S,"FindPlugins",tolua_AllToLua_cPluginManager_FindPlugins00); + tolua_function(tolua_S,"ReloadPlugins",tolua_AllToLua_cPluginManager_ReloadPlugins00); + tolua_function(tolua_S,"GetNumPlugins",tolua_AllToLua_cPluginManager_GetNumPlugins00); + tolua_function(tolua_S,"DisablePlugin",tolua_AllToLua_cPluginManager_DisablePlugin00); + tolua_function(tolua_S,"LoadPlugin",tolua_AllToLua_cPluginManager_LoadPlugin00); + tolua_function(tolua_S,"IsCommandBound",tolua_AllToLua_cPluginManager_IsCommandBound00); + tolua_function(tolua_S,"GetCommandPermission",tolua_AllToLua_cPluginManager_GetCommandPermission00); + tolua_function(tolua_S,"ExecuteCommand",tolua_AllToLua_cPluginManager_ExecuteCommand00); + tolua_function(tolua_S,"ForceExecuteCommand",tolua_AllToLua_cPluginManager_ForceExecuteCommand00); + tolua_function(tolua_S,"IsConsoleCommandBound",tolua_AllToLua_cPluginManager_IsConsoleCommandBound00); + tolua_endmodule(tolua_S); + tolua_cclass(tolua_S,"cPlugin","cPlugin","",NULL); + tolua_beginmodule(tolua_S,"cPlugin"); + tolua_function(tolua_S,"GetName",tolua_AllToLua_cPlugin_GetName00); + tolua_function(tolua_S,"SetName",tolua_AllToLua_cPlugin_SetName00); + tolua_function(tolua_S,"GetVersion",tolua_AllToLua_cPlugin_GetVersion00); + tolua_function(tolua_S,"SetVersion",tolua_AllToLua_cPlugin_SetVersion00); + tolua_function(tolua_S,"GetDirectory",tolua_AllToLua_cPlugin_GetDirectory00); + tolua_function(tolua_S,"GetLocalDirectory",tolua_AllToLua_cPlugin_GetLocalDirectory00); + tolua_function(tolua_S,"GetLocalFolder",tolua_AllToLua_cPlugin_GetLocalFolder00); + tolua_endmodule(tolua_S); + tolua_cclass(tolua_S,"cPluginLua","cPluginLua","cPlugin",NULL); + tolua_beginmodule(tolua_S,"cPluginLua"); + tolua_variable(tolua_S,"__cWebPlugin__",tolua_get_cPluginLua___cWebPlugin__,NULL); + tolua_endmodule(tolua_S); + tolua_cclass(tolua_S,"cWebPlugin","cWebPlugin","",NULL); + tolua_beginmodule(tolua_S,"cWebPlugin"); + tolua_function(tolua_S,"GetWebTitle",tolua_AllToLua_cWebPlugin_GetWebTitle00); + tolua_function(tolua_S,"HandleWebRequest",tolua_AllToLua_cWebPlugin_HandleWebRequest00); + tolua_function(tolua_S,"SafeString",tolua_AllToLua_cWebPlugin_SafeString00); + 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_endmodule(tolua_S); tolua_constant(tolua_S,"E_BLOCK_AIR",E_BLOCK_AIR); tolua_constant(tolua_S,"E_BLOCK_STONE",E_BLOCK_STONE); tolua_constant(tolua_S,"E_BLOCK_GRASS",E_BLOCK_GRASS); @@ -30463,6 +30632,7 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_function(tolua_S,"IsValidBlock",tolua_AllToLua_IsValidBlock00); tolua_function(tolua_S,"IsValidItem",tolua_AllToLua_IsValidItem00); tolua_function(tolua_S,"AddFaceDirection",tolua_AllToLua_AddFaceDirection00); + tolua_function(tolua_S,"NormalizeAngleDegrees",tolua_AllToLua_NormalizeAngleDegrees00); tolua_module(tolua_S,"ItemCategory",0); tolua_beginmodule(tolua_S,"ItemCategory"); tolua_function(tolua_S,"IsPickaxe",tolua_AllToLua_ItemCategory_IsPickaxe00); @@ -30478,8 +30648,6 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_function(tolua_S,"IsArmor",tolua_AllToLua_ItemCategory_IsArmor00); tolua_endmodule(tolua_S); tolua_function(tolua_S,"IsBiomeNoDownfall",tolua_AllToLua_IsBiomeNoDownfall00); - tolua_function(tolua_S,"GetTime",tolua_AllToLua_GetTime00); - tolua_function(tolua_S,"GetChar",tolua_AllToLua_GetChar00); tolua_cclass(tolua_S,"cChatColor","cChatColor","",NULL); tolua_beginmodule(tolua_S,"cChatColor"); tolua_variable(tolua_S,"Color",tolua_get_cChatColor_Color,NULL); @@ -30787,86 +30955,6 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_cclass(tolua_S,"cFireChargeEntity","cFireChargeEntity","cProjectileEntity",NULL); tolua_beginmodule(tolua_S,"cFireChargeEntity"); tolua_endmodule(tolua_S); - tolua_cclass(tolua_S,"cPluginManager","cPluginManager","",NULL); - tolua_beginmodule(tolua_S,"cPluginManager"); - tolua_constant(tolua_S,"HOOK_BLOCK_TO_PICKUPS",cPluginManager::HOOK_BLOCK_TO_PICKUPS); - tolua_constant(tolua_S,"HOOK_CHAT",cPluginManager::HOOK_CHAT); - tolua_constant(tolua_S,"HOOK_CHUNK_AVAILABLE",cPluginManager::HOOK_CHUNK_AVAILABLE); - tolua_constant(tolua_S,"HOOK_CHUNK_GENERATED",cPluginManager::HOOK_CHUNK_GENERATED); - tolua_constant(tolua_S,"HOOK_CHUNK_GENERATING",cPluginManager::HOOK_CHUNK_GENERATING); - tolua_constant(tolua_S,"HOOK_CHUNK_UNLOADED",cPluginManager::HOOK_CHUNK_UNLOADED); - tolua_constant(tolua_S,"HOOK_CHUNK_UNLOADING",cPluginManager::HOOK_CHUNK_UNLOADING); - tolua_constant(tolua_S,"HOOK_COLLECTING_PICKUP",cPluginManager::HOOK_COLLECTING_PICKUP); - tolua_constant(tolua_S,"HOOK_CRAFTING_NO_RECIPE",cPluginManager::HOOK_CRAFTING_NO_RECIPE); - tolua_constant(tolua_S,"HOOK_DISCONNECT",cPluginManager::HOOK_DISCONNECT); - tolua_constant(tolua_S,"HOOK_ENTITY_ANIMATION",cPluginManager::HOOK_ENTITY_ANIMATION); - tolua_constant(tolua_S,"HOOK_EXECUTE_COMMAND",cPluginManager::HOOK_EXECUTE_COMMAND); - tolua_constant(tolua_S,"HOOK_EXPLODED",cPluginManager::HOOK_EXPLODED); - tolua_constant(tolua_S,"HOOK_EXPLODING",cPluginManager::HOOK_EXPLODING); - tolua_constant(tolua_S,"HOOK_HANDSHAKE",cPluginManager::HOOK_HANDSHAKE); - tolua_constant(tolua_S,"HOOK_HOPPER_PULLING_ITEM",cPluginManager::HOOK_HOPPER_PULLING_ITEM); - tolua_constant(tolua_S,"HOOK_HOPPER_PUSHING_ITEM",cPluginManager::HOOK_HOPPER_PUSHING_ITEM); - tolua_constant(tolua_S,"HOOK_KILLING",cPluginManager::HOOK_KILLING); - tolua_constant(tolua_S,"HOOK_LOGIN",cPluginManager::HOOK_LOGIN); - tolua_constant(tolua_S,"HOOK_PLAYER_BREAKING_BLOCK",cPluginManager::HOOK_PLAYER_BREAKING_BLOCK); - tolua_constant(tolua_S,"HOOK_PLAYER_BROKEN_BLOCK",cPluginManager::HOOK_PLAYER_BROKEN_BLOCK); - tolua_constant(tolua_S,"HOOK_PLAYER_EATING",cPluginManager::HOOK_PLAYER_EATING); - tolua_constant(tolua_S,"HOOK_PLAYER_JOINED",cPluginManager::HOOK_PLAYER_JOINED); - tolua_constant(tolua_S,"HOOK_PLAYER_LEFT_CLICK",cPluginManager::HOOK_PLAYER_LEFT_CLICK); - tolua_constant(tolua_S,"HOOK_PLAYER_MOVING",cPluginManager::HOOK_PLAYER_MOVING); - tolua_constant(tolua_S,"HOOK_PLAYER_PLACED_BLOCK",cPluginManager::HOOK_PLAYER_PLACED_BLOCK); - tolua_constant(tolua_S,"HOOK_PLAYER_PLACING_BLOCK",cPluginManager::HOOK_PLAYER_PLACING_BLOCK); - tolua_constant(tolua_S,"HOOK_PLAYER_RIGHT_CLICK",cPluginManager::HOOK_PLAYER_RIGHT_CLICK); - tolua_constant(tolua_S,"HOOK_PLAYER_RIGHT_CLICKING_ENTITY",cPluginManager::HOOK_PLAYER_RIGHT_CLICKING_ENTITY); - tolua_constant(tolua_S,"HOOK_PLAYER_SHOOTING",cPluginManager::HOOK_PLAYER_SHOOTING); - tolua_constant(tolua_S,"HOOK_PLAYER_SPAWNED",cPluginManager::HOOK_PLAYER_SPAWNED); - tolua_constant(tolua_S,"HOOK_PLAYER_TOSSING_ITEM",cPluginManager::HOOK_PLAYER_TOSSING_ITEM); - tolua_constant(tolua_S,"HOOK_PLAYER_USED_BLOCK",cPluginManager::HOOK_PLAYER_USED_BLOCK); - tolua_constant(tolua_S,"HOOK_PLAYER_USED_ITEM",cPluginManager::HOOK_PLAYER_USED_ITEM); - tolua_constant(tolua_S,"HOOK_PLAYER_USING_BLOCK",cPluginManager::HOOK_PLAYER_USING_BLOCK); - tolua_constant(tolua_S,"HOOK_PLAYER_USING_ITEM",cPluginManager::HOOK_PLAYER_USING_ITEM); - tolua_constant(tolua_S,"HOOK_POST_CRAFTING",cPluginManager::HOOK_POST_CRAFTING); - tolua_constant(tolua_S,"HOOK_PRE_CRAFTING",cPluginManager::HOOK_PRE_CRAFTING); - tolua_constant(tolua_S,"HOOK_SPAWNED_ENTITY",cPluginManager::HOOK_SPAWNED_ENTITY); - tolua_constant(tolua_S,"HOOK_SPAWNED_MONSTER",cPluginManager::HOOK_SPAWNED_MONSTER); - tolua_constant(tolua_S,"HOOK_SPAWNING_ENTITY",cPluginManager::HOOK_SPAWNING_ENTITY); - tolua_constant(tolua_S,"HOOK_SPAWNING_MONSTER",cPluginManager::HOOK_SPAWNING_MONSTER); - tolua_constant(tolua_S,"HOOK_TAKE_DAMAGE",cPluginManager::HOOK_TAKE_DAMAGE); - tolua_constant(tolua_S,"HOOK_TICK",cPluginManager::HOOK_TICK); - tolua_constant(tolua_S,"HOOK_UPDATED_SIGN",cPluginManager::HOOK_UPDATED_SIGN); - tolua_constant(tolua_S,"HOOK_UPDATING_SIGN",cPluginManager::HOOK_UPDATING_SIGN); - tolua_constant(tolua_S,"HOOK_WEATHER_CHANGED",cPluginManager::HOOK_WEATHER_CHANGED); - tolua_constant(tolua_S,"HOOK_WEATHER_CHANGING",cPluginManager::HOOK_WEATHER_CHANGING); - tolua_constant(tolua_S,"HOOK_WORLD_TICK",cPluginManager::HOOK_WORLD_TICK); - tolua_constant(tolua_S,"HOOK_NUM_HOOKS",cPluginManager::HOOK_NUM_HOOKS); - tolua_constant(tolua_S,"HOOK_MAX",cPluginManager::HOOK_MAX); - tolua_function(tolua_S,"Get",tolua_AllToLua_cPluginManager_Get00); - tolua_function(tolua_S,"GetPlugin",tolua_AllToLua_cPluginManager_GetPlugin00); - tolua_function(tolua_S,"FindPlugins",tolua_AllToLua_cPluginManager_FindPlugins00); - tolua_function(tolua_S,"ReloadPlugins",tolua_AllToLua_cPluginManager_ReloadPlugins00); - tolua_function(tolua_S,"GetNumPlugins",tolua_AllToLua_cPluginManager_GetNumPlugins00); - tolua_function(tolua_S,"DisablePlugin",tolua_AllToLua_cPluginManager_DisablePlugin00); - tolua_function(tolua_S,"LoadPlugin",tolua_AllToLua_cPluginManager_LoadPlugin00); - tolua_function(tolua_S,"IsCommandBound",tolua_AllToLua_cPluginManager_IsCommandBound00); - tolua_function(tolua_S,"GetCommandPermission",tolua_AllToLua_cPluginManager_GetCommandPermission00); - tolua_function(tolua_S,"ExecuteCommand",tolua_AllToLua_cPluginManager_ExecuteCommand00); - tolua_function(tolua_S,"ForceExecuteCommand",tolua_AllToLua_cPluginManager_ForceExecuteCommand00); - tolua_function(tolua_S,"IsConsoleCommandBound",tolua_AllToLua_cPluginManager_IsConsoleCommandBound00); - tolua_endmodule(tolua_S); - tolua_cclass(tolua_S,"cPlugin","cPlugin","",NULL); - tolua_beginmodule(tolua_S,"cPlugin"); - tolua_function(tolua_S,"GetName",tolua_AllToLua_cPlugin_GetName00); - tolua_function(tolua_S,"SetName",tolua_AllToLua_cPlugin_SetName00); - tolua_function(tolua_S,"GetVersion",tolua_AllToLua_cPlugin_GetVersion00); - tolua_function(tolua_S,"SetVersion",tolua_AllToLua_cPlugin_SetVersion00); - tolua_function(tolua_S,"GetDirectory",tolua_AllToLua_cPlugin_GetDirectory00); - tolua_function(tolua_S,"GetLocalDirectory",tolua_AllToLua_cPlugin_GetLocalDirectory00); - tolua_function(tolua_S,"GetLocalFolder",tolua_AllToLua_cPlugin_GetLocalFolder00); - tolua_endmodule(tolua_S); - tolua_cclass(tolua_S,"cPluginLua","cPluginLua","cPlugin",NULL); - tolua_beginmodule(tolua_S,"cPluginLua"); - tolua_variable(tolua_S,"__cWebPlugin__",tolua_get_cPluginLua___cWebPlugin__,NULL); - tolua_endmodule(tolua_S); tolua_cclass(tolua_S,"cServer","cServer","",NULL); tolua_beginmodule(tolua_S,"cServer"); tolua_function(tolua_S,"GetDescription",tolua_AllToLua_cServer_GetDescription00); @@ -30912,6 +31000,7 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_function(tolua_S,"SetBlockMeta",tolua_AllToLua_cWorld_SetBlockMeta01); tolua_function(tolua_S,"SpawnItemPickups",tolua_AllToLua_cWorld_SpawnItemPickups00); tolua_function(tolua_S,"SpawnItemPickups",tolua_AllToLua_cWorld_SpawnItemPickups01); + tolua_function(tolua_S,"SpawnFallingBlock",tolua_AllToLua_cWorld_SpawnFallingBlock00); tolua_function(tolua_S,"SpawnExperienceOrb",tolua_AllToLua_cWorld_SpawnExperienceOrb00); tolua_function(tolua_S,"SpawnPrimedTNT",tolua_AllToLua_cWorld_SpawnPrimedTNT00); tolua_function(tolua_S,"DigBlock",tolua_AllToLua_cWorld_DigBlock00); @@ -31251,12 +31340,6 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_function(tolua_S,"GetBaseURL",tolua_AllToLua_cWebAdmin_GetBaseURL00); tolua_function(tolua_S,"GetHTMLEscapedString",tolua_AllToLua_cWebAdmin_GetHTMLEscapedString00); tolua_endmodule(tolua_S); - tolua_cclass(tolua_S,"cWebPlugin","cWebPlugin","",NULL); - tolua_beginmodule(tolua_S,"cWebPlugin"); - tolua_function(tolua_S,"GetWebTitle",tolua_AllToLua_cWebPlugin_GetWebTitle00); - tolua_function(tolua_S,"HandleWebRequest",tolua_AllToLua_cWebPlugin_HandleWebRequest00); - tolua_function(tolua_S,"SafeString",tolua_AllToLua_cWebPlugin_SafeString00); - tolua_endmodule(tolua_S); tolua_cclass(tolua_S,"cRoot","cRoot","",NULL); tolua_beginmodule(tolua_S,"cRoot"); tolua_function(tolua_S,"Get",tolua_AllToLua_cRoot_Get00); @@ -31658,18 +31741,6 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_function(tolua_S,"SetProperty",tolua_AllToLua_cWindow_SetProperty00); tolua_function(tolua_S,"SetProperty",tolua_AllToLua_cWindow_SetProperty01); 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_endmodule(tolua_S); tolua_cclass(tolua_S,"cMonster","cMonster","cPawn",NULL); tolua_beginmodule(tolua_S,"cMonster"); tolua_constant(tolua_S,"mtInvalidType",cMonster::mtInvalidType); diff --git a/src/Bindings.h b/src/Bindings/Bindings.h index f199b58b1..db545064b 100644 --- a/src/Bindings.h +++ b/src/Bindings/Bindings.h @@ -1,6 +1,6 @@ /* ** Lua binding: AllToLua -** Generated automatically by tolua++-1.0.92 on 12/06/13 23:06:38. +** Generated automatically by tolua++-1.0.92 on 12/08/13 12:56:06. */ /* Exported function */ diff --git a/src/LuaFunctions.h b/src/Bindings/LuaFunctions.h index 0ad420881..4f9eab86d 100644 --- a/src/LuaFunctions.h +++ b/src/Bindings/LuaFunctions.h @@ -1,6 +1,6 @@ #pragma once -#include "MCLogger.h" +#include "../MCLogger.h" #include <time.h> // tolua_begin diff --git a/src/LuaState.cpp b/src/Bindings/LuaState.cpp index 6be1ee58c..6be1ee58c 100644 --- a/src/LuaState.cpp +++ b/src/Bindings/LuaState.cpp diff --git a/src/LuaState.h b/src/Bindings/LuaState.h index 15b0cdeff..15b0cdeff 100644 --- a/src/LuaState.h +++ b/src/Bindings/LuaState.h diff --git a/src/LuaWindow.cpp b/src/Bindings/LuaWindow.cpp index 5f112f1e1..18d8b4467 100644 --- a/src/LuaWindow.cpp +++ b/src/Bindings/LuaWindow.cpp @@ -5,9 +5,9 @@ #include "Globals.h" #include "LuaWindow.h" -#include "UI/SlotArea.h" +#include "../UI/SlotArea.h" #include "PluginLua.h" -#include "Entities/Player.h" +#include "../Entities/Player.h" #include "lua/src/lauxlib.h" // Needed for LUA_REFNIL diff --git a/src/LuaWindow.h b/src/Bindings/LuaWindow.h index 4c32c263e..58d26ef96 100644 --- a/src/LuaWindow.h +++ b/src/Bindings/LuaWindow.h @@ -9,8 +9,8 @@ #pragma once -#include "UI/Window.h" -#include "ItemGrid.h" +#include "../UI/Window.h" +#include "../ItemGrid.h" diff --git a/src/ManualBindings.cpp b/src/Bindings/ManualBindings.cpp index 2483cbef0..d4444aa01 100644 --- a/src/ManualBindings.cpp +++ b/src/Bindings/ManualBindings.cpp @@ -4,22 +4,22 @@ #include "ManualBindings.h" #include "tolua++.h" -#include "Root.h" -#include "World.h" #include "Plugin.h" #include "PluginLua.h" #include "PluginManager.h" -#include "Entities/Player.h" -#include "WebAdmin.h" -#include "ClientHandle.h" -#include "BlockEntities/ChestEntity.h" -#include "BlockEntities/DispenserEntity.h" -#include "BlockEntities/DropperEntity.h" -#include "BlockEntities/FurnaceEntity.h" -#include "BlockEntities/HopperEntity.h" -#include "md5/md5.h" #include "LuaWindow.h" -#include "LineBlockTracer.h" +#include "../Root.h" +#include "../World.h" +#include "../Entities/Player.h" +#include "../WebAdmin.h" +#include "../ClientHandle.h" +#include "../BlockEntities/ChestEntity.h" +#include "../BlockEntities/DispenserEntity.h" +#include "../BlockEntities/DropperEntity.h" +#include "../BlockEntities/FurnaceEntity.h" +#include "../BlockEntities/HopperEntity.h" +#include "md5/md5.h" +#include "../LineBlockTracer.h" diff --git a/src/ManualBindings.h b/src/Bindings/ManualBindings.h index e6594947e..e6594947e 100644 --- a/src/ManualBindings.h +++ b/src/Bindings/ManualBindings.h diff --git a/src/Plugin.cpp b/src/Bindings/Plugin.cpp index 98ccfb88c..98ccfb88c 100644 --- a/src/Plugin.cpp +++ b/src/Bindings/Plugin.cpp diff --git a/src/Plugin.h b/src/Bindings/Plugin.h index 8dd68e6f1..50a89018d 100644 --- a/src/Plugin.h +++ b/src/Bindings/Plugin.h @@ -1,7 +1,6 @@ #pragma once -#include "Item.h" #include "PluginManager.h" diff --git a/src/PluginLua.cpp b/src/Bindings/PluginLua.cpp index 7fc7bc5f1..ebd053a07 100644 --- a/src/PluginLua.cpp +++ b/src/Bindings/PluginLua.cpp @@ -7,7 +7,7 @@ #define LUA_USE_POSIX #include "PluginLua.h" -#include "CommandOutput.h" +#include "../CommandOutput.h" extern "C" { diff --git a/src/PluginLua.h b/src/Bindings/PluginLua.h index 95e7e789f..95e7e789f 100644 --- a/src/PluginLua.h +++ b/src/Bindings/PluginLua.h diff --git a/src/PluginManager.cpp b/src/Bindings/PluginManager.cpp index 5bf8a0232..07f16bba2 100644 --- a/src/PluginManager.cpp +++ b/src/Bindings/PluginManager.cpp @@ -4,15 +4,15 @@ #include "PluginManager.h" #include "Plugin.h" #include "PluginLua.h" -#include "WebAdmin.h" -#include "Item.h" -#include "Root.h" -#include "Server.h" -#include "CommandOutput.h" +#include "../WebAdmin.h" +#include "../Item.h" +#include "../Root.h" +#include "../Server.h" +#include "../CommandOutput.h" #include "inifile/iniFile.h" #include "tolua++.h" -#include "Entities/Player.h" +#include "../Entities/Player.h" diff --git a/src/PluginManager.h b/src/Bindings/PluginManager.h index d2694e818..8282b061c 100644 --- a/src/PluginManager.h +++ b/src/Bindings/PluginManager.h @@ -1,7 +1,7 @@ #pragma once -#include "Item.h" +#include "../Item.h" diff --git a/src/WebPlugin.cpp b/src/Bindings/WebPlugin.cpp index 48ddb2076..3b71d553c 100644 --- a/src/WebPlugin.cpp +++ b/src/Bindings/WebPlugin.cpp @@ -2,9 +2,9 @@ #include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules #include "WebPlugin.h" -#include "WebAdmin.h" -#include "Server.h" -#include "Root.h" +#include "../WebAdmin.h" +#include "../Server.h" +#include "../Root.h" diff --git a/src/WebPlugin.h b/src/Bindings/WebPlugin.h index 22587b892..22587b892 100644 --- a/src/WebPlugin.h +++ b/src/Bindings/WebPlugin.h diff --git a/src/lua5.1.dll b/src/Bindings/lua5.1.dll Binary files differindex 515cf8b30..515cf8b30 100644 --- a/src/lua5.1.dll +++ b/src/Bindings/lua5.1.dll diff --git a/src/tolua++.exe b/src/Bindings/tolua++.exe Binary files differindex e5cec6d78..e5cec6d78 100644 --- a/src/tolua++.exe +++ b/src/Bindings/tolua++.exe diff --git a/src/tolua++.h b/src/Bindings/tolua++.h index 8da427fe3..8da427fe3 100644 --- a/src/tolua++.h +++ b/src/Bindings/tolua++.h diff --git a/src/tolua_base.h b/src/Bindings/tolua_base.h index 4f1038c09..4f1038c09 100644 --- a/src/tolua_base.h +++ b/src/Bindings/tolua_base.h diff --git a/src/virtual_method_hooks.lua b/src/Bindings/virtual_method_hooks.lua index 15ff1d7f8..15ff1d7f8 100644 --- a/src/virtual_method_hooks.lua +++ b/src/Bindings/virtual_method_hooks.lua diff --git a/src/BlockEntities/HopperEntity.cpp b/src/BlockEntities/HopperEntity.cpp index 41849b1b3..21212a363 100644 --- a/src/BlockEntities/HopperEntity.cpp +++ b/src/BlockEntities/HopperEntity.cpp @@ -7,7 +7,7 @@ #include "HopperEntity.h" #include "../Chunk.h" #include "../Entities/Player.h" -#include "../PluginManager.h" +#include "../Bindings/PluginManager.h" #include "ChestEntity.h" #include "DropSpenserEntity.h" #include "FurnaceEntity.h" diff --git a/src/Blocks/BlockHandler.cpp b/src/Blocks/BlockHandler.cpp index 62b57139e..37d948d79 100644 --- a/src/Blocks/BlockHandler.cpp +++ b/src/Blocks/BlockHandler.cpp @@ -4,7 +4,7 @@ #include "../Item.h" #include "../World.h" #include "../Root.h" -#include "../PluginManager.h" +#include "../Bindings/PluginManager.h" #include "BlockBed.h" #include "BlockBrewingStand.h" #include "BlockButton.h" @@ -48,7 +48,6 @@ #include "BlockPumpkin.h" #include "BlockRail.h" #include "BlockRedstone.h" -#include "BlockRedstoneLamp.h" #include "BlockRedstoneRepeater.h" #include "BlockRedstoneTorch.h" #include "BlockSand.h" @@ -151,7 +150,7 @@ cBlockHandler * cBlockHandler::CreateBlockHandler(BLOCKTYPE a_BlockType) case E_BLOCK_LADDER: return new cBlockLadderHandler (a_BlockType); case E_BLOCK_LEVER: return new cBlockLeverHandler (a_BlockType); case E_BLOCK_LAPIS_ORE: return new cBlockOreHandler (a_BlockType); - case E_BLOCK_LAVA: return new cBlockFluidHandler (a_BlockType); + case E_BLOCK_LAVA: return new cBlockLavaHandler (a_BlockType); case E_BLOCK_LEAVES: return new cBlockLeavesHandler (a_BlockType); case E_BLOCK_LIT_FURNACE: return new cBlockFurnaceHandler (a_BlockType); case E_BLOCK_LOG: return new cBlockWoodHandler (a_BlockType); @@ -172,7 +171,6 @@ cBlockHandler * cBlockHandler::CreateBlockHandler(BLOCKTYPE a_BlockType) case E_BLOCK_RAIL: return new cBlockRailHandler (a_BlockType); case E_BLOCK_REDSTONE_ORE: return new cBlockOreHandler (a_BlockType); case E_BLOCK_REDSTONE_ORE_GLOWING: return new cBlockOreHandler (a_BlockType); - case E_BLOCK_REDSTONE_LAMP_ON: return new cBlockRedstoneLampHandler (a_BlockType); case E_BLOCK_REDSTONE_REPEATER_OFF: return new cBlockRedstoneRepeaterHandler(a_BlockType); case E_BLOCK_REDSTONE_REPEATER_ON: return new cBlockRedstoneRepeaterHandler(a_BlockType); case E_BLOCK_REDSTONE_TORCH_OFF: return new cBlockRedstoneTorchHandler (a_BlockType); @@ -187,6 +185,7 @@ cBlockHandler * cBlockHandler::CreateBlockHandler(BLOCKTYPE a_BlockType) case E_BLOCK_SNOW: return new cBlockSnowHandler (a_BlockType); case E_BLOCK_SPRUCE_WOOD_STAIRS: return new cBlockStairsHandler (a_BlockType); case E_BLOCK_STATIONARY_LAVA: return new cBlockLavaHandler (a_BlockType); + case E_BLOCK_STATIONARY_WATER: return new cBlockFluidHandler (a_BlockType); case E_BLOCK_STICKY_PISTON: return new cBlockPistonHandler (a_BlockType); case E_BLOCK_STONE: return new cBlockStoneHandler (a_BlockType); case E_BLOCK_STONE_BRICK_STAIRS: return new cBlockStairsHandler (a_BlockType); diff --git a/src/Chunk.cpp b/src/Chunk.cpp index 4eb11718d..4386ffcb8 100644 --- a/src/Chunk.cpp +++ b/src/Chunk.cpp @@ -27,7 +27,7 @@ #include "MersenneTwister.h" #include "Entities/Player.h" #include "BlockArea.h" -#include "PluginManager.h" +#include "Bindings/PluginManager.h" #include "Blocks/BlockHandler.h" #include "Simulator/FluidSimulator.h" #include "MobCensus.h" diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp index 3ad02ac0e..cb722af3b 100644 --- a/src/ChunkMap.cpp +++ b/src/ChunkMap.cpp @@ -10,7 +10,7 @@ #include "Chunk.h" #include "Generating/Trees.h" // used in cChunkMap::ReplaceTreeBlocks() for tree block discrimination #include "BlockArea.h" -#include "PluginManager.h" +#include "Bindings/PluginManager.h" #include "Entities/TNTEntity.h" #include "Blocks/BlockHandler.h" #include "MobCensus.h" diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index eba895fcd..aa223f5df 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -4,7 +4,7 @@ #include "Server.h" #include "World.h" #include "Entities/Pickup.h" -#include "PluginManager.h" +#include "Bindings/PluginManager.h" #include "Entities/Player.h" #include "Inventory.h" #include "BlockEntities/ChestEntity.h" diff --git a/src/CraftingRecipes.cpp b/src/CraftingRecipes.cpp index 9dc471781..fb1a10cca 100644 --- a/src/CraftingRecipes.cpp +++ b/src/CraftingRecipes.cpp @@ -6,7 +6,7 @@ #include "Globals.h" #include "CraftingRecipes.h" #include "Root.h" -#include "PluginManager.h" +#include "Bindings/PluginManager.h" diff --git a/src/Defines.h b/src/Defines.h index 5b27f4b3f..534802d55 100644 --- a/src/Defines.h +++ b/src/Defines.h @@ -416,6 +416,22 @@ inline float GetSpecialSignf( float a_Val ) // tolua_begin + +/// Normalizes an angle in degrees to the [-180, +180) range: +inline double NormalizeAngleDegrees(const double a_Degrees) +{ + double Norm = fmod(a_Degrees + 180, 360); + if (Norm < 0) + { + Norm += 360; + } + return Norm - 180; +} + + + + + namespace ItemCategory { inline bool IsPickaxe(short a_ItemID) diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp index 3bea7bc01..d728d6cbc 100644 --- a/src/Entities/Entity.cpp +++ b/src/Entities/Entity.cpp @@ -10,7 +10,7 @@ #include "../ClientHandle.h" #include "../Chunk.h" #include "../Simulator/FluidSimulator.h" -#include "../PluginManager.h" +#include "../Bindings/PluginManager.h" #include "../Tracer.h" #include "Minecart.h" @@ -158,8 +158,7 @@ bool cEntity::Initialize(cWorld * a_World) void cEntity::WrapHeadYaw(void) { - while (m_HeadYaw > 180.f) m_HeadYaw -= 360.f; // Wrap it - while (m_HeadYaw < -180.f) m_HeadYaw += 360.f; + m_HeadYaw = NormalizeAngleDegrees(m_HeadYaw); } @@ -168,10 +167,8 @@ void cEntity::WrapHeadYaw(void) void cEntity::WrapRotation(void) { - while (m_Rot.x > 180.f) m_Rot.x -= 360.f; // Wrap it - while (m_Rot.x < -180.f) m_Rot.x += 360.f; - while (m_Rot.y > 180.f) m_Rot.y -= 360.f; - while (m_Rot.y < -180.f) m_Rot.y += 360.f; + m_Rot.x = NormalizeAngleDegrees(m_Rot.x); + m_Rot.y = NormalizeAngleDegrees(m_Rot.z); } diff --git a/src/Entities/Pickup.cpp b/src/Entities/Pickup.cpp index f8aae9703..001e386a7 100644 --- a/src/Entities/Pickup.cpp +++ b/src/Entities/Pickup.cpp @@ -12,7 +12,7 @@ #include "../Simulator/FluidSimulator.h" #include "../Server.h" #include "Player.h" -#include "../PluginManager.h" +#include "../Bindings/PluginManager.h" #include "../Item.h" #include "../Root.h" #include "../Chunk.h" diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index 4684567e6..7a5ff5696 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -8,7 +8,7 @@ #include "../UI/WindowOwner.h" #include "../World.h" #include "Pickup.h" -#include "../PluginManager.h" +#include "../Bindings/PluginManager.h" #include "../BlockEntities/BlockEntity.h" #include "../GroupManager.h" #include "../Group.h" diff --git a/src/Generating/ChunkGenerator.cpp b/src/Generating/ChunkGenerator.cpp index f28504441..126a896af 100644 --- a/src/Generating/ChunkGenerator.cpp +++ b/src/Generating/ChunkGenerator.cpp @@ -5,7 +5,7 @@ #include "../World.h" #include "inifile/iniFile.h" #include "../Root.h" -#include "../PluginManager.h" +#include "../Bindings/PluginManager.h" #include "ChunkDesc.h" #include "ComposableGenerator.h" #include "Noise3DGenerator.h" diff --git a/src/Root.cpp b/src/Root.cpp index 1c81878f9..c99bf76b7 100644 --- a/src/Root.cpp +++ b/src/Root.cpp @@ -8,7 +8,7 @@ #include "FurnaceRecipe.h" #include "GroupManager.h" #include "CraftingRecipes.h" -#include "PluginManager.h" +#include "Bindings/PluginManager.h" #include "MonsterConfig.h" #include "Entities/Player.h" #include "Blocks/BlockHandler.h" diff --git a/src/Server.cpp b/src/Server.cpp index 5951dc5b5..f90f7a474 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -10,7 +10,7 @@ #include "Root.h" #include "World.h" #include "ChunkDef.h" -#include "PluginManager.h" +#include "Bindings/PluginManager.h" #include "GroupManager.h" #include "ChatColor.h" #include "Entities/Player.h" diff --git a/src/WebAdmin.cpp b/src/WebAdmin.cpp index ecc131d21..462702893 100644 --- a/src/WebAdmin.cpp +++ b/src/WebAdmin.cpp @@ -2,10 +2,10 @@ #include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules #include "WebAdmin.h" -#include "WebPlugin.h" +#include "Bindings/WebPlugin.h" -#include "PluginManager.h" -#include "Plugin.h" +#include "Bindings/PluginManager.h" +#include "Bindings/Plugin.h" #include "World.h" #include "Entities/Player.h" diff --git a/src/WebAdmin.h b/src/WebAdmin.h index a775acec2..c629d44ff 100644 --- a/src/WebAdmin.h +++ b/src/WebAdmin.h @@ -6,7 +6,7 @@ #pragma once #include "OSSupport/Socket.h" -#include "LuaState.h" +#include "Bindings/LuaState.h" #include "inifile/iniFile.h" #include "HTTPServer/HTTPServer.h" #include "HTTPServer/HTTPFormParser.h" diff --git a/src/World.cpp b/src/World.cpp index 41f08d97f..f6957f4cd 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -14,6 +14,7 @@ // Entities (except mobs): #include "Entities/ExpOrb.h" +#include "Entities/FallingBlock.h" #include "Entities/Pickup.h" #include "Entities/Player.h" #include "Entities/TNTEntity.h" @@ -35,12 +36,11 @@ #include "MersenneTwister.h" #include "Generating/Trees.h" -#include "PluginManager.h" +#include "Bindings/PluginManager.h" #include "Blocks/BlockHandler.h" #include "Vector3d.h" #include "Tracer.h" -#include "tolua++.h" // DEBUG: Test out the cLineBlockTracer class by tracing a few lines: #include "LineBlockTracer.h" @@ -1634,6 +1634,17 @@ void cWorld::SpawnItemPickups(const cItems & a_Pickups, double a_BlockX, double +int cWorld::SpawnFallingBlock(int a_X, int a_Y, int a_Z, BLOCKTYPE BlockType, NIBBLETYPE BlockMeta) +{ + cFallingBlock * FallingBlock = new cFallingBlock(Vector3i(a_X, a_Y, a_Z), BlockType, BlockMeta); + FallingBlock->Initialize(this); + return FallingBlock->GetUniqueID(); +} + + + + + int cWorld::SpawnExperienceOrb(double a_X, double a_Y, double a_Z, int a_Reward) { cExpOrb * ExpOrb = new cExpOrb(a_X, a_Y, a_Z, a_Reward); diff --git a/src/World.h b/src/World.h index fadb8aac6..b6ab321fb 100644 --- a/src/World.h +++ b/src/World.h @@ -355,6 +355,9 @@ public: /// Spawns item pickups for each item in the list. May compress pickups if too many entities. All pickups get the speed specified: void SpawnItemPickups(const cItems & a_Pickups, double a_BlockX, double a_BlockY, double a_BlockZ, double a_SpeedX, double a_SpeedY, double a_SpeedZ, bool IsPlayerCreated = false); + /// Spawns an falling block entity at the given position. It returns the UniqueID of the spawned falling block. + int SpawnFallingBlock(int a_X, int a_Y, int a_Z, BLOCKTYPE BlockType, NIBBLETYPE BlockMeta); + /// Spawns an experience orb at the given location with the given reward. It returns the UniqueID of the spawned experience orb. int SpawnExperienceOrb(double a_X, double a_Y, double a_Z, int a_Reward); |