1
0
Fork 0

Clean up a bit

lush_caves
cora 2023-08-07 16:07:36 +02:00 committed by the-real-herowl
parent c888095e61
commit 46f01e9ce1
3 changed files with 9 additions and 25 deletions

View File

@ -144,12 +144,13 @@ local dripleaf = {
mcl_lush_caves.dripleaf_grow(vector.offset(pos,0,-1,0),{name = "mcl_lush_caves:dripleaf_big_stem" }) mcl_lush_caves.dripleaf_grow(vector.offset(pos,0,-1,0),{name = "mcl_lush_caves:dripleaf_big_stem" })
end end
} }
local dripleaf_tipped = table.copy(dripleaf) local dripleaf_tipped = table.merge(dripleaf, {
dripleaf_tipped.walkable = false walkable = false,
dripleaf_tipped.tiles = {"mcl_lush_caves_big_dripleaf_tip.png"} tiles = {"mcl_lush_caves_big_dripleaf_tip.png"},
dripleaf_tipped.on_timer = function(p,e) on_timer = function(p,e)
minetest.swap_node(p,{name="mcl_lush_caves:dripleaf_big"}) minetest.swap_node(p,{name="mcl_lush_caves:dripleaf_big"})
end end,
})
dripleaf.mesecons = {effector = { dripleaf.mesecons = {effector = {
action_on = function(pos, node) action_on = function(pos, node)
@ -162,24 +163,6 @@ dripleaf.mesecons = {effector = {
end, end,
rules = mesecon.rules.alldirs, rules = mesecon.rules.alldirs,
}} }}
local player_dripleaf = {}
minetest.register_globalstep(function(dtime)
for _,p in pairs(minetest.get_connected_players()) do
local pos = p:get_pos()
local n = minetest.get_node(pos)
if n.name == "mcl_lush_caves:dripleaf_big" and n.param2 == 0 then
if not player_dripleaf[p] then player_dripleaf[p] = 0 end
player_dripleaf[p] = player_dripleaf[p] + dtime
if player_dripleaf[p] > 1 then
minetest.swap_node(pos,{name = "mcl_lush_caves:dripleaf_big_tipped"})
player_dripleaf[p] = nil
local t = minetest.get_node_timer(pos)
t:start(3)
end
end
end
end)
minetest.register_node("mcl_lush_caves:dripleaf_big",dripleaf) minetest.register_node("mcl_lush_caves:dripleaf_big",dripleaf)
minetest.register_node("mcl_lush_caves:dripleaf_big_tipped",dripleaf_tipped) minetest.register_node("mcl_lush_caves:dripleaf_big_tipped",dripleaf_tipped)

View File

@ -124,6 +124,7 @@ mcl_structures.register_structure("clay_pool",{
spawn_by = {"air"}, spawn_by = {"air"},
num_spawn_by = 1, num_spawn_by = 1,
fill_ratio = 0.01, fill_ratio = 0.01,
terrain_feature = true,
flags = "all_floors", flags = "all_floors",
y_max = -10, y_max = -10,
biomes = lushcaves, biomes = lushcaves,

View File

@ -1,3 +1,3 @@
name = mcl_lush_caves name = mcl_lush_caves
author = cora author = cora
depends = mcl_biomes, mcl_structures depends = mcl_util, mcl_structures