VanessaE wrote:Update 2013-02-24: Fixed waterlilies sometimes being placed vertically instead of flat/horizontally. Sorry about that folks (why don't people tell me these things?).
VanessaE wrote:Update 2013-04-25: Minetest now comes with a flowers mod, so that which it includes has been removed from my mod. In so doing, I've renamed my flowers mod to "flowers_plus", since it's now more of an add-on to the default.
VanessaE wrote:On my server, I have the opposite problem - they grow way too fast and almost out of control, and HEAVILY favor dandelions and cotton (which should be impossible, there's nothing in my code or in PilzAdam's that should be doing that).
VanessaE wrote:Not specifically, no. I just never thought to add that feature (and I'm not exactly sure how to :P ).
liquids_buildable = true,
kaeza wrote:There's the liquids_pointable property, but dunno if it works for nodes (buckets use it).
liquids_pointable = true,
on_place = function(itemstack, placer, pointed_thing)
local pt = pointed_thing
local direction = minetest.dir_to_facedir(placer:get_look_dir())
local node = minetest.env:get_node(pt.under)
local waterlily = math.random(1,4)
if waterlily == 1 then
minetest.add_node({x=pt.under.x, y=pt.under.y+1, z=pt.under.z}, {name="flowers:waterlily", param2=direction})
elseif waterlily == 2 then
minetest.add_node({x=pt.under.x, y=pt.under.y+1, z=pt.under.z}, {name="flowers:waterlily_225", param2=direction})
elseif waterlily == 3 then
minetest.add_node({x=pt.under.x, y=pt.under.y+1, z=pt.under.z}, {name="flowers:waterlily_45", param2=direction})
elseif waterlily == 4 then
minetest.add_node({x=pt.under.x, y=pt.under.y+1, z=pt.under.z}, {name="flowers:waterlily_675", param2=direction})
end
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end,
VanessaE wrote:Mossmanikin: That looks very similar to what I was thinking of doing, though I have a different idea in mind. I've pushed an update (affects plants_lib and flowers_plus) to add this feature, based loosely on your code. Lilies rotate randomly on place, or hold 'sneak' to force facedir-only placement, and they take node_ownership and a couple of other protection mods into account also.
Users browsing this forum: No registered users and 69 guests