Cooperate with underworlds mod.
This commit is contained in:
parent
bdca26220d
commit
2186b24632
5 changed files with 161 additions and 97 deletions
211
nodes.lua
211
nodes.lua
|
@ -5,46 +5,59 @@
|
|||
|
||||
local light_max = fun_caves_mod.light_max or 10
|
||||
|
||||
-- black (oily) sand
|
||||
local newnode = fun_caves_mod.clone_node("default:sand")
|
||||
newnode.description = "Black Sand"
|
||||
newnode.tiles = {"fun_caves_black_sand.png"}
|
||||
newnode.groups['falling_node'] = 0
|
||||
minetest.register_node("fun_caves:black_sand", newnode)
|
||||
if minetest.registered_items['underworlds:black_sand'] then
|
||||
minetest.register_alias("fun_caves:black_sand", 'underworlds:black_sand')
|
||||
else
|
||||
-- black (oily) sand
|
||||
local newnode = fun_caves_mod.clone_node("default:sand")
|
||||
newnode.description = "Black Sand"
|
||||
newnode.tiles = {"fun_caves_black_sand.png"}
|
||||
newnode.groups['falling_node'] = 0
|
||||
minetest.register_node("fun_caves:black_sand", newnode)
|
||||
end
|
||||
|
||||
-- cobble, hot - cobble with lava instead of mortar XD
|
||||
minetest.register_node("fun_caves:hot_cobble", {
|
||||
description = "Hot Cobble",
|
||||
tiles = {"caverealms_hot_cobble.png"},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=2, surface_hot=3},
|
||||
--light_source = 2,
|
||||
damage_per_second = 1,
|
||||
sounds = default.node_sound_stone_defaults({
|
||||
footstep = {name="default_stone_footstep", gain=0.25},
|
||||
}),
|
||||
})
|
||||
if minetest.registered_items['underworlds:hot_cobble'] then
|
||||
minetest.register_alias("fun_caves:hot_cobble", 'underworlds:hot_cobble')
|
||||
else
|
||||
-- cobble, hot - cobble with lava instead of mortar XD
|
||||
minetest.register_node("fun_caves:hot_cobble", {
|
||||
description = "Hot Cobble",
|
||||
tiles = {"caverealms_hot_cobble.png"},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=2, surface_hot=3},
|
||||
--light_source = 2,
|
||||
damage_per_second = 1,
|
||||
sounds = default.node_sound_stone_defaults({
|
||||
footstep = {name="default_stone_footstep", gain=0.25},
|
||||
}),
|
||||
})
|
||||
end
|
||||
|
||||
-- Glowing fungal stone provides an eerie light.
|
||||
minetest.register_node("fun_caves:glowing_fungal_stone", {
|
||||
description = "Glowing Fungal Stone",
|
||||
tiles = {"default_stone.png^vmg_glowing_fungal.png",},
|
||||
is_ground_content = true,
|
||||
light_source = light_max - 4,
|
||||
groups = {cracky=3, stone=1},
|
||||
drop = {items={ {items={"default:cobble"},}, {items={"fun_caves:glowing_fungus",},},},},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
if minetest.registered_items['underworlds:glowing_fungal_stone'] then
|
||||
minetest.register_alias("fun_caves:glowing_fungal_stone", 'underworlds:glowing_fungal_stone')
|
||||
minetest.register_alias("fun_caves:glowing_fungus", 'underworlds:glowing_fungus')
|
||||
else
|
||||
-- Glowing fungal stone provides an eerie light.
|
||||
minetest.register_node("fun_caves:glowing_fungal_stone", {
|
||||
description = "Glowing Fungal Stone",
|
||||
tiles = {"default_stone.png^vmg_glowing_fungal.png",},
|
||||
is_ground_content = true,
|
||||
light_source = light_max - 4,
|
||||
groups = {cracky=3, stone=1},
|
||||
drop = {items={ {items={"default:cobble"},}, {items={"fun_caves:glowing_fungus",},},},},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
-- Glowing fungus grows underground.
|
||||
minetest.register_craftitem("fun_caves:glowing_fungus", {
|
||||
description = "Glowing Fungus",
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
tiles = {"vmg_glowing_fungus.png"},
|
||||
inventory_image = "vmg_glowing_fungus.png",
|
||||
groups = {dig_immediate = 3},
|
||||
})
|
||||
-- Glowing fungus grows underground.
|
||||
minetest.register_craftitem("fun_caves:glowing_fungus", {
|
||||
description = "Glowing Fungus",
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
tiles = {"vmg_glowing_fungus.png"},
|
||||
inventory_image = "vmg_glowing_fungus.png",
|
||||
groups = {dig_immediate = 3},
|
||||
})
|
||||
end
|
||||
|
||||
-- moon glass (glows)
|
||||
if not minetest.registered_items['elixirs:moon_glass'] then
|
||||
|
@ -167,6 +180,25 @@ newnode.tiles = {"fun_caves_radioactive_ore.png"}
|
|||
newnode.light_source = 4
|
||||
minetest.register_node("fun_caves:radioactive_ore", newnode)
|
||||
|
||||
if minetest.registered_items['underworlds:thin_ice'] then
|
||||
minetest.register_alias("fun_caves:thin_ice", 'underworlds:thin_ice')
|
||||
else
|
||||
-- ice, thin -- transparent
|
||||
minetest.register_node("fun_caves:thin_ice", {
|
||||
description = "Thin Ice",
|
||||
tiles = {"caverealms_thin_ice.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
use_texture_alpha = true,
|
||||
light_source = 1,
|
||||
drawtype = "glasslike",
|
||||
sunlight_propagates = true,
|
||||
freezemelt = "default:water_source",
|
||||
paramtype = "light",
|
||||
})
|
||||
end
|
||||
|
||||
-- What's a cave without speleothems?
|
||||
local spel = {
|
||||
{type1="stalactite", type2="stalagmite", tile="default_stone.png"},
|
||||
|
@ -175,42 +207,49 @@ local spel = {
|
|||
{type1="icicle_down", type2="icicle_up", desc="Icicle", tile="caverealms_thin_ice.png", drop="default:ice"},
|
||||
}
|
||||
|
||||
for _, desc in pairs(spel) do
|
||||
minetest.register_node("fun_caves:"..desc.type1, {
|
||||
description = (desc.desc or "Stalactite"),
|
||||
tiles = {desc.tile},
|
||||
is_ground_content = true,
|
||||
walkable = false,
|
||||
paramtype = "light",
|
||||
drop = (desc.drop or "fun_caves:stalactite"),
|
||||
drawtype = "nodebox",
|
||||
node_box = { type = "fixed",
|
||||
fixed = {
|
||||
{-0.07, 0.0, -0.07, 0.07, 0.5, 0.07},
|
||||
{-0.04, -0.25, -0.04, 0.04, 0.0, 0.04},
|
||||
{-0.02, -0.5, -0.02, 0.02, 0.25, 0.02},
|
||||
} },
|
||||
groups = {rock=1, cracky=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
if minetest.registered_items['underworlds:stalactite'] then
|
||||
for _, desc in pairs(spel) do
|
||||
minetest.register_alias("fun_caves:"..desc.type1, 'underworlds:'..desc.type1)
|
||||
minetest.register_alias("fun_caves:"..desc.type2, 'underworlds:'..desc.type2)
|
||||
end
|
||||
else
|
||||
for _, desc in pairs(spel) do
|
||||
minetest.register_node("fun_caves:"..desc.type1, {
|
||||
description = (desc.desc or "Stalactite"),
|
||||
tiles = {desc.tile},
|
||||
is_ground_content = true,
|
||||
walkable = false,
|
||||
paramtype = "light",
|
||||
drop = (desc.drop or "fun_caves:stalactite"),
|
||||
drawtype = "nodebox",
|
||||
node_box = { type = "fixed",
|
||||
fixed = {
|
||||
{-0.07, 0.0, -0.07, 0.07, 0.5, 0.07},
|
||||
{-0.04, -0.25, -0.04, 0.04, 0.0, 0.04},
|
||||
{-0.02, -0.5, -0.02, 0.02, 0.25, 0.02},
|
||||
} },
|
||||
groups = {rock=1, cracky=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("fun_caves:"..desc.type2, {
|
||||
description = (desc.desc or "Stalagmite"),
|
||||
tiles = {desc.tile},
|
||||
is_ground_content = true,
|
||||
walkable = false,
|
||||
paramtype = "light",
|
||||
drop = "fun_caves:stalagmite",
|
||||
drawtype = "nodebox",
|
||||
node_box = { type = "fixed",
|
||||
fixed = {
|
||||
{-0.07, -0.5, -0.07, 0.07, 0.0, 0.07},
|
||||
{-0.04, 0.0, -0.04, 0.04, 0.25, 0.04},
|
||||
{-0.02, 0.25, -0.02, 0.02, 0.5, 0.02},
|
||||
} },
|
||||
groups = {rock=1, cracky=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
minetest.register_node("fun_caves:"..desc.type2, {
|
||||
description = (desc.desc or "Stalagmite"),
|
||||
tiles = {desc.tile},
|
||||
is_ground_content = true,
|
||||
walkable = false,
|
||||
paramtype = "light",
|
||||
drop = "fun_caves:stalagmite",
|
||||
drawtype = "nodebox",
|
||||
node_box = { type = "fixed",
|
||||
fixed = {
|
||||
{-0.07, -0.5, -0.07, 0.07, 0.0, 0.07},
|
||||
{-0.04, 0.0, -0.04, 0.04, 0.25, 0.04},
|
||||
{-0.02, 0.25, -0.02, 0.02, 0.5, 0.02},
|
||||
} },
|
||||
groups = {rock=1, cracky=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
-- spikes, hot -- silicon-based life
|
||||
|
@ -265,18 +304,22 @@ newnode.sounds = default.node_sound_dirt_defaults({
|
|||
})
|
||||
minetest.register_node("fun_caves:stone_with_algae", newnode)
|
||||
|
||||
-- stone, hot
|
||||
minetest.register_node("fun_caves:hot_stone", {
|
||||
description = "Hot Stone",
|
||||
tiles = {"default_desert_stone.png^[colorize:#FF0000:150"},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=2, surface_hot=3},
|
||||
light_source = light_max - 5,
|
||||
damage_per_second = 1,
|
||||
sounds = default.node_sound_stone_defaults({
|
||||
footstep = {name="default_stone_footstep", gain=0.25},
|
||||
}),
|
||||
})
|
||||
if minetest.registered_items['underworlds:hot_stone'] then
|
||||
minetest.register_alias("fun_caves:hot_stone", 'underworlds:hot_stone')
|
||||
else
|
||||
-- stone, hot
|
||||
minetest.register_node("fun_caves:hot_stone", {
|
||||
description = "Hot Stone",
|
||||
tiles = {"default_desert_stone.png^[colorize:#FF0000:150"},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=2, surface_hot=3},
|
||||
light_source = light_max - 5,
|
||||
damage_per_second = 1,
|
||||
sounds = default.node_sound_stone_defaults({
|
||||
footstep = {name="default_stone_footstep", gain=0.25},
|
||||
}),
|
||||
})
|
||||
end
|
||||
|
||||
-- stone with lichen
|
||||
newnode = fun_caves_mod.clone_node("default:stone")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue