diff options
author | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-02-05 22:45:45 +0100 |
---|---|---|
committer | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-02-05 22:50:18 +0100 |
commit | ca6ef58b1ee8521e4b940ee4883dee714960e413 (patch) | |
tree | 8532add455224b07c07a759e3d906f50c0695888 /src/Bindings/ManualBindings_World.cpp | |
parent | Merge pull request #2972 from marvinkopf/PlayerAutoComplete (diff) | |
download | cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.gz cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.bz2 cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.lz cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.xz cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.zst cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.zip |
Diffstat (limited to 'src/Bindings/ManualBindings_World.cpp')
-rw-r--r-- | src/Bindings/ManualBindings_World.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/Bindings/ManualBindings_World.cpp b/src/Bindings/ManualBindings_World.cpp index f40af9778..00d2169d8 100644 --- a/src/Bindings/ManualBindings_World.cpp +++ b/src/Bindings/ManualBindings_World.cpp @@ -30,7 +30,7 @@ static int tolua_cWorld_BroadcastParticleEffect(lua_State * tolua_S) { return 0; } - + // Read the params: cWorld * World = nullptr; AString Name; @@ -68,7 +68,7 @@ static int tolua_cWorld_ChunkStay(lua_State * tolua_S) World:ChunkStay(ChunkCoordTable, OnChunkAvailable, OnAllChunksAvailable) ChunkCoordTable == { {Chunk1x, Chunk1z}, {Chunk2x, Chunk2z}, ... } */ - + cLuaState L(tolua_S); if ( !L.CheckParamUserType (1, "cWorld") || @@ -78,13 +78,13 @@ static int tolua_cWorld_ChunkStay(lua_State * tolua_S) { return 0; } - + cPluginLua * Plugin = cManualBindings::GetLuaPlugin(tolua_S); if (Plugin == nullptr) { return 0; } - + // Read the params: cWorld * World = reinterpret_cast<cWorld *>(tolua_tousertype(tolua_S, 1, nullptr)); if (World == nullptr) @@ -116,7 +116,7 @@ static int tolua_cWorld_DoExplosionAt(lua_State * tolua_S) /* Function signature: World:DoExplosionAt(ExplosionSize, BlockX, BlockY, BlockZ, CanCauseFire, SourceType, [SourceData]) */ - + cLuaState L(tolua_S); if ( !L.CheckParamUserType (1, "cWorld") || @@ -128,7 +128,7 @@ static int tolua_cWorld_DoExplosionAt(lua_State * tolua_S) { return 0; } - + // Read the params: cWorld * World; double ExplosionSize; @@ -405,7 +405,7 @@ static int tolua_cWorld_PrepareChunk(lua_State * tolua_S) /* Function signature: World:PrepareChunk(ChunkX, ChunkZ, Callback) */ - + // Check the param types: cLuaState L(tolua_S); if ( @@ -416,7 +416,7 @@ static int tolua_cWorld_PrepareChunk(lua_State * tolua_S) { return 0; } - + // Read the params: cWorld * world = nullptr; int chunkX = 0; @@ -497,7 +497,7 @@ static int tolua_cWorld_QueueTask(lua_State * tolua_S) { // Binding for cWorld::QueueTask // Params: function - + // Retrieve the cPlugin from the LuaState: cPluginLua * Plugin = cManualBindings::GetLuaPlugin(tolua_S); if (Plugin == nullptr) @@ -578,7 +578,7 @@ static int tolua_cWorld_ScheduleTask(lua_State * tolua_S) { // Binding for cWorld::ScheduleTask // Params: function, Ticks - + // Retrieve the cPlugin from the LuaState: cPluginLua * Plugin = cManualBindings::GetLuaPlugin(tolua_S); if (Plugin == nullptr) @@ -609,7 +609,7 @@ static int tolua_cWorld_ScheduleTask(lua_State * tolua_S) { return cManualBindings::lua_do_error(tolua_S, "Error in function call '#funcname#': Could not get function reference of parameter #1"); } - + auto ResettableTask = std::make_shared<cLuaWorldTask>(*Plugin, FnRef); Plugin->AddResettable(ResettableTask); World->ScheduleTask(static_cast<int>(tolua_tonumber(tolua_S, 2, 0)), std::bind(&cLuaWorldTask::Run, ResettableTask, std::placeholders::_1)); |