mirror of
https://github.com/Splizard/minetest-mod-snow.git
synced 2025-06-30 15:20:20 +02:00
add snow biome flowers
This commit is contained in:
@ -158,6 +158,29 @@ minetest.register_node("snow:moss", {
|
||||
})
|
||||
|
||||
|
||||
if rawget(_G, "flowers") then
|
||||
-- broken flowers
|
||||
snow.known_plants = {}
|
||||
for _,name in pairs({"dandelion_yellow", "geranium", "rose", "tulip", "dandelion_white", "viola"}) do
|
||||
local flowername = "flowers:"..name
|
||||
local newname = "snow:flower_"..name
|
||||
local flower = minetest.registered_nodes[flowername]
|
||||
minetest.register_node(newname, {
|
||||
drawtype = "plantlike",
|
||||
tiles = { "snow_" .. name .. ".png" },
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
drop = "",
|
||||
groups = {snappy=3, attached_node = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = flower.selection_box
|
||||
})
|
||||
snow.known_plants[minetest.get_content_id(flowername)] = minetest.get_content_id(newname)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
local function snow_onto_dirt(pos)
|
||||
pos.y = pos.y - 1
|
||||
|
Reference in New Issue
Block a user