MTG -> MCL2: Sinks

master
HimbeerserverDE 2021-05-01 14:21:55 +02:00
parent 90bc963c4b
commit 90b90eb0e7
No known key found for this signature in database
GPG Key ID: 1A651504791E6A8B
1 changed files with 33 additions and 2 deletions

View File

@ -380,8 +380,8 @@ if springs then
minetest.register_node("dynamic_liquid:spring", {
description = S("Spring"),
_doc_items_longdesc = S("A natural spring that generates an endless stream of water source blocks"),
_doc_items_usagehelp = S("Generates one source block of water directly on top of itself once per second, provided the space is clear. If this natural spring is dug out the flow stops and it is turned into ordinary cobble."),
drops = "mcl_core:gravel",
_doc_items_usagehelp = S("Generates one source block of water directly on top of itself once per second, provided the space is clear. If this natural spring is dug out the flow stops and it is turned into ordinary gravel."),
drop = "default:gravel",
tiles = {"default_cobble.png^[combine:16x80:0,-48=crack_anylength.png",
"default_cobble.png","default_cobble.png","default_cobble.png","default_cobble.png","default_cobble.png",
},
@ -408,6 +408,37 @@ if springs then
})
end
-- Sink
minetest.register_node("dynamic_liquid:sink", {
description = S("Sink"),
_doc_items_longdesc = S("A node that can absorb an infinite amount of water"),
_doc_items_usagehelp = S("Removes one source block of water directly on top of itself once per second. If this node is dug it is turned into ordinary gravel."),
drop = "default:gravel",
tiles = {"default_cobble.png^[combine:16x80:0,-48=crack_anylength.png",
"default_cobble.png","default_cobble.png","default_cobble.png","default_cobble.png","default_cobble.png",
},
is_ground_content = false,
groups = {cracky = 3, stone = 2},
sounds = spring_sounds,
})
minetest.register_abm({
label = "dynamic_liquid creative sink",
nodenames = {"dynamic_liquid:sink"},
neighbors = {"mcl_core:water_source"},
interval = 1,
chance = 1,
catch_up = false,
action = function(pos,node)
pos.y = pos.y + 1
local check_node = get_node(pos)
local check_node_name = check_node.name
if check_node_name == "mcl_core:water_source" then
set_node(pos, {name="air"})
end
end,
})
local mapgen_prefill = minetest.settings:get_bool("dynamic_liquid_mapgen_prefill", true)
local waternodes