Remove everything except the caves.
This commit is contained in:
parent
e5e7475476
commit
6cb7f1da1d
205 changed files with 1251 additions and 15326 deletions
814
nodes.lua
814
nodes.lua
|
@ -1,496 +1,408 @@
|
|||
local get_node_or_nil = minetest.get_node_or_nil
|
||||
local get_item_group = minetest.get_item_group
|
||||
local max_depth = 31000
|
||||
|
||||
local old_is_protected = minetest.is_protected
|
||||
function minetest.is_protected(pos, name)
|
||||
if not (pos and name and type(name) == 'string') then
|
||||
return
|
||||
end
|
||||
|
||||
local node = get_node_or_nil(pos)
|
||||
if node and node.name == 'fun_caves:translocator' and (name == '' or not minetest.get_player_by_name(name)) then
|
||||
return true
|
||||
end
|
||||
return old_is_protected(pos, name)
|
||||
end
|
||||
-- Fun_Caves nodes.lua
|
||||
-- Copyright Duane Robertson (duane@duanerobertson.com), 2017
|
||||
-- Distributed under the LGPLv2.1 (https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html)
|
||||
|
||||
|
||||
-- dirt, cave
|
||||
local newnode = fun_caves.clone_node("default:dirt")
|
||||
newnode.drop = "default:dirt"
|
||||
newnode.groups.soil = 0
|
||||
minetest.register_node("fun_caves:dirt", newnode)
|
||||
local light_max = fun_caves_mod.light_max or 10
|
||||
|
||||
newnode = fun_caves.clone_node("default:dirt")
|
||||
newnode.description = "Polluted Dirt"
|
||||
newnode.tiles = {"default_dirt.png^[colorize:#100020:100"}
|
||||
newnode.groups.soil = 0
|
||||
minetest.register_node("fun_caves:polluted_dirt", newnode)
|
||||
-- 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)
|
||||
|
||||
-- ice -- add cold damage
|
||||
minetest.add_group("default:ice", {surface_cold = 3})
|
||||
|
||||
-- ice, thin -- transparent
|
||||
minetest.register_node("fun_caves:thin_ice", {
|
||||
description = "Thin Ice",
|
||||
tiles = {"caverealms_thin_ice.png"},
|
||||
-- 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 = {cracky=3},
|
||||
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},
|
||||
}),
|
||||
})
|
||||
|
||||
-- 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},
|
||||
})
|
||||
|
||||
-- moon glass (glows)
|
||||
if not minetest.registered_items['elixirs:moon_glass'] then
|
||||
newnode = fun_caves_mod.clone_node("default:glass")
|
||||
newnode.description = "Glowing Glass"
|
||||
newnode.light_source = default.LIGHT_MAX
|
||||
minetest.register_node("fun_caves:moon_glass", newnode)
|
||||
end
|
||||
|
||||
-- Moon juice is extracted from glowing fungus, to make glowing materials.
|
||||
minetest.register_craftitem("fun_caves:moon_juice", {
|
||||
description = "Moon Juice",
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
tiles = {"vmg_moon_juice.png"},
|
||||
inventory_image = "vmg_moon_juice.png",
|
||||
--groups = {dig_immediate = 3, attached_node = 1},
|
||||
groups = {dig_immediate = 3, vessel = 1},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
-- mushroom cap, giant
|
||||
local cap = {
|
||||
description = "Giant Mushroom Cap",
|
||||
tiles = {"vmg_mushroom_giant_cap.png", "vmg_mushroom_giant_under.png", "vmg_mushroom_giant_cap.png"},
|
||||
is_ground_content = false,
|
||||
paramtype = "light",
|
||||
drawtype = "nodebox",
|
||||
node_box = { type = "fixed",
|
||||
fixed = {
|
||||
{-0.3, -0.25, -0.3, 0.3, 0.5, 0.3},
|
||||
{-0.3, -0.25, -0.4, 0.3, 0.4, -0.3},
|
||||
{-0.3, -0.25, 0.3, 0.3, 0.4, 0.4},
|
||||
{-0.4, -0.25, -0.3, -0.3, 0.4, 0.3},
|
||||
{0.3, -0.25, -0.3, 0.4, 0.4, 0.3},
|
||||
{-0.4, -0.5, -0.4, 0.4, -0.25, 0.4},
|
||||
{-0.5, -0.5, -0.4, -0.4, -0.25, 0.4},
|
||||
{0.4, -0.5, -0.4, 0.5, -0.25, 0.4},
|
||||
{-0.4, -0.5, -0.5, 0.4, -0.25, -0.4},
|
||||
{-0.4, -0.5, 0.4, 0.4, -0.25, 0.5},
|
||||
} },
|
||||
light_source = light_max,
|
||||
groups = {fleshy=1, falling_node = 1, dig_immediate=3, flammable=2, plant=1},
|
||||
}
|
||||
minetest.register_node("fun_caves:giant_mushroom_cap", cap)
|
||||
|
||||
-- mushroom cap, huge
|
||||
minetest.register_node("fun_caves:huge_mushroom_cap", {
|
||||
description = "Huge Mushroom Cap",
|
||||
tiles = {"vmg_mushroom_giant_cap.png", "vmg_mushroom_giant_under.png", "vmg_mushroom_giant_cap.png"},
|
||||
is_ground_content = false,
|
||||
paramtype = "light",
|
||||
drawtype = "nodebox",
|
||||
node_box = { type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.33, 0.5, -0.33, 0.33},
|
||||
{-0.33, -0.5, 0.33, 0.33, -0.33, 0.5},
|
||||
{-0.33, -0.5, -0.33, 0.33, -0.33, -0.5},
|
||||
{-0.33, -0.33, -0.33, 0.33, -0.17, 0.33},
|
||||
} },
|
||||
light_source = light_max,
|
||||
groups = {fleshy=1, falling_node = 1, dig_immediate=3, flammable=2, plant=1},
|
||||
})
|
||||
|
||||
-- mushroom stem, giant or huge
|
||||
minetest.register_node("fun_caves:giant_mushroom_stem", {
|
||||
description = "Giant Mushroom Stem",
|
||||
tiles = {"vmg_mushroom_giant_stem.png", "vmg_mushroom_giant_stem.png", "vmg_mushroom_giant_stem.png"},
|
||||
is_ground_content = false,
|
||||
groups = {choppy=2, flammable=2, plant=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
drawtype = "nodebox",
|
||||
node_box = { type = "fixed", fixed = { {-0.25, -0.5, -0.25, 0.25, 0.5, 0.25}, }},
|
||||
})
|
||||
|
||||
-- obsidian, glowing
|
||||
minetest.register_node("fun_caves:glow_obsidian", {
|
||||
description = "Glowing Obsidian",
|
||||
tiles = {"caverealms_glow_obsidian.png"},
|
||||
is_ground_content = true,
|
||||
groups = {stone=2, crumbly=1},
|
||||
--light_source = 7,
|
||||
sounds = default.node_sound_stone_defaults({
|
||||
footstep = {name="default_stone_footstep", gain=0.25},
|
||||
}),
|
||||
})
|
||||
|
||||
-- obsidian, glowing, 2 - has traces of lava
|
||||
minetest.register_node("fun_caves:glow_obsidian_2", {
|
||||
description = "Hot Glow Obsidian",
|
||||
tiles = {"caverealms_glow_obsidian2.png"},
|
||||
is_ground_content = true,
|
||||
groups = {stone=2, crumbly=1, surface_hot=3, igniter=1},
|
||||
damage_per_second = 1,
|
||||
--light_source = 9,
|
||||
sounds = default.node_sound_stone_defaults({
|
||||
footstep = {name="default_stone_footstep", gain=0.25},
|
||||
}),
|
||||
})
|
||||
|
||||
-- salt
|
||||
minetest.register_node("fun_caves:stone_with_salt", {
|
||||
description = "Cave Stone with Salt",
|
||||
tiles = {"caverealms_salty2.png"},
|
||||
paramtype = "light",
|
||||
use_texture_alpha = true,
|
||||
light_source = 1,
|
||||
drawtype = "glasslike",
|
||||
sunlight_propagates = true,
|
||||
freezemelt = "default:water_source",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = false,
|
||||
is_ground_content = true,
|
||||
groups = {stone=1, crumbly=3, cracky=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node('fun_caves:sticks_default', {
|
||||
description = 'Sticks',
|
||||
drawtype = 'allfaces_optional',
|
||||
waving = 1,
|
||||
visual_scale = 1.3,
|
||||
tiles = {'fun_caves_dry_twigs.png'},
|
||||
paramtype = 'light',
|
||||
is_ground_content = false,
|
||||
drop = 'default:stick 2',
|
||||
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
|
||||
})
|
||||
-- salt, radioactive ore
|
||||
newnode = fun_caves_mod.clone_node("fun_caves:stone_with_salt")
|
||||
newnode.description = "Salt With Radioactive Ore"
|
||||
newnode.tiles = {"fun_caves_radioactive_ore.png"}
|
||||
newnode.light_source = 4
|
||||
minetest.register_node("fun_caves:radioactive_ore", newnode)
|
||||
|
||||
newnode = fun_caves.clone_node("default:leaves")
|
||||
newnode.description = "Blackened Leaves"
|
||||
newnode.tiles = {"default_leaves.png^[colorize:#100020:200"}
|
||||
newnode.special_tiles = {"default_leaves_simple.png^[colorize:#100020:200"}
|
||||
newnode.groups = {snappy = 3, flammable = 2}
|
||||
minetest.register_node("fun_caves:leaves_black", newnode)
|
||||
-- What's a cave without speleothems?
|
||||
local spel = {
|
||||
{type1="stalactite", type2="stalagmite", tile="default_stone.png"},
|
||||
{type1="stalactite_slimy", type2="stalagmite_slimy", tile="default_stone.png^fun_caves_algae.png"},
|
||||
{type1="stalactite_mossy", type2="stalagmite_mossy", tile="default_stone.png^fun_caves_moss.png"},
|
||||
{type1="icicle_down", type2="icicle_up", desc="Icicle", tile="caverealms_thin_ice.png", drop="default:ice"},
|
||||
}
|
||||
|
||||
newnode = fun_caves.clone_node("default:water_source")
|
||||
newnode.description = "Poisonous Water"
|
||||
newnode.groups.poison = 3
|
||||
newnode.light_source = 6
|
||||
newnode.liquid_alternative_flowing = "fun_caves:water_poison_flowing"
|
||||
newnode.liquid_alternative_source = "fun_caves:water_poison_source"
|
||||
newnode.post_effect_color = {a = 103, r = 108, g = 128, b = 64}
|
||||
newnode.special_tiles[1].name = "fun_caves_water_poison_source_animated.png"
|
||||
newnode.tiles[1].name = "fun_caves_water_poison_source_animated.png"
|
||||
minetest.register_node("fun_caves:water_poison_source", newnode)
|
||||
|
||||
newnode = fun_caves.clone_node("default:water_flowing")
|
||||
newnode.description = "Poisonous Water"
|
||||
newnode.groups.poison = 3
|
||||
newnode.light_source = 6
|
||||
newnode.liquid_alternative_flowing = "fun_caves:water_poison_flowing"
|
||||
newnode.liquid_alternative_source = "fun_caves:water_poison_source"
|
||||
newnode.post_effect_color = {a = 103, r = 108, g = 128, b = 64}
|
||||
newnode.special_tiles[1].name = "fun_caves_water_poison_flowing_animated.png"
|
||||
newnode.tiles[1] = "fun_caves_water_poison.png"
|
||||
minetest.register_node("fun_caves:water_poison_flowing", newnode)
|
||||
|
||||
--minetest.register_node("fun_caves:bright_air", {
|
||||
-- drawtype = "glasslike",
|
||||
-- tiles = {"technic_light.png"},
|
||||
-- paramtype = "light",
|
||||
-- groups = {not_in_creative_inventory=1},
|
||||
-- drop = "",
|
||||
-- walkable = false,
|
||||
-- buildable_to = true,
|
||||
-- sunlight_propagates = true,
|
||||
-- light_source = LIGHT_MAX,
|
||||
-- pointable = false,
|
||||
--})
|
||||
|
||||
local newnode = fun_caves.clone_node("default:dirt")
|
||||
newnode.description = "Meteor Crater"
|
||||
newnode.tiles = {"fun_caves_crater.png", "default_dirt.png", "default_dirt.png", "default_dirt.png", "default_dirt.png", "default_dirt.png"}
|
||||
newnode.drop = "fun_caves:meteorite"
|
||||
newnode.groups.soil = 0
|
||||
minetest.register_node("fun_caves:meteorite_crater", newnode)
|
||||
|
||||
local newnode = fun_caves.clone_node("default:stone_with_iron")
|
||||
newnode.description = "Stone With Meteoritic Iron"
|
||||
newnode.drop = "fun_caves:meteorite"
|
||||
minetest.register_node("fun_caves:stone_with_meteoritic_iron", newnode)
|
||||
|
||||
|
||||
newnode = fun_caves.clone_node("default:stone")
|
||||
newnode.tiles = {'dna.png'}
|
||||
minetest.register_node("fun_caves:dna", newnode)
|
||||
|
||||
newnode = fun_caves.clone_node("farming:straw")
|
||||
newnode.description = 'Bundle of Grass'
|
||||
newnode.tiles = {'farming_straw.png^[colorize:#00FF00:50'}
|
||||
minetest.register_node("fun_caves:bundle_of_grass", newnode)
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'fun_caves:bundle_of_grass',
|
||||
type = 'shapeless',
|
||||
recipe = {
|
||||
'default:junglegrass', 'default:junglegrass',
|
||||
'default:junglegrass', 'default:junglegrass',
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "fun_caves:dry_fiber",
|
||||
recipe = 'fun_caves:bundle_of_grass',
|
||||
cooktime = 3,
|
||||
})
|
||||
|
||||
local function rope_remove(pos)
|
||||
if not pos then
|
||||
return
|
||||
end
|
||||
|
||||
for i = 1, 100 do
|
||||
local newpos = table.copy(pos)
|
||||
newpos.y = newpos.y - i
|
||||
local node = minetest.get_node_or_nil(newpos)
|
||||
if node and node.name and node.name == 'fun_caves:rope_ladder_piece' then
|
||||
minetest.set_node(newpos, {name='air'})
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local good_params = {nil, true, true, true, true}
|
||||
for length = 10, 50, 10 do
|
||||
minetest.register_node("fun_caves:rope_ladder_"..length, {
|
||||
description = "Rope Ladder ("..length.." meter)",
|
||||
drawtype = "signlike",
|
||||
tiles = {"fun_caves_rope_ladder.png"},
|
||||
inventory_image = "fun_caves_rope_ladder.png",
|
||||
wield_image = "fun_caves_rope_ladder.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
sunlight_propagates = true,
|
||||
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,
|
||||
climbable = true,
|
||||
is_ground_content = false,
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
},
|
||||
groups = {snappy = 2, oddly_breakable_by_hand = 3, flammable = 2},
|
||||
legacy_wallmounted = true,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
if not (pointed_thing and pointed_thing.above) then
|
||||
return
|
||||
end
|
||||
|
||||
local pos_old = pointed_thing.above
|
||||
local orig = minetest.get_node_or_nil(pos_old)
|
||||
if orig and orig.name and orig.param2 and good_params[orig.param2] then
|
||||
for i = 1, length do
|
||||
local newpos = table.copy(pos_old)
|
||||
newpos.y = newpos.y - i
|
||||
local node = minetest.get_node_or_nil(newpos)
|
||||
if node and node.name and node.name == 'air' then
|
||||
minetest.set_node(newpos, {name='fun_caves:rope_ladder_piece', param2=orig.param2})
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
on_destruct = rope_remove,
|
||||
})
|
||||
|
||||
if length > 10 then
|
||||
rec = {}
|
||||
for i = 10, length, 10 do
|
||||
rec[#rec+1] = 'fun_caves:rope_ladder_10'
|
||||
end
|
||||
minetest.register_craft({
|
||||
output = 'fun_caves:rope_ladder_'..length,
|
||||
type = 'shapeless',
|
||||
recipe = rec,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_node("fun_caves:rope_ladder_piece", {
|
||||
description = "Rope Ladder",
|
||||
drawtype = "signlike",
|
||||
tiles = {"fun_caves_rope_ladder.png"},
|
||||
inventory_image = "fun_caves_rope_ladder.png",
|
||||
wield_image = "fun_caves_rope_ladder.png",
|
||||
drop = {},
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
buildable_to = true,
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
is_ground_content = false,
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
},
|
||||
groups = {snappy = 2, oddly_breakable_by_hand = 3, flammable = 2},
|
||||
legacy_wallmounted = true,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
on_destruct = rope_remove,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'fun_caves:rope_ladder_10',
|
||||
recipe = {
|
||||
{'fun_caves:dry_fiber', '', 'fun_caves:dry_fiber'},
|
||||
{'fun_caves:dry_fiber', 'fun_caves:dry_fiber', 'fun_caves:dry_fiber'},
|
||||
{'fun_caves:dry_fiber', '', 'fun_caves:dry_fiber'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craftitem("fun_caves:apple_pie_slice", {
|
||||
description = "Apple Pie Slice",
|
||||
inventory_image = "fun_caves_apple_pie_slice.png",
|
||||
on_use = minetest.item_eat(5),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'fun_caves:apple_pie_slice 6',
|
||||
type = 'shapeless',
|
||||
recipe = {
|
||||
'fun_caves:apple_pie',
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("fun_caves:apple_pie", {
|
||||
description = "Apple Pie",
|
||||
drawtype = "raillike",
|
||||
tiles = {"fun_caves_apple_pie.png"},
|
||||
inventory_image = "fun_caves_apple_pie.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.4, -0.5, -0.4, 0.5, -0.4, 0.4}
|
||||
},
|
||||
groups = {dig_immediate = 3, attached_node = 1},
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craftitem("fun_caves:apple_pie_uncooked", {
|
||||
description = "Uncooked Apple Pie",
|
||||
inventory_image = "fun_caves_apple_pie_uncooked.png",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'fun_caves:apple_pie_uncooked',
|
||||
type = 'shapeless',
|
||||
recipe = {
|
||||
'default:apple',
|
||||
'default:apple',
|
||||
'farming:flour',
|
||||
'fun_caves:syrup',
|
||||
'fun_caves:syrup',
|
||||
'fun_caves:syrup',
|
||||
},
|
||||
replacements = {
|
||||
{'fun_caves:syrup', 'vessels:glass_bottle'},
|
||||
{'fun_caves:syrup', 'vessels:glass_bottle'},
|
||||
{'fun_caves:syrup', 'vessels:glass_bottle'},
|
||||
},
|
||||
})
|
||||
|
||||
if minetest.registered_items['mobs:bucket_milk'] then
|
||||
minetest.register_craft({
|
||||
output = 'fun_caves:apple_pie_uncooked',
|
||||
type = 'shapeless',
|
||||
recipe = {
|
||||
'default:apple',
|
||||
'default:apple',
|
||||
'farming:flour',
|
||||
'mobs:bucket_milk',
|
||||
},
|
||||
replacements = {
|
||||
{'mobs:bucket_milk', 'fun_caves:bucket_empty'},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
if minetest.registered_items['mobs:honey'] then
|
||||
minetest.register_craft({
|
||||
output = 'fun_caves:apple_pie_uncooked',
|
||||
type = 'shapeless',
|
||||
recipe = {
|
||||
'default:apple',
|
||||
'default:apple',
|
||||
'farming:flour',
|
||||
'mobs:honey',
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
if minetest.registered_items['mobs:meat_raw'] then
|
||||
minetest.register_craftitem("fun_caves:meat_pie_uncooked", {
|
||||
description = "Uncooked Meat Pie",
|
||||
inventory_image = "fun_caves_meat_pie_uncooked.png",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'fun_caves:meat_pie_uncooked',
|
||||
type = 'shapeless',
|
||||
recipe = {
|
||||
'mobs:meat_raw',
|
||||
'mobs:meat_raw',
|
||||
'fun_caves:onion',
|
||||
'farming:flour',
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("fun_caves:meat_pie", {
|
||||
description = "Meat Pie",
|
||||
drawtype = "raillike",
|
||||
tiles = {"fun_caves_meat_pie.png"},
|
||||
inventory_image = "fun_caves_meat_pie.png",
|
||||
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(),
|
||||
})
|
||||
end
|
||||
|
||||
-- spikes, hot -- silicon-based life
|
||||
local spike_size = { 1.0, 1.2, 1.4, 1.6, 1.7 }
|
||||
fun_caves_mod.hot_spikes = {}
|
||||
|
||||
for i in ipairs(spike_size) do
|
||||
if i == 1 then
|
||||
nodename = "fun_caves:hot_spike"
|
||||
else
|
||||
nodename = "fun_caves:hot_spike_"..i
|
||||
end
|
||||
|
||||
fun_caves_mod.hot_spikes[#fun_caves_mod.hot_spikes+1] = nodename
|
||||
|
||||
vs = spike_size[i]
|
||||
|
||||
minetest.register_node(nodename, {
|
||||
description = "Stone Spike",
|
||||
tiles = {"fun_caves_hot_spike.png"},
|
||||
inventory_image = "fun_caves_hot_spike.png",
|
||||
wield_image = "fun_caves_hot_spike.png",
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, oddly_breakable_by_hand=1, surface_hot=3},
|
||||
damage_per_second = 1,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
paramtype = "light",
|
||||
drawtype = "plantlike",
|
||||
walkable = false,
|
||||
light_source = i * 2,
|
||||
buildable_to = true,
|
||||
visual_scale = vs,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.4, -0.5, -0.4, 0.5, -0.4, 0.4}
|
||||
},
|
||||
groups = {dig_immediate = 3, attached_node = 1},
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
cooktime = 15,
|
||||
output = "fun_caves:meat_pie",
|
||||
recipe = "fun_caves:meat_pie_uncooked"
|
||||
})
|
||||
|
||||
minetest.register_craftitem("fun_caves:meat_pie_slice", {
|
||||
description = "Meat Pie Slice",
|
||||
inventory_image = "fun_caves_meat_pie_slice.png",
|
||||
on_use = minetest.item_eat(9),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'fun_caves:meat_pie_slice 5',
|
||||
type = 'shapeless',
|
||||
recipe = {
|
||||
'fun_caves:meat_pie',
|
||||
fixed = {-0.5*vs, -0.5*vs, -0.5*vs, 0.5*vs, -5/16*vs, 0.5*vs},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
farming.register_plant("fun_caves:onion", {
|
||||
description = "Onion",
|
||||
inventory_image = "fun_caves_onion.png",
|
||||
steps = 3,
|
||||
minlight = 13,
|
||||
maxlight = default.LIGHT_MAX,
|
||||
fertility = {"grassland"}
|
||||
fun_caves_mod.hot_spike = {}
|
||||
for i = 1, #fun_caves_mod.hot_spikes do
|
||||
fun_caves_mod.hot_spike[fun_caves_mod.hot_spikes[i]] = i
|
||||
end
|
||||
|
||||
-- stone with algae
|
||||
newnode = fun_caves_mod.clone_node("default:stone")
|
||||
newnode.description = "Cave Stone With Algae"
|
||||
newnode.tiles = {"default_stone.png^fun_caves_algae.png"}
|
||||
newnode.groups = {stone=1, cracky=3, crumbly=3}
|
||||
newnode.sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.25},
|
||||
})
|
||||
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},
|
||||
}),
|
||||
})
|
||||
|
||||
minetest.registered_items['fun_caves:seed_onion'] = nil
|
||||
minetest.registered_nodes['fun_caves:seed_onion'] = nil
|
||||
minetest.registered_craftitems['fun_caves:seed_onion'] = nil
|
||||
minetest.register_alias('fun_caves:seed_onion', 'fun_caves:onion')
|
||||
for i = 1, 3 do
|
||||
local onion = minetest.registered_items['fun_caves:onion_'..i]
|
||||
if onion then
|
||||
onion.drop = {
|
||||
max_items = i,
|
||||
items = {
|
||||
{ items = {'fun_caves:onion'}, rarity = 4 - i, },
|
||||
{ items = {'fun_caves:onion'}, rarity = (4 - i) * 2, },
|
||||
{ items = {'fun_caves:onion'}, rarity = (4 - i) * 4, },
|
||||
},
|
||||
}
|
||||
end
|
||||
-- stone with lichen
|
||||
newnode = fun_caves_mod.clone_node("default:stone")
|
||||
newnode.description = "Cave Stone With Lichen"
|
||||
newnode.tiles = {"default_stone.png^fun_caves_lichen.png"}
|
||||
newnode.groups = {stone=1, cracky=3, crumbly=3}
|
||||
newnode.sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.25},
|
||||
})
|
||||
minetest.register_node("fun_caves:stone_with_lichen", newnode)
|
||||
|
||||
-- stone with moss
|
||||
newnode = fun_caves_mod.clone_node("default:stone")
|
||||
newnode.description = "Cave Stone With Moss"
|
||||
newnode.tiles = {"default_stone.png^fun_caves_moss.png"}
|
||||
newnode.groups = {stone=1, cracky=3, crumbly=3}
|
||||
newnode.sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.25},
|
||||
})
|
||||
minetest.register_node("fun_caves:stone_with_moss", newnode)
|
||||
|
||||
|
||||
------------------------------------
|
||||
-- recipes
|
||||
------------------------------------
|
||||
|
||||
-- Mushroom stems can be used as wood and leather,
|
||||
-- ala Journey to the Center of the Earth.
|
||||
minetest.register_craft({
|
||||
output = "default:wood",
|
||||
recipe = {
|
||||
{"fun_caves:giant_mushroom_stem"}
|
||||
}
|
||||
})
|
||||
|
||||
if minetest.registered_items['mobs:leather'] then
|
||||
minetest.register_craft({
|
||||
output = "mobs:leather",
|
||||
recipe = {
|
||||
{"fun_caves:giant_mushroom_cap"}
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_node("fun_caves:onion", {
|
||||
description = "Onion",
|
||||
minetest.register_craft({
|
||||
output = "dye:red",
|
||||
recipe = {
|
||||
{"flowers:mushroom_red"}
|
||||
}
|
||||
})
|
||||
|
||||
--minetest.register_craft({
|
||||
-- output = "dye:yellow",
|
||||
-- recipe = {
|
||||
-- {"flowers:mushroom_brown"}
|
||||
-- }
|
||||
--})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:paper 6',
|
||||
recipe = {
|
||||
{'fun_caves:giant_mushroom_stem', 'fun_caves:giant_mushroom_stem', 'fun_caves:giant_mushroom_stem'},
|
||||
}
|
||||
})
|
||||
|
||||
-- Caps can be cooked and eaten.
|
||||
minetest.register_node("fun_caves:mushroom_steak", {
|
||||
description = "Mushroom Steak",
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 0.75,
|
||||
tiles = {"fun_caves_onion.png"},
|
||||
inventory_image = "fun_caves_onion.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
is_ground_content = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
|
||||
},
|
||||
fertility = {'grassland'},
|
||||
groups = {seed = 1, fleshy = 3, dig_immediate = 3, flammable = 2},
|
||||
on_use = minetest.item_eat(2),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
next_plant = 'fun_caves:onion_1',
|
||||
on_timer = farming.grow_plant,
|
||||
minlight = 10,
|
||||
maxlight = 15,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local stack = farming.place_seed(itemstack, placer, pointed_thing, 'fun_caves:onion')
|
||||
if stack then
|
||||
return stack
|
||||
end
|
||||
|
||||
return minetest.item_place(itemstack, placer, pointed_thing)
|
||||
end,
|
||||
tiles = {"vmg_mushroom_steak.png"},
|
||||
inventory_image = "vmg_mushroom_steak.png",
|
||||
on_use = minetest.item_eat(4),
|
||||
--groups = {dig_immediate = 3, attached_node = 1},
|
||||
groups = {dig_immediate = 3},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
cooktime = 15,
|
||||
output = "fun_caves:apple_pie",
|
||||
recipe = "fun_caves:apple_pie_uncooked"
|
||||
})
|
||||
|
||||
|
||||
for i = 3, 5 do
|
||||
minetest.override_item("default:grass_" .. i, {
|
||||
drop = {
|
||||
max_items = 2,
|
||||
items = {
|
||||
{ items = { "default:grass_1"}, },
|
||||
{ items = {'farming:seed_wheat'},rarity = 5 },
|
||||
{ items = {"fun_caves:onion",}, rarity = 5 },
|
||||
},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_craftitem("fun_caves:wooden_bowl", {
|
||||
description = "Wooden Bowl",
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
tiles = {"fun_caves_wooden_bowl.png"},
|
||||
inventory_image = "fun_caves_wooden_bowl.png",
|
||||
groups = {bowl = 1, dig_immediate = 3},
|
||||
output = "fun_caves:mushroom_steak",
|
||||
recipe = "fun_caves:huge_mushroom_cap",
|
||||
cooktime = 2,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'fun_caves:wooden_bowl 20',
|
||||
type = "cooking",
|
||||
output = "fun_caves:mushroom_steak 2",
|
||||
recipe = "fun_caves:giant_mushroom_cap",
|
||||
cooktime = 2,
|
||||
})
|
||||
|
||||
-- moon juice from fungus
|
||||
minetest.register_craft({
|
||||
output = "fun_caves:moon_juice",
|
||||
recipe = {
|
||||
{'group:wood', '', 'group:wood'},
|
||||
{'group:wood', '', 'group:wood'},
|
||||
{'', 'group:wood', ''},
|
||||
{"fun_caves:glowing_fungus", "fun_caves:glowing_fungus", "fun_caves:glowing_fungus"},
|
||||
{"fun_caves:glowing_fungus", "fun_caves:glowing_fungus", "fun_caves:glowing_fungus"},
|
||||
{"fun_caves:glowing_fungus", "vessels:glass_bottle", "fun_caves:glowing_fungus"},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:diamondblock',
|
||||
output = "fun_caves:moon_glass",
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
{'default:coalblock', 'default:coalblock', 'default:coalblock'},
|
||||
{'default:coalblock', 'default:mese_crystal_fragment', 'default:coalblock'},
|
||||
{'default:coalblock', 'default:coalblock', 'default:coalblock'},
|
||||
}
|
||||
"fun_caves:moon_juice",
|
||||
"fun_caves:moon_juice",
|
||||
"default:glass",
|
||||
},
|
||||
})
|
||||
|
||||
-- Speleothems can be made into cobblestone, to get them out of inventory.
|
||||
minetest.register_craft({
|
||||
output = "default:cobble",
|
||||
recipe = {
|
||||
{"", "", ""},
|
||||
{"fun_caves:stalactite", "fun_caves:stalactite", ""},
|
||||
{"fun_caves:stalactite", "fun_caves:stalactite", ""},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:mese_crystal 2',
|
||||
output = "default:cobble",
|
||||
recipe = {
|
||||
{'default:diamond', 'default:diamond', 'default:diamond'},
|
||||
{'default:diamond', 'default:mese_crystal', 'default:diamond'},
|
||||
{'default:diamond', 'default:diamond', 'default:diamond'},
|
||||
}
|
||||
{"", "", ""},
|
||||
{"fun_caves:stalagmite", "fun_caves:stalagmite", ""},
|
||||
{"fun_caves:stalagmite", "fun_caves:stalagmite", ""},
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue