summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MCServer/Plugins/TestLuaRocks/TestLuaRocks.lua2
-rw-r--r--lib/lua/CMakeLists.txt5
-rw-r--r--src/Blocks/BlockGlowstone.h4
3 files changed, 8 insertions, 3 deletions
diff --git a/MCServer/Plugins/TestLuaRocks/TestLuaRocks.lua b/MCServer/Plugins/TestLuaRocks/TestLuaRocks.lua
index 6e90b1ae9..4a7cd4e1e 100644
--- a/MCServer/Plugins/TestLuaRocks/TestLuaRocks.lua
+++ b/MCServer/Plugins/TestLuaRocks/TestLuaRocks.lua
@@ -27,7 +27,7 @@ LOG("headers: ");
for k, v in pairs(headers or {}) do
LOG(" " .. k .. ": " .. v);
end
-LOG("body length: " .. string.length(body));
+LOG("body length: " .. string.len(body));
diff --git a/lib/lua/CMakeLists.txt b/lib/lua/CMakeLists.txt
index b4b5b5f1d..af03f4b1a 100644
--- a/lib/lua/CMakeLists.txt
+++ b/lib/lua/CMakeLists.txt
@@ -25,6 +25,11 @@ else()
add_library(lua ${SOURCE})
endif()
+# Tell Lua what dynamic loader to use (for LuaRocks):
+if (UNIX)
+ add_definitions(-DLUA_USE_DLOPEN)
+endif()
+
if (UNIX)
target_link_libraries(lua m ${DYNAMIC_LOADER})
endif()
diff --git a/src/Blocks/BlockGlowstone.h b/src/Blocks/BlockGlowstone.h
index 5f0d95dee..6c198efc4 100644
--- a/src/Blocks/BlockGlowstone.h
+++ b/src/Blocks/BlockGlowstone.h
@@ -20,8 +20,8 @@ public:
virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
{
// Reset meta to 0
- // TODO: More drops?
- a_Pickups.push_back(cItem(E_ITEM_GLOWSTONE_DUST, 1, 0));
+ MTRand r1;
+ a_Pickups.push_back(cItem(E_ITEM_GLOWSTONE_DUST, (char)(2 + r1.randInt(2)), 0));
}
} ;