add giant mese stalactites to lava sea

This commit is contained in:
FaceDeer
2018-05-18 01:43:56 -06:00
parent 3c97194831
commit 1818ba0230
11 changed files with 142 additions and 38 deletions

View File

@ -0,0 +1,84 @@
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
minetest.register_alias("subterrane:dry_stal_1", "dfcaverns:dry_stal_1")
minetest.register_alias("subterrane:dry_stal_1", "dfcaverns:dry_stal_1")
minetest.register_alias("subterrane:dry_stal_1", "dfcaverns:dry_stal_1")
minetest.register_alias("subterrane:dry_stal_1", "dfcaverns:dry_stal_1")
minetest.register_alias("subterrane:wet_stal_1", "dfcaverns:wet_stal_1")
minetest.register_alias("subterrane:wet_stal_1", "dfcaverns:wet_stal_1")
minetest.register_alias("subterrane:wet_stal_1", "dfcaverns:wet_stal_1")
minetest.register_alias("subterrane:wet_stal_1", "dfcaverns:wet_stal_1")
minetest.register_alias("subterrane:wet_flowstone", "dfcaverns:wet_flowstone")
minetest.register_alias("subterrane:dry_flowstone", "dfcaverns:dry_flowstone")
-----------------------------------------------
subterrane.register_stalagmite_nodes("dfcaverns:dry_stal", {
description = S("Dry Dripstone"),
tiles = {
"default_stone.png^[brighten",
},
groups = {cracky = 3, stone = 2},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("dfcaverns:dry_flowstone", {
description = S("Dry Flowstone"),
tiles = {"default_stone.png^[brighten"},
groups = {cracky = 3, stone = 1},
is_ground_content = true,
drop = 'default:cobble',
sounds = default.node_sound_stone_defaults(),
})
-----------------------------------------------
subterrane.register_stalagmite_nodes("dfcaverns:wet_stal", {
description = S("Dry Dripstone"),
tiles = {
"default_stone.png^[brighten^dfcaverns_dripstone_streaks.png",
},
groups = {cracky = 3, stone = 2, subterrane_wet_dripstone = 1},
sounds = default.node_sound_stone_defaults(),
}, "dfcaverns:dry_stal")
minetest.register_node("dfcaverns:wet_flowstone", {
description = S("Wet Flowstone"),
tiles = {"default_stone.png^[brighten^dfcaverns_dripstone_streaks.png"},
groups = {cracky = 3, stone = 1, subterrane_wet_dripstone = 1},
is_ground_content = true,
drop = 'default:cobble',
sounds = default.node_sound_stone_defaults(),
})
-----------------------------------------------
subterrane.register_stalagmite_nodes("dfcaverns:icicle", {
description = S("Icicle"),
tiles = {
"default_ice.png",
},
groups = {cracky = 3, puts_out_fire = 1, cools_lava = 1, slippery = 3},
sounds = default.node_sound_glass_defaults(),
})
local c_dry_stal_1 = minetest.get_content_id("dfcaverns:dry_stal_1") -- thinnest
local c_dry_stal_2 = minetest.get_content_id("dfcaverns:dry_stal_2")
local c_dry_stal_3 = minetest.get_content_id("dfcaverns:dry_stal_3")
local c_dry_stal_4 = minetest.get_content_id("dfcaverns:dry_stal_4") -- thickest
dfcaverns.dry_stalagmite_ids = {c_dry_stal_1, c_dry_stal_2, c_dry_stal_3, c_dry_stal_4}
local c_wet_stal_1 = minetest.get_content_id("dfcaverns:wet_stal_1") -- thinnest
local c_wet_stal_2 = minetest.get_content_id("dfcaverns:wet_stal_2")
local c_wet_stal_3 = minetest.get_content_id("dfcaverns:wet_stal_3")
local c_wet_stal_4 = minetest.get_content_id("dfcaverns:wet_stal_4") -- thickest
dfcaverns.wet_stalagmite_ids = {c_wet_stal_1, c_wet_stal_2, c_wet_stal_3, c_wet_stal_4}
local c_icicle_1 = minetest.get_content_id("dfcaverns:icicle_1") -- thinnest
local c_icicle_2 = minetest.get_content_id("dfcaverns:icicle_2")
local c_icicle_3 = minetest.get_content_id("dfcaverns:icicle_3")
local c_icicle_4 = minetest.get_content_id("dfcaverns:icicle_4") -- thickest
dfcaverns.icicle_ids = {c_icicle_1, c_icicle_2, c_icicle_3, c_icicle_4}

View File

@ -0,0 +1,24 @@
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--glowing mese crystal blocks
minetest.register_node("dfcaverns:glow_mese", {
description = S("Flawless Mese Block"),
tiles = {"dfcaverns_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,
})
minetest.register_craft({
output = 'default:mese_crystal 12',
recipe = {
{'dfcaverns:glow_mese'},
}
})

166
features/glow_water.lua Normal file
View File

@ -0,0 +1,166 @@
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
minetest.register_node("dfcaverns:glow_water_source", {
description = S("Mese Water"),
_doc_items_longdesc = dfcaverns.doc.glow_water_desc,
_doc_items_usagehelp = dfcaverns.doc.glow_water_usage,
drawtype = "liquid",
tiles = {
{
name = "default_water_source_animated.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0,
},
},
},
special_tiles = {
{
name = "default_water_source_animated.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0,
},
backface_culling = false,
},
},
alpha = 204,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
drop = "",
drowning = 1,
liquidtype = "source",
liquid_alternative_flowing = "dfcaverns:glow_water_flowing",
liquid_alternative_source = "dfcaverns:glow_water_source",
liquid_viscosity = 7,
liquid_renewable = false,
liquid_range = 2,
light_source = default.LIGHT_MAX,
post_effect_color = {a = 204, r = 250, g = 250, b = 10},
groups = {liquid = 3, flammable = 2},
sounds = default.node_sound_water_defaults(),
})
minetest.register_node("dfcaverns:glow_water_flowing", {
description = S("Flowing Mese Water"),
_doc_items_longdesc = dfcaverns.doc.glow_water_desc,
_doc_items_usagehelp = dfcaverns.doc.glow_water_usage,
drawtype = "flowingliquid",
tiles = {"default_water.png"},
special_tiles = {
{
name = "default_water_flowing_animated.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.8,
},
},
{
name = "default_water_flowing_animated.png",
backface_culling = true,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.8,
},
},
},
alpha = 204,
paramtype = "light",
paramtype2 = "flowingliquid",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
drop = "",
drowning = 1,
liquidtype = "flowing",
liquid_alternative_flowing = "dfcaverns:glow_water_flowing",
liquid_alternative_source = "dfcaverns:glow_water_source",
liquid_viscosity = 7,
liquid_renewable = false,
liquid_range = 2,
light_source = 8,
post_effect_color = {a = 204, r = 250, g = 250, b = 10},
groups = {liquid = 3, flammable = 2, not_in_creative_inventory = 1},
sounds = default.node_sound_water_defaults(),
})
local random_direction ={
{x=0,y=0,z=1},
{x=0,y=0,z=-1},
{x=0,y=1,z=0},
{x=0,y=-1,z=0},
{x=1,y=0,z=0},
{x=-1,y=0,z=0},
}
local get_node = minetest.get_node
local set_node = minetest.set_node
local spark_spawner = {
amount = 5,
time = 0.1,
minvel = {x=1, y=1, z=1},
maxvel = {x=-1, y=-1, z=-1},
minacc = {x=0, y= 2, z=0},
maxacc = {x=0, y= 2, z=0},
minexptime = 0.5,
maxexptime = 1,
minsize = 1,
maxsize = 1,
collisiondetection = true,
vertical = false,
texture = "dfcaverns_spark.png",
}
minetest.register_abm({
label = "dfcaverns glow_water",
nodenames = {"dfcaverns:glow_water_source"},
neighbors = {"default:water_source"},
interval = 2,
chance = 2,
catch_up = false,
action = function(pos,node) -- Do everything possible to optimize this method
spark_spawner.minpos = vector.add(pos, -0.5)
spark_spawner.maxpos = vector.add(pos, 0.5)
minetest.add_particlespawner(spark_spawner)
local check_pos = vector.add(pos, random_direction[math.random(6)])
local check_node = get_node(check_pos)
local check_node_name = check_node.name
if check_node_name == "default:water_source" then
set_node(pos, check_node)
set_node(check_pos, node)
end
end
})
if minetest.get_modpath("bucket") then
bucket.register_liquid(
"dfcaverns:glow_water_source",
"dfcaverns:glow_water_flowing",
"dfcaverns:glow_water_bucket",
"dfcaverns_bucket_glow_water.png",
S("Glow Water Bucket")
)
end
if minetest.get_modpath("dynamic_liquid") then
dynamic_liquid.liquid_abm("dfcaverns:glow_water_source", "dfcaverns:glow_water_flowing", 5)
end

76
features/glow_worms.lua Normal file
View File

@ -0,0 +1,76 @@
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
minetest.register_node("dfcaverns:glow_worm", {
description = S("Glow Worms"),
_doc_items_longdesc = dfcaverns.doc.glow_worms_desc,
_doc_items_usagehelp = dfcaverns.doc.glow_worms_usage,
tiles = {"dfcaverns_glow_worm.png"},
inventory_image = "dfcaverns_glow_worm.png",
wield_image = "dfcaverns_glow_worm.png",
is_ground_content = true,
groups = {oddly_breakable_by_hand=3, light_sensitive_fungus = 12},
_dfcaverns_dead_node = "air",
light_source = 9,
paramtype = "light",
drawtype = "plantlike",
walkable = false,
buildable_to = true,
visual_scale = 1.0,
after_place_node = function(pos, placer)
if dfcaverns.config.glow_worm_delay_multiplier > 0 then
minetest.get_node_timer(pos):start(math.random(
dfcaverns.config.glow_worm_delay_multiplier * dfcaverns.config.plant_growth_time * 0.75,
dfcaverns.config.glow_worm_delay_multiplier * dfcaverns.config.plant_growth_time * 1.25))
end
end,
on_timer = function(pos, elapsed)
local below = {x=pos.x, y=pos.y-1, z=pos.z}
if minetest.get_node(below).name == "air" then
minetest.set_node(below, {name="dfcaverns:glow_worm"})
if math.random() > 0.5 then
minetest.get_node_timer(below):start(math.random(
dfcaverns.config.glow_worm_delay_multiplier * dfcaverns.config.plant_growth_time * 0.75,
dfcaverns.config.glow_worm_delay_multiplier * dfcaverns.config.plant_growth_time * 1.25))
end
end
end,
})
local c_air = minetest.get_content_id("air")
local c_worm = minetest.get_content_id("dfcaverns:glow_worm")
dfcaverns.glow_worm_ceiling = function(area, data, ai, vi, bi)
if data[vi] == c_air and data[bi] == c_air then
data[vi] = c_worm
data[bi] = c_worm
if math.random(2) == 1 then
local pos = area:position(vi)
pos.y = pos.y-2
local bbi = area:indexp(pos)
if data[bbi] == c_air then
data[bbi] = c_worm
if math.random(2) == 1 then
pos.y = pos.y-1
local bbbi = area:indexp(pos)
if data[bbbi] == c_air then
data[bbbi] = c_worm
end
end
end
end
end
end
minetest.register_abm({
label = "dfcaverns:water_destroys_glow_worms",
nodenames = {"dfcaverns:glow_worm"},
neighbors = {"default:water_source"},
interval = 1,
chance = 10,
action = function (pos)
minetest.set_node(pos, {name="air"})
end,
})

77
features/ground_cover.lua Normal file
View File

@ -0,0 +1,77 @@
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--------------------------------------------------
-- Cave moss
-- cyan/dark cyan
minetest.register_node("dfcaverns:dirt_with_cave_moss", {
description = S("Dirt With Cave Moss"),
_doc_items_longdesc = dfcaverns.doc.cave_moss_desc,
_doc_items_usagehelp = dfcaverns.doc.cave_moss_usage,
tiles = {"default_dirt.png^dfcaverns_cave_moss.png", "default_dirt.png",
{name = "default_dirt.png^dfcaverns_cave_moss_side.png",
tileable_vertical = false}},
drop = "default:dirt",
is_ground_content = true,
groups = {crumbly = 3, soil = 1, light_sensitive_fungus = 11},
sounds = default.node_sound_dirt_defaults({
footstep = {name = "default_grass_footstep", gain = 0.25},
}),
soil = {
base = "dfcaverns:dirt_with_cave_moss",
dry = "farming:soil",
wet = "farming:soil_wet"
},
_dfcaverns_dead_node = "default:dirt",
})
minetest.register_abm{
label = "dfcaverns:cave_moss_spread",
nodenames = {"default:dirt"},
neighbors = {"dfcaverns:dirt_with_cave_moss"},
interval = 60,
chance = 15,
catch_up = true,
action = function(pos)
local above_def = minetest.registered_nodes[minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name]
if above_def and (above_def.buildable_to == true or above_def.walkable == false) then
minetest.swap_node(pos, {name="dfcaverns:dirt_with_cave_moss"})
end
end,
}
--------------------------------------------------
-- floor fungus
-- white/yellow
minetest.register_node("dfcaverns:cobble_with_floor_fungus", {
description = S("Cobblestone With Floor Fungus"),
_doc_items_longdesc = dfcaverns.doc.floor_fungus_desc,
_doc_items_usagehelp = dfcaverns.doc.floor_fungus_usage,
tiles = {"default_cobble.png^dfcaverns_floor_fungus.png", "default_cobble.png", "default_cobble.png^dfcaverns_floor_fungus_side.png"},
drops = "default:cobble",
is_ground_content = true,
groups = {cracky = 3, stone = 2, slippery = 1, light_sensitive_fungus = 11},
_dfcaverns_dead_node = "default:cobble",
sounds = default.node_sound_stone_defaults({
footstep = {name = "dfcaverns_squish", gain = 0.25},
}),
})
minetest.register_abm{
label = "dfcaverns:floor_fungus_spread",
nodenames = {"default:cobble"},
neighbors = {"dfcaverns:cobble_with_floor_fungus"},
interval = 60,
chance = 30,
catch_up = true,
action = function(pos)
minetest.swap_node(pos, {name="dfcaverns:cobble_with_floor_fungus"})
end,
}