mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2025-07-12 13:30:30 +02:00
added mineclone groups to all registered nodes. TODO: craftitems.
This was extremely tedious. Completely untested, aside from simply running the game.
This commit is contained in:
@ -20,15 +20,17 @@ local get_node_box = function(connector_thickness)
|
||||
}
|
||||
end
|
||||
|
||||
local anchor_groups = {"group:soil", "group:stone", "group:tree", "group:wood", "group:webbing", "group:solid"}
|
||||
|
||||
local in_anchor_group = function(name)
|
||||
return
|
||||
minetest.get_item_group(name, "soil") > 0 or
|
||||
minetest.get_item_group(name, "stone") > 0 or
|
||||
minetest.get_item_group(name, "tree") > 0 or
|
||||
minetest.get_item_group(name, "leaves") > 0 or
|
||||
minetest.get_item_group(name, "sand") > 0 or
|
||||
minetest.get_item_group(name, "wood") > 0 or
|
||||
name == "ignore"
|
||||
for _, group in pairs(anchor_groups) do
|
||||
if minetest.get_item_group(name, group:strsub(7)) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
if name == "ignore" then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
local cardinal_directions = {
|
||||
@ -125,7 +127,7 @@ minetest.register_node("big_webs:webbing", {
|
||||
{name="big_webs.png"},
|
||||
},
|
||||
use_texture_alpha = "blend",
|
||||
connects_to = {"group:soil", "group:stone", "group:tree", "group:leaves", "group:sand", "group:wood", "group:webbing"},
|
||||
connects_to = anchor_groups,
|
||||
connect_sides = { "top", "bottom", "front", "left", "back", "right" },
|
||||
drawtype = "nodebox",
|
||||
node_box = get_node_box(0.0625),
|
||||
@ -135,8 +137,7 @@ minetest.register_node("big_webs:webbing", {
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
climbable = true,
|
||||
floodable = true,
|
||||
groups = {snappy = 2, choppy = 2, webbing = 1, flammable=1, fall_damage_add_percent=-100, bouncy=20},
|
||||
groups = {snappy = 2, choppy = 2, webbing = 1, shearsy = 1, swordy=1, flammable=1, destroy_by_lava_flow=1, fall_damage_add_percent=-100, bouncy=20},
|
||||
sounds = sound,
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(30)
|
||||
@ -175,7 +176,7 @@ minetest.register_node("big_webs:web_egg", {
|
||||
{name="big_webs.png"},
|
||||
},
|
||||
use_texture_alpha = "blend",
|
||||
connects_to = {"group:soil", "group:stone", "group:tree", "group:leaves", "group:sand", "group:wood", "group:webbing"},
|
||||
connects_to = anchor_groups,
|
||||
connect_sides = { "top", "bottom", "front", "left", "back", "right" },
|
||||
drawtype = "nodebox",
|
||||
node_box = get_node_box(0.0625),
|
||||
|
Reference in New Issue
Block a user