update ground content check
This commit is contained in:
parent
a75cdf65e8
commit
deae92e2ab
8
init.lua
8
init.lua
@ -68,12 +68,14 @@ mapgen_helper.buildable_to = function(c_node)
|
||||
return buildable_to[c_node]
|
||||
end
|
||||
|
||||
local is_ground_content
|
||||
local is_ground_content = nil
|
||||
mapgen_helper.is_ground_content = function(c_node) -- If false, the cave generator will not carve through this node
|
||||
if is_ground_content then return is_ground_content[c_node] end
|
||||
if is_ground_content ~= nil then
|
||||
return is_ground_content[c_node]
|
||||
end
|
||||
is_ground_content = {}
|
||||
for k, v in pairs(minetest.registered_nodes) do
|
||||
if v.is_ground_content then
|
||||
if v.is_ground_content == true then
|
||||
is_ground_content[minetest.get_content_id(k)] = true
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user