This commit is contained in:
HybridDog 2015-06-16 19:30:22 +02:00
parent f3493a45ec
commit b6b14c5570

View File

@ -5,6 +5,9 @@ riesenpilz = {}
dofile(minetest.get_modpath("riesenpilz").."/settings.lua")
dofile(minetest.get_modpath("riesenpilz").."/functions.lua")
--Growing Functions
local function r_area(manip, width, height, pos)
local emerged_pos1, emerged_pos2 = manip:read_from_map(
{x=pos.x-width, y=pos.y, z=pos.z-width},
@ -23,8 +26,6 @@ local function set_vm_data(manip, nodes, pos, t1, name)
end
--Growing Functions
local c
function riesenpilz.red(pos, nodes, area, w)
@ -680,13 +681,22 @@ for name,i in pairs(mushrooms_list) do
local f = minetest.get_node({x=p.x, y=p.y+y-1, z=p.z}).name
if f ~= "air" then
-- they grown on walkable, cubic nodes
-- they grown on specific nodes
local data = minetest.registered_nodes[f]
if data
and data.walkable
and data.groups
and (not data.drawtype
or data.drawtype == "normal"
) then
local ground_disallowed
for n,i in pairs(grounds) do
if data.groups[n] ~= i then
ground_disallowed = true
break
end
end
if not ground_disallowed then
-- they also need specific light strengths
local light = minetest.get_node_light(pos, 0.5)
@ -695,6 +705,7 @@ for name,i in pairs(mushrooms_list) do
table.insert(ps, pos)
end
end
end
break
end
end
@ -726,7 +737,7 @@ end)
--Mushroom Blocks
--Mushroom Nodes
local pilznode_list = {