differentiate legacy stalagmite function from newer one
This commit is contained in:
parent
c2000ac612
commit
c3fd6f1bed
@ -2,7 +2,7 @@ local c_air = minetest.get_content_id("air")
|
||||
|
||||
-- use a negative height to turn this into a stalactite
|
||||
-- stalagmite_id is a table of the content ids of the four stalagmite sections, from _1 to _4.
|
||||
function subterrane:stalagmite(vi, area, data, param2_data, param2, height, stalagmite_id)
|
||||
function subterrane:small_stalagmite(vi, area, data, param2_data, param2, height, stalagmite_id)
|
||||
local pos = area:position(vi)
|
||||
|
||||
local x = pos.x
|
||||
|
22
legacy.lua
22
legacy.lua
@ -43,4 +43,26 @@ minetest.register_node("subterrane:wet_flowstone", {
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
local dry_stalagmite_ids = {
|
||||
minetest.get_content_id("subterrane:dry_stal_1"), -- thinnest
|
||||
minetest.get_content_id("subterrane:dry_stal_2"),
|
||||
minetest.get_content_id("subterrane:dry_stal_3"),
|
||||
minetest.get_content_id("subterrane:dry_stal_4"), -- thickest
|
||||
}
|
||||
|
||||
local wet_stalagmite_ids = {
|
||||
minetest.get_content_id("subterrane:wet_stal_1"), -- thinnest
|
||||
minetest.get_content_id("subterrane:wet_stal_2"),
|
||||
minetest.get_content_id("subterrane:wet_stal_3"),
|
||||
minetest.get_content_id("subterrane:wet_stal_4"), -- thickest
|
||||
}
|
||||
|
||||
function subterrane:stalagmite(vi, area, data, param2_data, param2, height, is_wet)
|
||||
if is_wet then
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, wet_stalagmite_ids)
|
||||
else
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, dry_stalagmite_ids)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user