diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2016-05-17 21:40:05 +0100 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2016-05-17 21:40:05 +0100 |
commit | b1f0ded17316dcaf729c3dc2d7d21aed70c2b7ca (patch) | |
tree | adc72eb32963a67a19863bc8e3060cb4b7df1d1b /schematics/waterlily.lua | |
parent | c47c840f2aaf35c9ea284be191798cb3a566b175 (diff) |
Ethereal NG 1.20 release for minetest 0.4.14
Diffstat (limited to 'schematics/waterlily.lua')
-rw-r--r-- | schematics/waterlily.lua | 60 |
1 files changed, 4 insertions, 56 deletions
diff --git a/schematics/waterlily.lua b/schematics/waterlily.lua index d6bfaa3..1936b04 100644 --- a/schematics/waterlily.lua +++ b/schematics/waterlily.lua @@ -1,69 +1,17 @@ --- Waterlily (built column by column, bottom to top) - -local a = "default:sand" -local b = "default:water_source" -local c = "flowers:waterlily" +-- waterlily ethereal.waterlily = { size = {x = 1, y = 3, z = 1}, data = { - {name=a, param1=255}, - {name=b, param1=255}, - {name=c, param1=255}, + {name = "default:sand", param1 = 255}, + {name = "default:water_source", param1 = 255}, + {name = "flowers:waterlily", param1 = 255}, }, } -if minetest.registered_nodes["flowers:waterlily"] then - minetest.override_item("flowers:waterlily", { walkable = true, }) - -else - -minetest.register_node(":flowers:waterlily", { - description = "Waterlily", - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - tiles = {"flowers_waterlily.png"}, - inventory_image = "flowers_waterlily.png", - wield_image = "flowers_waterlily.png", - liquids_pointable = true, - walkable = true, - buildable_to = true, - groups = {snappy = 3, flower = 1}, - sounds = default.node_sound_leaves_defaults(), - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, -0.46875, 0.5} - }, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5} - }, - - after_place_node = function(pos, placer, itemstack, pointed_thing) - local find_water = minetest.find_nodes_in_area({x = pos.x - 1, y = pos.y, z = pos.z - 1}, - {x = pos.x + 1, y = pos.y, z = pos.z + 1}, "default:water_source") - local find_river_water = minetest.find_nodes_in_area({x = pos.x - 1, y = pos.y, z = pos.z - 1}, - {x = pos.x + 1, y = pos.y, z = pos.z + 1}, "default:river_water_source") - if #find_water ~= 0 then - minetest.set_node(pos, {name = "default:water_source"}) - pos.y = pos.y + 1 - minetest.set_node(pos, {name = "flowers:waterlily", param2 = math.random(0, 3)}) - elseif #find_river_water ~= 0 then - minetest.set_node(pos, {name = "default:river_water_source"}) - pos.y = pos.y + 1 - minetest.set_node(pos, {name = "flowers:waterlily", param2 = math.random(0, 3)}) - else - minetest.remove_node(pos) - return true - end - end -}) - -end |