From f99ba3a1f63190a5185eed90de8003af40c98a3e Mon Sep 17 00:00:00 2001 From: Splizard Date: Mon, 12 Jan 2015 11:12:51 +1300 Subject: [PATCH] Small fixes for the latest version of minetest. --- init.lua | 1 + src/snowball.lua | 6 ++++++ src/util.lua | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index ccfa3cf..acaca95 100644 --- a/init.lua +++ b/init.lua @@ -127,6 +127,7 @@ snow.is_uneven = function(pos) local found local foundx local foundy + local foundz for x=-1,1 do for z=-1,1 do local node = get_node({x=pos.x+x,y=pos.y,z=pos.z+z}) diff --git a/src/snowball.lua b/src/snowball.lua index cb7468c..484e814 100644 --- a/src/snowball.lua +++ b/src/snowball.lua @@ -130,6 +130,12 @@ minetest.override_item("default:snow", { } } }, + node_box = { + type = "leveled", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.5+2/16, 0.5}, + }, + }, groups = {cracky=3, crumbly=3, choppy=3, oddly_breakable_by_hand=3,falling_node=1, melts=2, float=1}, sunlight_propagates = true, --Disable placement prediction for snow. diff --git a/src/util.lua b/src/util.lua index 20fdd2d..1ddf4f9 100644 --- a/src/util.lua +++ b/src/util.lua @@ -48,7 +48,7 @@ local function loadConfig(path) io.close(file) for line in io.lines(path) do if line:sub(1,1) ~= "#" then - i, v = line:match("^(%S*) = (%S*)") + local i, v = line:match("^(%S*) = (%S*)") if i and v then if v == "true" then v = true end if v == "false" then v = false end