2017-03-25 11:55:00 -06:00
|
|
|
-- internationalization boilerplate
|
|
|
|
local MP = minetest.get_modpath(minetest.get_current_modname())
|
|
|
|
local S, NS = dofile(MP.."/intllib.lua")
|
2014-06-28 13:01:39 -10:00
|
|
|
|
|
|
|
--NODES--
|
|
|
|
|
2014-06-30 11:08:23 -10:00
|
|
|
local FALLING_ICICLES = caverealms.config.falling_icicles --true --toggle to turn on or off falling icicles in glaciated biome
|
|
|
|
local FALLCHA = caverealms.config.fallcha --0.33 --chance of causing the structure to fall
|
2015-01-06 11:57:15 -10:00
|
|
|
local DM_TOP = caverealms.config.dm_top -- -4000 --level at which Dungeon Master Realms start to appear
|
2014-06-30 11:08:23 -10:00
|
|
|
|
|
|
|
|
2014-06-28 13:01:39 -10:00
|
|
|
--glowing crystal
|
|
|
|
minetest.register_node("caverealms:glow_crystal", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Glow Crystal"),
|
2014-06-28 13:01:39 -10:00
|
|
|
tiles = {"caverealms_glow_crystal.png"},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {cracky=3},
|
|
|
|
sounds = default.node_sound_glass_defaults(),
|
|
|
|
light_source = 13,
|
|
|
|
paramtype = "light",
|
|
|
|
use_texture_alpha = true,
|
|
|
|
drawtype = "glasslike",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
})
|
|
|
|
|
|
|
|
--glowing emerald
|
|
|
|
minetest.register_node("caverealms:glow_emerald", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Glow Emerald"),
|
2014-06-28 13:01:39 -10:00
|
|
|
tiles = {"caverealms_glow_emerald.png"},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {cracky=3},
|
|
|
|
sounds = default.node_sound_glass_defaults(),
|
|
|
|
light_source = 13,
|
|
|
|
paramtype = "light",
|
|
|
|
use_texture_alpha = true,
|
|
|
|
drawtype = "glasslike",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
})
|
|
|
|
|
|
|
|
--glowing mese crystal blocks
|
|
|
|
minetest.register_node("caverealms:glow_mese", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Mese Crystal Block"),
|
2014-06-28 13:01:39 -10:00
|
|
|
tiles = {"caverealms_glow_mese.png"},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {cracky=3},
|
|
|
|
sounds = default.node_sound_glass_defaults(),
|
|
|
|
light_source = 13,
|
|
|
|
paramtype = "light",
|
|
|
|
use_texture_alpha = true,
|
|
|
|
drawtype = "glasslike",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
})
|
|
|
|
|
2014-08-05 16:11:42 -10:00
|
|
|
--glowing ruby
|
|
|
|
minetest.register_node("caverealms:glow_ruby", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Glow Ruby"),
|
2014-08-05 16:11:42 -10:00
|
|
|
tiles = {"caverealms_glow_ruby.png"},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {cracky=3},
|
|
|
|
sounds = default.node_sound_glass_defaults(),
|
|
|
|
light_source = 13,
|
|
|
|
paramtype = "light",
|
|
|
|
use_texture_alpha = true,
|
|
|
|
drawtype = "glasslike",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
})
|
|
|
|
|
2014-12-16 19:57:25 -10:00
|
|
|
--glowing amethyst
|
|
|
|
minetest.register_node("caverealms:glow_amethyst", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Glow Amethyst"),
|
2014-12-16 19:57:25 -10:00
|
|
|
tiles = {"caverealms_glow_amethyst.png"},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {cracky=3},
|
|
|
|
sounds = default.node_sound_glass_defaults(),
|
|
|
|
light_source = 13,
|
|
|
|
paramtype = "light",
|
|
|
|
use_texture_alpha = true,
|
|
|
|
drawtype = "glasslike",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
})
|
|
|
|
|
2014-06-28 13:01:39 -10:00
|
|
|
--embedded crystal
|
|
|
|
minetest.register_node("caverealms:glow_ore", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Glow Crystal Ore"),
|
2014-06-28 13:01:39 -10:00
|
|
|
tiles = {"caverealms_glow_ore.png"},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {cracky=2},
|
|
|
|
sounds = default.node_sound_glass_defaults(),
|
|
|
|
light_source = 10,
|
|
|
|
paramtype = "light",
|
|
|
|
})
|
|
|
|
|
|
|
|
--embedded emerald
|
|
|
|
minetest.register_node("caverealms:glow_emerald_ore", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Glow Emerald Ore"),
|
2014-06-28 13:01:39 -10:00
|
|
|
tiles = {"caverealms_glow_emerald_ore.png"},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {cracky=2},
|
|
|
|
sounds = default.node_sound_glass_defaults(),
|
|
|
|
light_source = 10,
|
|
|
|
paramtype = "light",
|
|
|
|
})
|
|
|
|
|
2014-12-16 19:57:25 -10:00
|
|
|
--embedded ruby
|
2014-08-05 16:11:42 -10:00
|
|
|
minetest.register_node("caverealms:glow_ruby_ore", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Glow Ruby Ore"),
|
2014-08-05 16:11:42 -10:00
|
|
|
tiles = {"caverealms_glow_ruby_ore.png"},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {cracky=2},
|
|
|
|
sounds = default.node_sound_glass_defaults(),
|
|
|
|
light_source = 10,
|
|
|
|
paramtype = "light",
|
|
|
|
})
|
|
|
|
|
2014-12-16 19:57:25 -10:00
|
|
|
--embedded amethyst
|
|
|
|
minetest.register_node("caverealms:glow_amethyst_ore", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Glow Amethyst Ore"),
|
2014-12-16 19:57:25 -10:00
|
|
|
tiles = {"caverealms_glow_amethyst_ore.png"},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {cracky=2},
|
|
|
|
sounds = default.node_sound_glass_defaults(),
|
|
|
|
light_source = 10,
|
|
|
|
paramtype = "light",
|
|
|
|
})
|
|
|
|
|
2014-06-28 13:01:39 -10:00
|
|
|
--thin (transparent) ice
|
|
|
|
minetest.register_node("caverealms:thin_ice", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Thin Ice"),
|
2014-06-28 13:01:39 -10:00
|
|
|
tiles = {"caverealms_thin_ice.png"},
|
|
|
|
is_ground_content = true,
|
2017-03-25 11:55:00 -06:00
|
|
|
groups = {cracky=3, puts_out_fire = 1, cools_lava = 1},
|
2014-06-28 13:01:39 -10:00
|
|
|
sounds = default.node_sound_glass_defaults(),
|
|
|
|
use_texture_alpha = true,
|
|
|
|
drawtype = "glasslike",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
freezemelt = "default:water_source",
|
2014-06-30 17:01:10 -10:00
|
|
|
paramtype = "light",
|
2014-06-28 13:01:39 -10:00
|
|
|
})
|
|
|
|
|
2014-12-16 19:57:25 -10:00
|
|
|
--salt crystal
|
|
|
|
minetest.register_node("caverealms:salt_crystal", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Salt Crystal"),
|
2014-12-16 19:57:25 -10:00
|
|
|
tiles = {"caverealms_salt_crystal.png"},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {cracky=3},
|
|
|
|
sounds = default.node_sound_glass_defaults(),
|
|
|
|
light_source = 11,
|
|
|
|
paramtype = "light",
|
|
|
|
use_texture_alpha = true,
|
|
|
|
drawtype = "glasslike",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
})
|
|
|
|
|
2014-06-28 13:01:39 -10:00
|
|
|
--alternate version for stalactites
|
|
|
|
minetest.register_node("caverealms:hanging_thin_ice", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Thin Ice"),
|
2014-06-28 13:01:39 -10:00
|
|
|
tiles = {"caverealms_thin_ice.png"},
|
|
|
|
is_ground_content = true,
|
2017-03-25 11:55:00 -06:00
|
|
|
groups = {cracky=3, puts_out_fire = 1, cools_lava = 1},
|
2014-06-28 13:01:39 -10:00
|
|
|
sounds = default.node_sound_glass_defaults(),
|
|
|
|
use_texture_alpha = true,
|
|
|
|
drawtype = "glasslike",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
drop = "caverealms:thin_ice",
|
|
|
|
freezemelt = "default:water_flowing",
|
2014-06-30 17:01:10 -10:00
|
|
|
paramtype = "light",
|
2014-06-28 13:01:39 -10:00
|
|
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
|
|
|
if FALLING_ICICLES then
|
|
|
|
if math.random() <= FALLCHA then
|
|
|
|
obj = minetest.add_entity(pos, "caverealms:falling_ice")
|
|
|
|
obj:get_luaentity():set_node(oldnode)
|
|
|
|
for y = -13, 13 do
|
|
|
|
for x = -3, 3 do
|
|
|
|
for z = -3, 3 do
|
|
|
|
local npos = {x=pos.x+x, y=pos.y+y, z=pos.z+z}
|
|
|
|
if minetest.get_node(npos).name == "caverealms:hanging_thin_ice" then
|
|
|
|
nobj = minetest.add_entity(npos, "caverealms:falling_ice")
|
|
|
|
nobj:get_luaentity():set_node(oldnode)
|
|
|
|
minetest.remove_node(npos)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
minetest.remove_node(pos)
|
|
|
|
else
|
|
|
|
return 1
|
|
|
|
end
|
|
|
|
else
|
|
|
|
return 1
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
--glowing crystal gem
|
2014-06-30 11:08:23 -10:00
|
|
|
local glow_gem_size = { 1.0, 1.2, 1.4, 1.6, 1.7 }
|
|
|
|
|
|
|
|
for i in ipairs(glow_gem_size) do
|
|
|
|
if i == 1 then
|
|
|
|
nodename = "caverealms:glow_gem"
|
|
|
|
else
|
|
|
|
nodename = "caverealms:glow_gem_"..i
|
|
|
|
end
|
|
|
|
|
|
|
|
vs = glow_gem_size[i]
|
|
|
|
|
|
|
|
minetest.register_node(nodename, {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Glow Gem"),
|
2014-06-30 11:08:23 -10:00
|
|
|
tiles = {"caverealms_glow_gem.png"},
|
|
|
|
inventory_image = "caverealms_glow_gem.png",
|
|
|
|
wield_image = "caverealms_glow_gem.png",
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {cracky=3, oddly_breakable_by_hand=1},
|
|
|
|
sounds = default.node_sound_glass_defaults(),
|
|
|
|
light_source = 11,
|
|
|
|
paramtype = "light",
|
|
|
|
drawtype = "plantlike",
|
|
|
|
walkable = false,
|
|
|
|
buildable_to = true,
|
|
|
|
visual_scale = vs,
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.5*vs, -0.5*vs, -0.5*vs, 0.5*vs, -5/16*vs, 0.5*vs},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
end
|
2014-06-28 13:01:39 -10:00
|
|
|
|
2014-12-16 19:57:25 -10:00
|
|
|
--glowing salt gem
|
|
|
|
local salt_gem_size = { 1.0, 1.2, 1.4, 1.6, 1.7 }
|
|
|
|
|
|
|
|
for i in ipairs(salt_gem_size) do
|
|
|
|
if i == 1 then
|
|
|
|
nodename = "caverealms:salt_gem"
|
|
|
|
else
|
|
|
|
nodename = "caverealms:salt_gem_"..i
|
|
|
|
end
|
|
|
|
|
|
|
|
vs = salt_gem_size[i]
|
|
|
|
|
|
|
|
minetest.register_node(nodename, {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Salt Gem"),
|
2014-12-16 19:57:25 -10:00
|
|
|
tiles = {"caverealms_salt_gem.png"},
|
|
|
|
inventory_image = "caverealms_salt_gem.png",
|
|
|
|
wield_image = "caverealms_salt_gem.png",
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {cracky=3, oddly_breakable_by_hand=1},
|
|
|
|
sounds = default.node_sound_glass_defaults(),
|
|
|
|
light_source = 11,
|
|
|
|
paramtype = "light",
|
|
|
|
drawtype = "plantlike",
|
|
|
|
walkable = false,
|
|
|
|
buildable_to = true,
|
|
|
|
visual_scale = vs,
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.5*vs, -0.5*vs, -0.5*vs, 0.5*vs, -5/16*vs, 0.5*vs},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
--stone spike
|
|
|
|
local spike_size = { 1.0, 1.2, 1.4, 1.6, 1.7 }
|
|
|
|
|
|
|
|
for i in ipairs(spike_size) do
|
|
|
|
if i == 1 then
|
|
|
|
nodename = "caverealms:spike"
|
|
|
|
else
|
|
|
|
nodename = "caverealms:spike_"..i
|
|
|
|
end
|
|
|
|
|
|
|
|
vs = spike_size[i]
|
|
|
|
|
|
|
|
minetest.register_node(nodename, {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Stone Spike"),
|
2014-12-16 19:57:25 -10:00
|
|
|
tiles = {"caverealms_spike.png"},
|
|
|
|
inventory_image = "caverealms_spike.png",
|
|
|
|
wield_image = "caverealms_spike.png",
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {cracky=3, oddly_breakable_by_hand=1},
|
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
light_source = 3,
|
|
|
|
paramtype = "light",
|
|
|
|
drawtype = "plantlike",
|
|
|
|
walkable = false,
|
|
|
|
buildable_to = true,
|
|
|
|
visual_scale = vs,
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.5*vs, -0.5*vs, -0.5*vs, 0.5*vs, -5/16*vs, 0.5*vs},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
2014-06-28 13:01:39 -10:00
|
|
|
--upward pointing icicle
|
|
|
|
minetest.register_node("caverealms:icicle_up", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Icicle"),
|
2014-06-28 13:01:39 -10:00
|
|
|
tiles = {"caverealms_icicle_up.png"},
|
|
|
|
inventory_image = "caverealms_icicle_up.png",
|
|
|
|
wield_image = "caverealms_icicle_up.png",
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {cracky=3, oddly_breakable_by_hand=1},
|
|
|
|
sounds = default.node_sound_glass_defaults(),
|
|
|
|
light_source = 8,
|
|
|
|
paramtype = "light",
|
|
|
|
drawtype = "plantlike",
|
|
|
|
walkable = false,
|
|
|
|
buildable_to = true,
|
|
|
|
visual_scale = 1.0,
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
--downward pointing icicle
|
|
|
|
minetest.register_node("caverealms:icicle_down", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Icicle"),
|
2014-06-28 13:01:39 -10:00
|
|
|
tiles = {"caverealms_icicle_down.png"},
|
|
|
|
inventory_image = "caverealms_icicle_down.png",
|
|
|
|
wield_image = "caverealms_icicle_down.png",
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {cracky=3, oddly_breakable_by_hand=1},
|
|
|
|
sounds = default.node_sound_glass_defaults(),
|
|
|
|
light_source = 8,
|
|
|
|
paramtype = "light",
|
|
|
|
drawtype = "plantlike",
|
|
|
|
walkable = false,
|
|
|
|
buildable_to = true,
|
|
|
|
visual_scale = 1.0,
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
--cave mossy cobble - bluish?
|
|
|
|
minetest.register_node("caverealms:stone_with_moss", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Cave Stone with Moss"),
|
2014-06-28 13:01:39 -10:00
|
|
|
tiles = {"default_cobble.png^caverealms_moss.png", "default_cobble.png", "default_cobble.png^caverealms_moss_side.png"},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {crumbly=3},
|
|
|
|
drop = 'default:cobble',
|
|
|
|
sounds = default.node_sound_dirt_defaults({
|
|
|
|
footstep = {name="default_grass_footstep", gain=0.25},
|
|
|
|
}),
|
|
|
|
})
|
|
|
|
|
|
|
|
--cave lichen-covered cobble - purple-ish
|
|
|
|
minetest.register_node("caverealms:stone_with_lichen", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Cave Stone with Lichen"),
|
2014-06-28 13:01:39 -10:00
|
|
|
tiles = {"default_cobble.png^caverealms_lichen.png", "default_cobble.png", "default_cobble.png^caverealms_lichen_side.png"},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {crumbly=3},
|
|
|
|
drop = 'default:cobble',
|
|
|
|
sounds = default.node_sound_dirt_defaults({
|
|
|
|
footstep = {name="default_grass_footstep", gain=0.25},
|
|
|
|
}),
|
|
|
|
})
|
|
|
|
|
|
|
|
--cave algae-covered cobble - yellow-ish
|
|
|
|
minetest.register_node("caverealms:stone_with_algae", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Cave Stone with Algae"),
|
2014-06-28 13:01:39 -10:00
|
|
|
tiles = {"default_cobble.png^caverealms_algae.png", "default_cobble.png", "default_cobble.png^caverealms_algae_side.png"},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {crumbly=3},
|
|
|
|
drop = 'default:cobble',
|
|
|
|
sounds = default.node_sound_dirt_defaults({
|
|
|
|
footstep = {name="default_grass_footstep", gain=0.25},
|
|
|
|
}),
|
|
|
|
})
|
|
|
|
|
2014-12-16 19:57:25 -10:00
|
|
|
--tiny-salt-crystal-covered cobble - pink-ish
|
|
|
|
minetest.register_node("caverealms:stone_with_salt", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Cave Stone with Salt"),
|
2014-12-16 19:57:25 -10:00
|
|
|
tiles = {"caverealms_salty2.png"},--{"caverealms_salty2.png^caverealms_salty.png", "caverealms_salty2.png", "caverealms_salty2.png^caverealms_salty_side.png"},
|
|
|
|
light_source = 9,
|
|
|
|
paramtype = "light",
|
|
|
|
use_texture_alpha = true,
|
|
|
|
drawtype = "glasslike",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {crumbly=3},
|
|
|
|
sounds = default.node_sound_glass_defaults(),
|
|
|
|
})
|
|
|
|
|
2014-08-05 16:11:42 -10:00
|
|
|
--Hot Cobble - cobble with lava instead of mortar XD
|
|
|
|
minetest.register_node("caverealms:hot_cobble", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Hot Cobble"),
|
2014-08-05 16:11:42 -10:00
|
|
|
tiles = {"caverealms_hot_cobble.png"},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {crumbly=2, hot=1},
|
|
|
|
damage_per_second = 1,
|
|
|
|
light_source = 3,
|
|
|
|
sounds = default.node_sound_stone_defaults({
|
|
|
|
footstep = {name="default_stone_footstep", gain=0.25},
|
|
|
|
}),
|
|
|
|
})
|
|
|
|
|
2014-12-16 19:57:25 -10:00
|
|
|
--Glow Obsidian
|
|
|
|
minetest.register_node("caverealms:glow_obsidian", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Glowing Obsidian"),
|
2014-12-16 19:57:25 -10:00
|
|
|
tiles = {"caverealms_glow_obsidian.png"},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {crumbly=1},
|
|
|
|
light_source = 7,
|
|
|
|
sounds = default.node_sound_stone_defaults({
|
|
|
|
footstep = {name="default_stone_footstep", gain=0.25},
|
|
|
|
}),
|
|
|
|
})
|
|
|
|
|
|
|
|
--Glow Obsidian 2 - has traces of lava
|
|
|
|
minetest.register_node("caverealms:glow_obsidian_2", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Hot Glow Obsidian"),
|
2014-12-16 19:57:25 -10:00
|
|
|
tiles = {"caverealms_glow_obsidian2.png"},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {crumbly=1, hot=1},
|
|
|
|
damage_per_second = 1,
|
|
|
|
light_source = 9,
|
|
|
|
sounds = default.node_sound_stone_defaults({
|
|
|
|
footstep = {name="default_stone_footstep", gain=0.25},
|
|
|
|
}),
|
|
|
|
})
|
|
|
|
|
|
|
|
--Coal Dust
|
|
|
|
minetest.register_node("caverealms:coal_dust", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Coal Dust"),
|
2014-12-16 19:57:25 -10:00
|
|
|
tiles = {"caverealms_coal_dust.png"},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {crumbly=3, falling_node=1, sand=1},
|
|
|
|
sounds = default.node_sound_sand_defaults(),
|
|
|
|
})
|
|
|
|
|
2014-06-28 13:01:39 -10:00
|
|
|
--glow worms
|
|
|
|
minetest.register_node("caverealms:glow_worm", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Glow Worms"),
|
2014-06-28 13:01:39 -10:00
|
|
|
tiles = {"caverealms_glow_worm.png"},
|
|
|
|
inventory_image = "caverealms_glow_worm.png",
|
|
|
|
wield_image = "caverealms_glow_worm.png",
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {oddly_breakable_by_hand=3},
|
|
|
|
light_source = 9,
|
|
|
|
paramtype = "light",
|
|
|
|
drawtype = "plantlike",
|
|
|
|
walkable = false,
|
|
|
|
buildable_to = true,
|
|
|
|
visual_scale = 1.0,
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.5, -0.5, -0.5, 0.5, -0.5, 0.5},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
--cave plants go here
|
|
|
|
|
|
|
|
--glowing fungi
|
|
|
|
minetest.register_node("caverealms:fungus", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Glowing Fungus"),
|
2014-06-28 13:01:39 -10:00
|
|
|
tiles = {"caverealms_fungi.png"},
|
|
|
|
inventory_image = "caverealms_fungi.png",
|
|
|
|
wield_image = "caverealms_fungi.png",
|
|
|
|
is_ground_content = true,
|
2017-03-25 11:55:00 -06:00
|
|
|
groups = {oddly_breakable_by_hand=3, flammable = 1},
|
2014-06-28 13:01:39 -10:00
|
|
|
light_source = 5,
|
|
|
|
paramtype = "light",
|
|
|
|
drawtype = "plantlike",
|
|
|
|
walkable = false,
|
|
|
|
buildable_to = true,
|
|
|
|
visual_scale = 1.0,
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
--mycena mushroom
|
|
|
|
minetest.register_node("caverealms:mycena", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Mycena Mushroom"),
|
2014-06-28 13:01:39 -10:00
|
|
|
tiles = {"caverealms_mycena.png"},
|
|
|
|
inventory_image = "caverealms_mycena.png",
|
|
|
|
wield_image = "caverealms_mycena.png",
|
|
|
|
is_ground_content = true,
|
2017-03-25 11:55:00 -06:00
|
|
|
groups = {oddly_breakable_by_hand=3, flammable = 1},
|
2014-06-28 13:01:39 -10:00
|
|
|
light_source = 6,
|
|
|
|
paramtype = "light",
|
|
|
|
drawtype = "plantlike",
|
|
|
|
walkable = false,
|
|
|
|
buildable_to = true,
|
|
|
|
visual_scale = 1.0,
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
--giant mushroom
|
|
|
|
--stem
|
|
|
|
minetest.register_node("caverealms:mushroom_stem", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Giant Mushroom Stem"),
|
2014-06-28 13:01:39 -10:00
|
|
|
tiles = {"caverealms_mushroom_stem.png"},
|
|
|
|
is_ground_content = true,
|
2017-03-25 11:55:00 -06:00
|
|
|
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
|
|
|
sounds = default.node_sound_wood_defaults(),
|
2014-06-28 13:01:39 -10:00
|
|
|
})
|
|
|
|
|
|
|
|
--cap
|
|
|
|
minetest.register_node("caverealms:mushroom_cap", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Giant Mushroom Cap"),
|
2014-06-28 13:01:39 -10:00
|
|
|
tiles = {"caverealms_mushroom_cap.png"},
|
|
|
|
is_ground_content = true,
|
2017-03-25 11:55:00 -06:00
|
|
|
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
|
|
|
sounds = default.node_sound_wood_defaults(),
|
2014-06-28 13:01:39 -10:00
|
|
|
})
|
|
|
|
|
|
|
|
--gills
|
|
|
|
minetest.register_node("caverealms:mushroom_gills", {
|
2017-03-25 11:55:00 -06:00
|
|
|
description = S("Giant Mushroom Gills"),
|
2014-06-28 13:01:39 -10:00
|
|
|
tiles = {"caverealms_mushroom_gills.png"},
|
|
|
|
is_ground_content = true,
|
2017-03-25 11:55:00 -06:00
|
|
|
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
2014-06-28 13:01:39 -10:00
|
|
|
drawtype = "plantlike",
|
2014-06-30 11:08:23 -10:00
|
|
|
paramtype = "light",
|
|
|
|
})
|
2014-08-05 16:11:42 -10:00
|
|
|
|
|
|
|
--define special flame so that it does not expire
|
2017-04-07 10:48:56 -04:00
|
|
|
minetest.register_alias("caverealms:constant_flame", "fire:permanent_flame")
|
2014-08-05 16:11:42 -10:00
|
|
|
|
|
|
|
--node to create a treasure chest in DM Forts.
|
|
|
|
minetest.register_node("caverealms:s_chest", {
|
|
|
|
description = "Trying to rob the bank before it's opened, eh?",
|
|
|
|
tiles = {"default_chest_front.png"},
|
|
|
|
paramtype2 = "facedir",
|
2015-01-05 19:30:05 -10:00
|
|
|
groups = {choppy=3,oddly_breakable_by_hand=2,cavechest=1, not_in_creative_inventory=1},
|
2015-01-06 11:57:15 -10:00
|
|
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
|
|
|
if pos.y > DM_TOP then
|
|
|
|
minetest.remove_node(pos)
|
|
|
|
end
|
|
|
|
end,
|
2014-08-05 16:11:42 -10:00
|
|
|
})
|
|
|
|
|
|
|
|
--hacky schematic placers
|
|
|
|
|
|
|
|
minetest.register_node("caverealms:s_fountain", {
|
|
|
|
description = "A Hack like you should know what this does...",
|
|
|
|
tiles = {"caverealms_stone_eyes.png"},
|
2015-01-05 19:30:05 -10:00
|
|
|
groups = {crumbly=3, schema=1, not_in_creative_inventory=1},
|
2015-01-06 11:57:15 -10:00
|
|
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
|
|
|
if pos.y > DM_TOP then
|
|
|
|
minetest.remove_node(pos)
|
|
|
|
end
|
|
|
|
end,
|
2014-08-05 16:11:42 -10:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("caverealms:s_fortress", {
|
|
|
|
description = "A Hack like you should know what this does...",
|
|
|
|
tiles = {"caverealms_stone_eyes.png"},
|
2015-01-05 19:30:05 -10:00
|
|
|
groups = {crumbly=3, schema=1, not_in_creative_inventory=1},
|
2015-01-06 11:57:15 -10:00
|
|
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
|
|
|
if pos.y > DM_TOP then
|
|
|
|
minetest.remove_node(pos)
|
|
|
|
end
|
|
|
|
end,
|
2014-08-05 16:11:42 -10:00
|
|
|
})
|
|
|
|
|
|
|
|
--dungeon master statue (nodebox)
|
|
|
|
minetest.register_node("caverealms:dm_statue", {
|
|
|
|
tiles = {
|
|
|
|
"caverealms_dm_stone.png",
|
|
|
|
"caverealms_dm_stone.png",
|
|
|
|
"caverealms_dm_stone.png",
|
|
|
|
"caverealms_dm_stone.png",
|
|
|
|
"caverealms_dm_stone.png",
|
|
|
|
"caverealms_stone_eyes.png"
|
|
|
|
},
|
|
|
|
drawtype = "nodebox",
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
groups = {cracky=2},
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.4375, -0.5, -0.4375, 0.4375, -0.3125, 0.4375}, -- NodeBox1
|
|
|
|
{-0.25, -0.125, -0.1875, 0.25, 0.5, 0.1875}, -- NodeBox2
|
|
|
|
{-0.375, 0, -0.125, -0.25, 0.4375, 0.125}, -- NodeBox3
|
|
|
|
{0.25, 0.125, -0.4375, 0.375, 0.375, 0.1875}, -- NodeBox4
|
|
|
|
{-0.25, -0.5, -0.125, -0.125, -0.125, 0.125}, -- NodeBox5
|
|
|
|
{0.125, -0.3125, -0.125, 0.25, 0, 0.125}, -- NodeBox6
|
|
|
|
}
|
|
|
|
},
|
|
|
|
selection_box = {
|
|
|
|
type = "regular"
|
|
|
|
}
|
|
|
|
})
|