mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2025-02-09 08:40:38 +01:00
try a more efficient way of changing the interiors of columns
This commit is contained in:
parent
a47c25a89c
commit
9ddb8c5b6f
@ -1,4 +1,4 @@
|
|||||||
name = df_caverns
|
name = df_caverns
|
||||||
description = Adds vast underground caverns in the style of Dwarf Fortress, complete with underground flora in diverse biomes. Also adds stalactite/stalagmite decorations in the smaller tunnels.
|
description = Adds vast underground caverns in the style of Dwarf Fortress, complete with underground flora in diverse biomes. Also adds stalactite/stalagmite decorations in the smaller tunnels.
|
||||||
depends = default, subterrane, df_trees, df_mapitems
|
depends = default, subterrane, df_trees, df_mapitems
|
||||||
optional_depends = df_farming, ice_sprites, oil, df_underworld_items, magma_conduits, bones_loot
|
optional_depends = df_farming, ice_sprites, oil, df_underworld_items, magma_conduits, bones_loot, named_waypoints, map
|
@ -299,6 +299,7 @@ local decorate_primordial = function(minp, maxp, seed, vm, node_arrays, area, da
|
|||||||
local jungle = nvals_cave[vi] < 0
|
local jungle = nvals_cave[vi] < 0
|
||||||
if jungle then
|
if jungle then
|
||||||
data[vi] = c_plant_matter
|
data[vi] = c_plant_matter
|
||||||
|
minetest.get_node_timer(area:position(vi)):start(math.random(10, 60))
|
||||||
else
|
else
|
||||||
data[vi] = c_mycelial_dirt
|
data[vi] = c_mycelial_dirt
|
||||||
end
|
end
|
||||||
|
@ -380,6 +380,7 @@ local decorate_sunless_sea = function(minp, maxp, seed, vm, node_arrays, area, d
|
|||||||
else
|
else
|
||||||
data[vi] = c_coral_table[math.random(1,3)]
|
data[vi] = c_coral_table[math.random(1,3)]
|
||||||
data_param2[vi] = math.random(1,4)-1
|
data_param2[vi] = math.random(1,4)-1
|
||||||
|
minetest.get_node_timer(area:position(vi)):start(math.random(10, 60))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -13,6 +13,11 @@ minetest.register_node("df_mapitems:cave_coral_3", {
|
|||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {cracky = 3, dfcaverns_cave_coral = 1},
|
groups = {cracky = 3, dfcaverns_cave_coral = 1},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
on_timer = function(pos)
|
||||||
|
if minetest.find_node_near(pos, 1, {"default:water_source"}) == nil then
|
||||||
|
minetest.set_node(pos, {name="default:coral_skeleton"})
|
||||||
|
end
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("df_mapitems:cave_coral_2", {
|
minetest.register_node("df_mapitems:cave_coral_2", {
|
||||||
@ -26,6 +31,11 @@ minetest.register_node("df_mapitems:cave_coral_2", {
|
|||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {cracky = 3, dfcaverns_cave_coral = 1},
|
groups = {cracky = 3, dfcaverns_cave_coral = 1},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
on_timer = function(pos)
|
||||||
|
if minetest.find_node_near(pos, 1, {"default:water_source"}) == nil then
|
||||||
|
minetest.set_node(pos, {name="default:coral_skeleton"})
|
||||||
|
end
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("df_mapitems:cave_coral_1", {
|
minetest.register_node("df_mapitems:cave_coral_1", {
|
||||||
@ -39,6 +49,11 @@ minetest.register_node("df_mapitems:cave_coral_1", {
|
|||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {cracky = 3, dfcaverns_cave_coral = 1},
|
groups = {cracky = 3, dfcaverns_cave_coral = 1},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
on_timer = function(pos)
|
||||||
|
if minetest.find_node_near(pos, 1, {"default:water_source"}) == nil then
|
||||||
|
minetest.set_node(pos, {name="default:coral_skeleton"})
|
||||||
|
end
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
local coral_names = {"df_mapitems:cave_coral_1", "df_mapitems:cave_coral_2", "df_mapitems:cave_coral_3"}
|
local coral_names = {"df_mapitems:cave_coral_1", "df_mapitems:cave_coral_2", "df_mapitems:cave_coral_3"}
|
||||||
|
@ -254,6 +254,11 @@ minetest.register_node("df_primordial_items:plant_matter", {
|
|||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {crumbly = 3, soil = 1},
|
groups = {crumbly = 3, soil = 1},
|
||||||
sounds = default.node_sound_dirt_defaults(),
|
sounds = default.node_sound_dirt_defaults(),
|
||||||
|
on_timer = function(pos)
|
||||||
|
if minetest.find_node_near(pos, 1, {"air"}) == nil then
|
||||||
|
minetest.set_node(pos, {name="df_primordial_items:packed_roots"})
|
||||||
|
end
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
if minetest.get_modpath("trail") and trail and trail.register_trample_node then
|
if minetest.get_modpath("trail") and trail and trail.register_trample_node then
|
||||||
local HARDPACK_PROBABILITY = minetest.settings:get("trail_hardpack_probability") or 0.5 -- Chance walked dirt/grass is worn and compacted to trail:trail.
|
local HARDPACK_PROBABILITY = minetest.settings:get("trail_hardpack_probability") or 0.5 -- Chance walked dirt/grass is worn and compacted to trail:trail.
|
||||||
@ -286,18 +291,6 @@ minetest.register_node("df_primordial_items:packed_roots", {
|
|||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_abm({
|
|
||||||
label = "Plant matter converting to roots",
|
|
||||||
nodenames = {"df_primordial_items:plant_matter"},
|
|
||||||
interval = 10.0,
|
|
||||||
chance = 5,
|
|
||||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
|
||||||
if minetest.find_node_near(pos, 1, {"air"}) == nil then
|
|
||||||
minetest.set_node(pos, {name="df_primordial_items:packed_roots"})
|
|
||||||
end
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
----------------------------------------------------------------------------------------
|
----------------------------------------------------------------------------------------
|
||||||
-- Roots
|
-- Roots
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user